Activity - Create Update Entity Data
Overview
- Maps all the data from a work item to an asset
- It either maps the data to a specific asset that you have chosen in an asset search component in the work item or
- If you haven’t selected a particular asset then it will create a new asset in the relevant asset type and maps the data to this new asset
Steps to set up this activity
- Make sure you have workflow owner permission and asset type owner permission for the workflow and asset type you want to set this up on
- Have a workflow and an asset type
- The asset type should have at least some components that are of the same type as some of the components in the workflow
- e.g. they should both have a text component
- In the workflow add in an asset search component and choose the asset type you want it to sync with in the activity
- The easiest way to add in an asset search component is to use the no code builder
- Set the “dataPath” property to be the same for all of the components that you want to sync on both the workflow and the asset type
- To find out more details about how to do this please see the knowledge base entry for the specific components
- In the Advanced Editor navigate to the activities section for the task that you want
- Steps > Step > Task > Action Set > Action > Activities
- Use the ellipsis menu under the “Activities” heading where you can select “Add Child” and then “Create Update Entity Data”
- Set these properties on the create update entity data activity
- “sourcePath”: Should just be “$.data”
- “entityType”: The string to enter here should be the same as the property of the same name (”entityType”) under the properties page in the advanced editor for the asset type you are trying to link to
- The format of the string to enter here is also usually this “{EcosystemName}-{AssetTypeName}”
- “entityIdPath”: is the dataPath of the asset search component with “.id” at the end (e.g. “$.taskOne.taskOne.assetSearch.id”)
- Done!
Advanced Editor properties and what they do
Properties shared between activities
Property | What does the property do (in plain english) | Possible values | How to find these values (in plain english) |
displayName | label of the activity | any string | |
comments | additional comments on what the activity do | any string | |
executeWhen | decides on when to execute the activity
| BeforeExecute
AfterExecute
OnExecute
Manual | |
runOnSystemEvents | specify an action event (that starts with $) that this activity will be executed | [”$actionEvent1”, “$actionEvent1”] | |
expression | data path expression if it satisfies then it will execute this activity | e.g. "'{$.asset.id}' = “123" |
Properties unique to this activity
- All of these unique properties sit within a “properties” object e.g.
{
"property one shared between components": "",
"properties": {
"entityType": "",
"etc": "",
}
}
Property | What does the property do (in plain english) | Possible values | How to find these values (in plain english) |
sourcePath | source of data to be published | Optional, if the
data path string
e.g. “$.data” | |
entityType | entity type of the entity if not found then the activity will create a new one | any string | Found in the asset type under the property entityType
”{ecosystem}-{asset type name} |
fromDatePath | diana version from date path | data path string
e.g. “$.date” | |
entityIdPath | data path of the entity id | $.t1.t1.assetSearch.id | data path of your asset search component with “.id” at the end of it |
entityDisplayNamePath | data path of the entity displayName | $.t1.t1.assetSearch.displayName | data path of your asset search component with “.displayName” at the end of it |
publishAcl | copy work acl to entity | true of false |
Advanced Editor example of this activity fully set up
{
"continueOnError": false,
"executeWhen": "AfterExecute",
"runOnSystemEvents": [],
"properties": {
"sourcePath": "$.data",
"entityType": "guy-AssetTypeUpdate",
"targetPath": "$.example",
"entityIdPath": "$.taskOne.taskOne.assetSearch.id",
"publishAcl": false
}
}