Lesson 4 - Reference Basics
References are a very powerful feature of Archy. A reference is a string that points to another object by providing a path to the object you are referring to. This path can also contain a file path which specifies that the object being referenced comes from another file. This functionality is very handy for when you want to have shared / common logic between flows.
Reference Properties
When it comes to the Archy flow YAML, properties on object that end with the 'Ref'
suffix expect reference string values. Examples of reference properties are:
Name | Description |
Identifiers ( the refId property )
A reference identifier is what you use to specify a value for an object. This provides a value that identifies an object within YAML. These identifiers are only used by Archy and are not generated in flows themselves.
A refId value should be a string and must be unique for all items that have a refId in the array.
It is also important to note that you cannot use '[', ']', '#', '~' or '/' characters in
a reference id string as they are reserved.
Here is a YAML example of an Architect task with a reference id of startingTask
and an Architect disconnect action with a reference id of goodbye
:
- task:
name: Starting Task
refId: startingTask <-- right here
actions:
- disconnect:
name: My Disconnect Action
refId: goodbye <-- right here
We typically call this identifier the "refId" in Archy. It provides a value that is used to identify an object that resides within an array.
Tutorial Main | Previous Lesson | Next Lesson
Archy - Ver. 2.33.1, generated on January 3, 2025