Task Name and Location Initialisation
This workflow is included in the Local Government Essentials - Service Enquiries package.
Description
Initialises a service enquiry's tasks name and location.
Properties
This workflow has the following properties.
| Property | Value |
|---|---|
| Name | Task Name and Location Initialisation |
| Code | workflows_serviceEnquiryTasksNameAndLocationInit_803a84e3cfbf350ff5720ae2 |
| Type | Workflow |
| Context | Package |
| Enabled | Yes |
| Tags | Causeway, Causeway Package |
| Runs on | Working days and hours only (Both) |
| Log retention | 30 days |
Trigger
The system triggers this workflow when items of the design below are edited. Where attributes are listed, an edit to anything else is ignored.
| Property | Value |
|---|---|
| Workflow type | Event workflow |
| Applies to | Service Enquiries |
| Events | Edit |
| Collections | Live |
| Attributes listened for | attributes_defectsRaisingJobsRaisedJobs (Raised Jobs)attributes_defectsWithInspectionsDefectInspection (Defect Inspections) |
| Output mode | ManyItems (Runs once for all items) |
| Can be triggered by other workflows | Yes (indirectly, via item changes) |
Actions
This workflow runs 8 actions, in the order shown in this simplified diagram. Every action's full settings are in the configuration below.
Configuration
The full configuration of this workflow, including every action's parameters.
Show configuration (335 lines)
{
"trigger": {
"dodiCode": "designs_serviceEnquiries_882914a8a671eb6a4bfe3893",
"collections": [
"Live"
],
"events": [
"Edit"
],
"outputMode": "ManyItems",
"canBeTriggeredByWorkflows": true,
"attributesListeningFor": [
"attributes_defectsRaisingJobsRaisedJobs",
"attributes_defectsWithInspectionsDefectInspection"
]
},
"actions": [
{
"actionId": "817cbc4e9ed73087a1560886",
"designCode": "designs_workflowRelationAction",
"description": "Get parent asset",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root^attributes_defectsAssignableDefects<designInterfaces_assetHeads>",
"attributeType": "Link"
}
}
],
"variables": [],
"actions": [
{
"actionId": "8b4ee1b676beba661679fd82",
"designCode": "designs_workflowOutputAction",
"description": "Cast to AssetsNameAndLocation",
"parameters": [
{
"attributeCode": "attributes_workflowOutputActionItems",
"attributeType": "Link",
"value": {
"inputParent": 0,
"itemValue": {
"property": "ItemId"
}
}
},
{
"attribute": {
"attributeCode": "attributes_workflowOutputActionDodiCode",
"value": "designInterfaces_assetsIdentifier_816c13adf6d45dccb24c807c",
"attributeType": "String"
}
},
{
"attribute": {
"attributeCode": "attributes_workflowOutputActionSingleInstance",
"value": false,
"attributeType": "Boolean"
}
}
],
"variables": [],
"actions": []
}
]
},
{
"actionId": "82b889450fdfcfe5bd33a713",
"designCode": "designs_workflowRelationAction",
"description": "Get child jobs",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root.attributes_defectsRaisingJobsRaisedJobs",
"attributeType": "Link"
}
}
],
"variables": [],
"actions": [
{
"actionId": "89c512b34eb22b90383836b1",
"designCode": "designs_workflowFilterAction",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowFilterActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"dodiCode": "designInterfaces_tasksIdentifier",
"collectionCode": "Live",
"attributes": [
"attributes_itemsTitle",
"attributes_itemsSubtitle"
]
},
"children": [
{
"type": "Or",
"children": [
{
"type": "NotExists",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_tasksIdentifierAssetReferece"
}
}
]
},
{
"type": "NotExists",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_tasksIdentifierTaskLocation"
}
}
]
}
]
}
]
},
"attributeType": "Aqs"
}
}
],
"variables": [],
"actions": [
{
"actionId": "8df340f21ad44eb17eefebf6",
"designCode": "designs_workflowEditItemAction",
"parameters": [
{
"attributeCode": "attributes_tasksIdentifierAssetReferece",
"value": {
"script": "return assetReference != string.Empty ? assetReference : serviceEnquiryName;"
},
"attributeType": "String"
},
{
"attributeCode": "attributes_tasksIdentifierTaskLocation",
"value": {
"script": "return assetLocation != string.Empty ? assetLocation : serviceEnquiryLocation;"
},
"attributeType": "String"
}
],
"variables": [
{
"name": "assetReference",
"value": {
"outputAction": "8b4ee1b676beba661679fd82",
"itemValue": {
"attributeCode": "attributes_assetsIdentifierAssetReference_8197e4a7753460c08346a499"
},
"outputMode": "Input"
}
},
{
"name": "assetLocation",
"value": {
"outputAction": "8b4ee1b676beba661679fd82",
"itemValue": {
"attributeCode": "attributes_assetsIdentifierAssetLocation_82edf88e903775818e2ec91a"
},
"outputMode": "Input"
}
},
{
"name": "serviceEnquiryName",
"value": {
"inputParent": 2,
"itemValue": {
"attributeCode": "attributes_serviceEnquiriesStreetOrAssetName_8abfd93ce8b2656f7e58eb2a"
}
}
},
{
"name": "serviceEnquiryLocation",
"value": {
"inputParent": 2,
"itemValue": {
"attributeCode": "attributes_serviceEnquiriesLocation_8a194ee1b40474fe3ac7f4eb"
}
}
}
],
"actions": []
}
]
}
]
},
{
"actionId": "89a4d97be0d741a94d37ba6c",
"designCode": "designs_workflowRelationAction",
"description": "Get child inspections",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root.attributes_defectsWithInspectionsDefectInspection",
"attributeType": "Link"
}
}
],
"variables": [],
"actions": [
{
"actionId": "8781b85bc73662309f1adde2",
"designCode": "designs_workflowFilterAction",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowFilterActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"dodiCode": "designInterfaces_tasksIdentifier",
"collectionCode": "Live",
"attributes": [
"attributes_itemsTitle",
"attributes_itemsSubtitle"
]
},
"children": [
{
"type": "Or",
"children": [
{
"type": "NotExists",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_tasksIdentifierAssetReferece"
}
}
]
},
{
"type": "NotExists",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_tasksIdentifierTaskLocation"
}
}
]
}
]
}
]
},
"attributeType": "Aqs"
}
}
],
"variables": [],
"actions": [
{
"actionId": "8a53f2d8e25a01d816ee5463",
"designCode": "designs_workflowEditItemAction",
"parameters": [
{
"attributeCode": "attributes_tasksIdentifierAssetReferece",
"value": {
"script": "return assetReference != string.Empty ? assetReference : serviceEnquiryName;"
},
"attributeType": "String"
},
{
"attributeCode": "attributes_tasksIdentifierTaskLocation",
"value": {
"script": "return assetLocation != string.Empty ? assetLocation : serviceEnquiryLocation;"
},
"attributeType": "String"
}
],
"variables": [
{
"name": "assetReference",
"value": {
"outputAction": "8b4ee1b676beba661679fd82",
"itemValue": {
"attributeCode": "attributes_assetsIdentifierAssetReference_8197e4a7753460c08346a499"
},
"outputMode": "Input"
}
},
{
"name": "assetLocation",
"value": {
"outputAction": "8b4ee1b676beba661679fd82",
"itemValue": {
"attributeCode": "attributes_assetsIdentifierAssetLocation_82edf88e903775818e2ec91a"
},
"outputMode": "Input"
}
},
{
"name": "serviceEnquiryName",
"value": {
"inputParent": 2,
"itemValue": {
"attributeCode": "attributes_serviceEnquiriesStreetOrAssetName_8abfd93ce8b2656f7e58eb2a"
}
}
},
{
"name": "serviceEnquiryLocation",
"value": {
"inputParent": 2,
"itemValue": {
"attributeCode": "attributes_serviceEnquiriesLocation_8a194ee1b40474fe3ac7f4eb"
}
}
}
],
"actions": []
}
]
}
]
}
]
}