HWY - Defect created / status updated
This workflow is included in the Highways package.
Description
Handles follow-up automations when Highways Defects are created, based on the investigation decision category.
Properties
This workflow has the following properties.
| Property | Value |
|---|---|
| Name | HWY - Defect created / status updated |
| Code | workflows_hWYDefectCreatedUpdated_684c2fcf1c1e97ba487f7414 |
| Type | Workflow |
| Context | Package |
| Enabled | Yes |
| Can trigger other workflows | Yes (the items it changes and messages it publishes can trigger other workflows) |
| Log retention | 60 days |
Trigger
The system triggers this workflow when items of the design below are created or edited. Where attributes are listed, an edit to anything else is ignored.
| Property | Value |
|---|---|
| Workflow type | Event workflow |
| Applies to | Highways Defects |
| Events | Create, Edit |
| Collections | Live |
| Attributes listened for | attributes_defectsStatus (Status) |
| Output mode | ManyItems (Runs once for all items) |
Actions
This workflow runs 23 actions, in the order shown in this simplified diagram. Select an MWR action to open the workflow it runs. Every action's full settings are in the configuration below.
Configuration
The full configuration of this workflow, including every action's parameters.
Show configuration (769 lines)
{
"trigger": {
"dodiCode": "designInterfaces_highwaysDefects_67dae589b932691ca1967037",
"collections": [
"Live"
],
"events": [
"Create",
"Edit"
],
"attributesListeningFor": [
"attributes_defectsStatus"
],
"outputMode": "ManyItems"
},
"actions": [
{
"actionId": "6888f0f5cc58008859575228",
"designCode": "designs_workflowFilterAction",
"description": "Status is confirmed or no action",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowFilterActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"attributes": [
"attributes_itemsTitle",
"attributes_itemsSubtitle"
],
"collectionCode": "Live",
"dodiCode": "designInterfaces_highwaysDefects_67dae589b932691ca1967037"
},
"children": [
{
"type": "Equals",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_defectsStatus"
}
},
{
"type": "AlloyId",
"properties": {
"value": [
"5c8bdfb98ae862230019dc20",
"5c8bdfe08ae862230019dc24"
]
}
}
]
}
]
},
"attributeType": "Aqs"
}
}
],
"variables": [],
"actions": [
{
"actionId": "6889be3c3b7ecb088ed68299",
"designCode": "designs_workflowRelationAction",
"description": "Get parent highways asset",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root^attributes_defectsAssignableDefects<designInterfaces_highwaysAssets_6763ebe6b8489a077a12cfb0>",
"attributeType": "String"
}
}
],
"variables": [],
"actions": []
},
{
"actionId": "6888f0f5cc58008859575229",
"designCode": "designs_workflowFilterAction",
"description": "No further action outcome",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowFilterActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"attributes": [
"attributes_itemsTitle",
"attributes_itemsSubtitle"
],
"collectionCode": "Live",
"dodiCode": "designInterfaces_highwaysDefects_67dae589b932691ca1967037"
},
"children": [
{
"type": "Equals",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_highwaysDefectDecisionListDefectDecisionCategory_67dafe37b932691ca19672c3",
"path": "root.attributes_highwaysDefectsDefectDecision_67dbbeb5b932691ca1967522"
}
},
{
"type": "AlloyId",
"properties": {
"value": [
"67eaa4c64b272a3931e1ca7e"
]
}
}
]
}
]
},
"attributeType": "Aqs"
}
}
],
"variables": [],
"actions": [
{
"actionId": "6888f0f5cc5800885957522a",
"designCode": "designs_workflowFilterAction",
"description": "Check status isn't already no action required",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowFilterActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"attributes": [
"attributes_itemsTitle",
"attributes_itemsSubtitle"
],
"collectionCode": "Live",
"dodiCode": "designInterfaces_highwaysDefects_67dae589b932691ca1967037"
},
"children": [
{
"type": "NotEquals",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_defectsStatus"
}
},
{
"type": "AlloyId",
"properties": {
"value": [
"5c8bdfe08ae862230019dc24"
]
}
}
]
}
]
},
"attributeType": "Aqs"
}
}
],
"variables": [],
"actions": [
{
"actionId": "6888f0f5cc5800885957522b",
"designCode": "designs_workflowEditItemAction",
"description": "Override to correct status of No action required",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_defectsStatus",
"value": [
"5c8bdfe08ae862230019dc24"
],
"attributeType": "Link"
}
}
],
"variables": [],
"actions": []
}
]
}
]
},
{
"actionId": "6888f0f5cc5800885957522c",
"designCode": "designs_workflowFilterAction",
"description": "Raise Inspection outcome",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowFilterActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"attributes": [
"attributes_itemsTitle",
"attributes_itemsSubtitle"
],
"collectionCode": "Live",
"dodiCode": "designInterfaces_highwaysDefects_67dae589b932691ca1967037"
},
"children": [
{
"type": "Equals",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_highwaysDefectDecisionListDefectDecisionCategory_67dafe37b932691ca19672c3",
"path": "root.attributes_highwaysDefectsDefectDecision_67dbbeb5b932691ca1967522"
}
},
{
"type": "AlloyId",
"properties": {
"value": [
"67dc09a3b932691ca1967844"
]
}
}
]
}
]
},
"attributeType": "Aqs"
}
}
],
"variables": [],
"actions": [
{
"actionId": "6888f0f5cc5800885957522d",
"designCode": "designs_workflowRelationAction",
"description": "Get task type",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root.attributes_highwaysDefectsDefectDecision_67dbbeb5b932691ca1967522.attributes_highwaysDefectDecisionListFollowupTaskTypeifRelevant_67eac11f4b272a3931e1d266",
"attributeType": "String"
}
}
],
"variables": [],
"actions": []
},
{
"actionId": "6888f443cc58008859576976",
"designCode": "designs_pdMwrCloneTasks_88c2cae133b0a129e8d59af5",
"description": "Calls the CloneTasks MWR",
"parameters": [
{
"attributeCode": "attributes_pdMwrCloneTasksTaskTypeMapping_82c4e2a3d30d521b74ddac7c",
"value": {
"outputAction": "6888f0f5cc5800885957522d",
"itemValue": {
"property": "ItemId"
},
"outputMode": "Input"
},
"attributeType": "Link"
},
{
"attributeCode": "attributes_pdMwrCloneTasksParent_8a01f9693ca42ee2fa294d20",
"value": {
"outputAction": "6888f0f5cc5800885957522c",
"itemValue": {
"property": "ItemId"
},
"outputMode": "Input"
},
"attributeType": "Link"
},
{
"attributeCode": "attributes_pdMwrCloneTasksTaskPriority_839e1d01fd7764f7dae775e5",
"value": {
"outputAction": "6888f0f5cc5800885957522c",
"itemValue": {
"attributeCode": "attributes_highwaysDefectsDecisionPriority_6851826fd720a5a5f70a4c90"
},
"outputMode": "Input"
},
"attributeType": "Link"
},
{
"attribute": {
"attributeCode": "attributes_pdMwrCloneTasksParentAttributeCode_85c17f89d036dc16cfa6be82",
"value": "attributes_defectsWithInspectionsDefectInspection"
}
}
],
"variables": [],
"actions": [
{
"actionId": "6888f570cc5800885957823c",
"designCode": "designs_workflowEditItemAction",
"description": "Set inspection asset reference and location from parent asset",
"parameters": [
{
"attributeCode": "attributes_tasksIdentifierAssetReferece",
"value": {
"outputAction": "6889be3c3b7ecb088ed68299",
"itemValue": {
"attributeCode": "attributes_assetsIdentifierAssetReference_8197e4a7753460c08346a499"
},
"outputMode": "Input"
},
"attributeType": "String"
},
{
"attributeCode": "attributes_tasksIdentifierTaskLocation",
"value": {
"outputAction": "6889be3c3b7ecb088ed68299",
"itemValue": {
"attributeCode": "attributes_assetsIdentifierAssetLocation_82edf88e903775818e2ec91a"
},
"outputMode": "Input"
},
"attributeType": "String"
}
],
"variables": [],
"actions": []
},
{
"actionId": "68922e0a37429d825db24d83",
"designCode": "designs_workflowOutputAction",
"description": "Go to back to defect",
"parameters": [
{
"attributeCode": "attributes_workflowOutputActionItems",
"attributeType": "Link",
"value": {
"inputParent": 1,
"itemValue": {
"property": "ItemId"
}
}
}
],
"variables": [],
"actions": [
{
"actionId": "6888f4b6cc580088595775c4",
"designCode": "designs_workflowEditItemAction",
"description": "Update defect status to Awaiting Inspection",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_defectsStatus",
"value": [
"5c8bdfb58ae862230019dc1f"
],
"attributeType": "Link"
}
}
],
"variables": [],
"actions": []
}
]
}
]
}
]
},
{
"actionId": "6888f0f5cc58008859575234",
"designCode": "designs_workflowFilterAction",
"description": "Raise job outcome",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowFilterActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"attributes": [
"attributes_itemsTitle",
"attributes_itemsSubtitle"
],
"collectionCode": "Live",
"dodiCode": "designInterfaces_highwaysDefects_67dae589b932691ca1967037"
},
"children": [
{
"type": "And",
"children": [
{
"type": "Equals",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_highwaysDefectDecisionListDefectDecisionCategory_67dafe37b932691ca19672c3",
"path": "root.attributes_highwaysDefectsDefectDecision_67dbbeb5b932691ca1967522"
}
},
{
"type": "AlloyId",
"properties": {
"value": [
"67dc097fb932691ca1967838"
]
}
}
]
},
{
"type": "NotExists",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_defectsRaisingJobsRaisedJobs"
}
}
]
}
]
}
]
},
"attributeType": "Aqs"
}
}
],
"variables": [],
"actions": [
{
"actionId": "6888f0f5cc58008859575235",
"designCode": "designs_pdMwrGenerateTasksFromDefectsWorkToDo_68358f639934228600165ad1",
"description": "Call job creation for Defect Work Items",
"parameters": [],
"variables": [],
"actions": [
{
"actionId": "6888f0f5cc58008859575236",
"designCode": "designs_workflowOutputAction",
"description": "Output the job as a highways job",
"parameters": [
{
"attributeCode": "attributes_workflowOutputActionItems",
"attributeType": "Link",
"value": {
"inputParent": 0,
"itemValue": {
"property": "ItemId"
}
}
},
{
"attribute": {
"attributeCode": "attributes_workflowOutputActionDodiCode",
"value": "designInterfaces_highwaysJobs_67e6472bcb15029b2c49ab4a",
"attributeType": "String"
}
},
{
"attribute": {
"attributeCode": "attributes_workflowOutputActionSingleInstance",
"value": false,
"attributeType": "Boolean"
}
}
],
"variables": [],
"actions": [
{
"actionId": "6888f0f5cc58008859575238",
"designCode": "designs_workflowEditItemAction",
"description": "Set the priority of the created job - triggers target time recalculation",
"parameters": [
{
"attributeCode": "attributes_tasksIdentifierAssetReferece",
"value": {
"outputAction": "6889be3c3b7ecb088ed68299",
"itemValue": {
"attributeCode": "attributes_assetsIdentifierAssetReference_8197e4a7753460c08346a499"
},
"outputMode": "Input"
},
"attributeType": "String"
},
{
"attributeCode": "attributes_tasksIdentifierTaskLocation",
"value": {
"outputAction": "6889be3c3b7ecb088ed68299",
"itemValue": {
"attributeCode": "attributes_assetsIdentifierAssetLocation_82edf88e903775818e2ec91a"
},
"outputMode": "Input"
},
"attributeType": "String"
},
{
"attributeCode": "attributes_tasksPriority",
"attributeType": "Link",
"value": {
"inputParent": 2,
"itemValue": {
"attributeCode": "attributes_highwaysDefectsDecisionPriority_6851826fd720a5a5f70a4c90"
}
}
}
],
"variables": [],
"actions": []
},
{
"actionId": "6892329e37429d825db24d84",
"designCode": "designs_workflowRelationAction",
"description": "Go to the parent defect",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root^attributes_defectsRaisingJobsRaisedJobs<designInterfaces_defects>",
"attributeType": "String"
}
}
],
"variables": [],
"actions": [
{
"actionId": "6888f0f5cc58008859575239",
"designCode": "designs_workflowEditItemAction",
"description": "Set the defect status to job raised",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_defectsStatus",
"value": [
"5c8bdfc18ae862230019dc21"
],
"attributeType": "Link"
}
}
],
"variables": [],
"actions": []
}
]
}
]
}
]
}
]
},
{
"actionId": "6888f0f5cc5800885957523a",
"designCode": "designs_workflowFilterAction",
"description": "Notify external outcome",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowFilterActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"attributes": [
"attributes_itemsTitle",
"attributes_itemsSubtitle"
],
"collectionCode": "Live",
"dodiCode": "designInterfaces_highwaysDefects_67dae589b932691ca1967037"
},
"children": [
{
"type": "Equals",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_highwaysDefectDecisionListDefectDecisionCategory_67dafe37b932691ca19672c3",
"path": "root.attributes_highwaysDefectsDefectDecision_67dbbeb5b932691ca1967522"
}
},
{
"type": "AlloyId",
"properties": {
"value": [
"67eaa3334b272a3931e1c862"
]
}
}
]
}
]
},
"attributeType": "Aqs"
}
}
],
"variables": [],
"actions": [
{
"actionId": "6888f0f5cc5800885957523b",
"designCode": "designs_workflowRunReportAction",
"description": "",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRunReportActionsReportDesignCode",
"value": "designs_itemReports",
"attributeType": "String"
}
},
{
"attributeCode": "attributes_reportsName",
"attributeType": "String",
"value": {
"inputParent": 2,
"itemValue": {
"attributeCode": "attributes_itemsTitle"
}
}
}
],
"variables": [],
"actions": [
{
"actionId": "6888f0f5cc5800885957523c",
"designCode": "designs_workflowRelationAction",
"description": "",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root.attributes_reportsItemsReportedOn<designs_fileReportDocuments>.attributes_fileReportDocumentsFile",
"attributeType": "String"
}
}
],
"variables": [],
"actions": []
}
]
},
{
"actionId": "6888f0f5cc5800885957523d",
"designCode": "designs_workflowRelationAction",
"description": "",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root.attributes_highwaysDefectsDefectDecision_67dbbeb5b932691ca1967522",
"attributeType": "String"
}
}
],
"variables": [],
"actions": []
},
{
"actionId": "6888f0f5cc5800885957523f",
"designCode": "designs_workflowEditItemAction",
"description": "Set the defect status to forwarded",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_defectsStatus",
"value": [
"5c8bdfdb8ae862230019dc23"
],
"attributeType": "Link"
}
}
],
"variables": [],
"actions": []
},
{
"actionId": "6888f7afcc58008859579d42",
"designCode": "designs_workflowMessageAction",
"description": "",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowMessageActionMessageType",
"value": [
"5c66bcd44b4d4259071069de"
],
"attributeType": "Link"
}
},
{
"attribute": {
"attributeCode": "attributes_workflowMessageActionMessageText",
"value": "The Highways Service has raised a defect for your attention. Please see the document attached for details.",
"attributeType": "String"
}
},
{
"attribute": {
"attributeCode": "attributes_workflowMessageActionRecipientName",
"value": "Highways Service Customer",
"attributeType": "String"
}
},
{
"attributeCode": "attributes_workflowMessageActionLinkedItems",
"attributeType": "Link",
"value": {
"inputParent": 0,
"itemValue": {
"property": "ItemId"
}
}
},
{
"attribute": {
"attributeCode": "attributes_workflowMessageActionSingleInstance",
"value": false,
"attributeType": "Boolean"
}
},
{
"attributeCode": "attributes_workflowMessageActionEmailAddress",
"value": {
"outputAction": "6888f0f5cc5800885957523d",
"itemValue": {
"attributeCode": "attributes_highwaysDefectDecisionListEmailToNotifyifRelevant_67eaa6844b272a3931e1ccba"
},
"outputMode": "Input"
},
"attributeType": "String"
},
{
"attribute": {
"attributeCode": "attributes_workflowMessageActionEmailSubject",
"value": "Highways Service Notification",
"attributeType": "String"
}
},
{
"attributeCode": "attributes_workflowMessageActionEmailAttachment",
"value": {
"outputAction": "6888f0f5cc5800885957523c",
"itemValue": {
"property": "ItemId"
},
"outputMode": "Input"
},
"attributeType": "Link"
}
],
"variables": [],
"actions": []
}
]
}
]
}
]
}