Relationships
Overview
- Sets up a link between two work items or assets which is then used to tell activities what to do
- Relationships contain the base relationships plus publish data, attachment, and ACL (access control list) operations, all of which are explained on this page
Advanced Editor properties and what they do
Property | What does the property do (in plain english) | Possible values | How to find these values (in plain english) |
name | Display name or identifier of relationship config | “Test” | |
flowName | The name of target/related flow | “Marine Fuel” | Can be found from flow object name key. |
sourceName | Name of relationship that will identify the source work | “Source” | |
targetName | Name of relationship that will identify the target work | “Target” | |
stepNames | List of step names when will relationship trigger | [“*”] | Step names or can simply put “*” that would select all steps |
publishDataDirection | The direction of how data will be published | "FromRelatedEntity”
"ToRelatedEntity” (e.g. from the work item you are in while setting up the relationship to another asset)
"ToSelf” | |
CreateWorkIfNotFound | Flag to create work if related work not found | true | |
Roles | Mapping of roles when publishing acl | { “owner” : “owner”} | |
workFilters | Filter to get related works | {
"targetPath": "$.load.asset.id",
"valuePath": "$.asset.id”
} | |
properties - saveEmptyValue | If the data that you are passing through to the activity is empty this property decided if this value saves as either an empty object (true) or null (false) | true or false | |
options - includeData | Flag to include data when publishing | true | |
options - closePrevious | Flag to submit or close previous work | false | |
options - includeAttachments | Flag to include attachments when publishing | true | |
options - attachmentPaths | List of attachment folders to publish | [”folder1”, ”folder2”] | |
options - includeAcl | Flag to include acl when publishing | true | |
options - removeExisting | true / false | ||
options - addRelationship | Add relationship from work to related work | true |
Publish Data Operation
Property | What does the property do (in plain english) | Possible values | How to find these values (in plain english) |
SectionName | Target Step/Section Name | "/asset/details” | Called the section name in the database but it is actually the task name |
DataMapping | Mapping of data when publishing. What data gets published to the target work/asset when this activity is triggered. | [
{
fromPath: "datapath",
toProperty: "prefix for datapath"
}
] | fromPath value options: A datapath from the flow that you are in
toProperty value options: from the target flow but you need to take the name of the datapath but only the very right part of it after the last “.” |
ExcludeProperties | Properties to exclude | [ "$.order", "$.inquiry"] | |
UpdateType | Kind of update | "Push"
"Set"
"Rename"
"Pull"
"Unset"
"AddToSet"
"Publish"
"Merge"
"Replace"
"Increment"
"Decrement" | Set is the most common. Push is when you are dealing with an array and you are adding a value to the array. |
DataType | The type of data to update | "None"
"Object"
"Array"
"Constructor"
"Property"
"Comment"
"Integer"
"Float"
"String" (use this if you are connecting a text component to a text component)
"Boolean"
"Null"
"Undefined"
"Date"
"Raw"
"Bytes"
"Guid"
"Uri"
"TimeSpan” | You have to create a new {} inside operations property list with a new dataType based on what mapping you want to do |
FromSection | Source Step/Section Name | "/asset/details” | |
RootDataPath | Root of data path | “$” | |
TargetPath | The target path | "$.asset” |
Publish Attachment Operation
Property | What does the property do (in plain english) | Possible values | How to find these values (in plain english) |
SourceFolder | Source folder | “Folder1”
e.g. “firstStep-myAttachments”
e.g. “{stepName-attachmentsComponentName}” | Find in the work object under attachments.path
|
DestinationFolder | Target folder | “Folder2” | Find under the object in the network tab (work or asset) and then in attachments then in path property |
TargetRelationShipName | Target relationship name | "MasterContract” | |
FilterExpression | If specified, only include attachments that match this expression | "'{$.data.testValue}' == 'Test1234'” |
Publish ACL Operation
Permission from the source item to the target item. The mapping of this is set up in the roles property.
Property | What does the property do (in plain english) | Possible values | How to find these values (in plain english) |
EntityIdPath | Data path to id of entity | "$.asset.id” | not sure but it always seem to be this value |
RelationshipName | Name of relationship | “” | This is always empty in the examples in the database. An optional property |
Advanced Editor example of a relationship set up
{
"flowId": null,
"flowOriginId": null,
"name": "Relationship name",
"flowName": "guy/workflow/entity/generated-2959f85c-0112-44c4-9806-48383c5e1a02",
"sourceName": "Source",
"targetName": "Target",
"stepNames": [
"*"
],
"publishDataDirection": "ToRelatedEntity",
"options": {
"includeData": true,
"closePrevious": false,
"includeAttachments": true,
"attachmentPaths": [],
"includeAcl": false,
"removeExisting": false,
"addRelationship": true,
"isOneWayRelationship": false
},
"workFilters": [
{
"targetPath": "$.load.asset.id",
"valuePath": "$.asset.id"
}
],
"roles": {
"owner": "owner"
},
"previousStepName": null,
"createWorkIfNotFound": false
}
Advanced Editor example of a publish data operation set up
{
"sectionName": "asset/details",
"dataMapping": [
{
"fromPath": "datapath",
"toProperty": "prefix for datapath"
}
],
"updateType": "Push",
"targetPath": "$.asset",
"dataType": "Object",
"identifier": null,
"fromSection": "asset/details",
"rootDataPath": "$",
"excludeProperties": ["$.order", "$.inquiry"]
}
Advanced Editor example of a publish attachment operation set up
{
"sourceFolder": "firstStepInWorkflow-myAttachments",
"destinationFolder": "firstStepInAssetType-myAttachments",
"targetRelationShipName": "Relationship Name",
"filterExpression": "'{$.data.testValue}' == 'Test1234'"
}
Advanced Editor example of a publish ACL operation set up
{
"entityIdPath": "$.asset.id",
"relationshipName": "Relationship Name"
}