Skip to main content

Alloy - Electrical Update Unit (WFC)

This workflow is included in the Street Lighting Package package.

Description​

This workflow has no description.

Properties​

This workflow has the following properties.

PropertyValue
NameAlloy - Electrical Update Unit (WFC)
Codeworkflows_alloyElectricalUpdateUnit_8911a26f7dbaf4d9b76fc0f3
TypeWorkflow
ContextPackage
EnabledYes
Runs onWorking days and hours only (Both)

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.

PropertyValue
Workflow typeEvent workflow
Applies toStreet Lighting UK Electrical Tests
EventsCreate, Edit
CollectionsLive
Attributes listened forattributes_streetLightingUkElectricalTestResult  (Result)
attributes_tasksCompletionTime  (Completion Time)
Output modeManyItems  (Runs once for all items)

Actions​

This workflow runs 12 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 (327 lines)
{
"trigger": {
"dodiCode": "designs_streetLightingUkElectricalTest",
"collections": [
"Live"
],
"events": [
"Create",
"Edit"
],
"attributesListeningFor": [
"attributes_streetLightingUkElectricalTestResult",
"attributes_tasksCompletionTime"
],
"outputMode": "ManyItems"
},
"actions": [
{
"actionId": "8c1afad5563292ca11bf4475",
"designCode": "designs_workflowFilterAction",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowFilterActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"collectionCode": "Live",
"dodiCode": "designs_streetLightingUkElectricalTest"
},
"children": [
{
"type": "And",
"children": [
{
"type": "Equals",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_streetLightingUkElectricalTestResult"
}
},
{
"type": "AlloyId",
"properties": {
"value": [
"5d32fa95d4ba5f1ccc3323e4"
]
}
}
]
}
]
}
]
},
"attributeType": "Aqs"
}
}
],
"variables": [],
"actions": [
{
"actionId": "85ffeaf3de1b72173350ee62",
"designCode": "designs_workflowRelationAction",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root^attributes_tasksAssignableTasks<designs_streetLights>",
"attributeType": "Link"
}
}
],
"variables": [],
"actions": [
{
"actionId": "8a1db1377405b0bb10d85279",
"designCode": "designs_workflowEditItemAction",
"parameters": [
{
"attributeCode": "attributes_streetLightsLastElectricalTestResult_8648bcb7fe9361de0602a018",
"value": {
"inputParent": 1,
"itemValue": {
"attributeCode": "attributes_streetLightingUkElectricalTestResult"
}
},
"attributeType": "Link"
},
{
"attributeCode": "attributes_streetLightsLastElectricalTestDate_8d503513cdc82857d5642672",
"value": {
"script": "return taskCompletionTime.HasValue ? taskCompletionTime.Value : offsetFromNow;"
},
"attributeType": "DateTime"
},
{
"attributeCode": "attributes_streetLightsCableCSA_8212408ee36c175a875becc3",
"value": {
"inputParent": 1,
"itemValue": {
"attributeCode": "attributes_streetLightingUkElectricalTestCircuitConductorCSA"
}
},
"attributeType": "Link"
},
{
"attributeCode": "attributes_streetLightsSupplyType_86eaadfb14e305f43cf5af1a",
"value": {
"inputParent": 1,
"itemValue": {
"attributeCode": "attributes_streetLightingUkElectricalTestSupplyType"
}
},
"attributeType": "Link"
}
],
"variables": [
{
"name": "offsetFromNow",
"value": {
"offsetMilliseconds": 6000
},
"attributeType": "DateTime"
},
{
"name": "taskCompletionTime",
"value": {
"inputParent": 1,
"itemValue": {
"attributeCode": "attributes_tasksCompletionTime"
}
},
"attributeType": "DateTime"
}
],
"actions": [
{
"actionId": "8a1cc88d860d6545a343ceff",
"designCode": "designs_workflowRelationAction",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root.attributes_streetLightingUnitsUnitType",
"attributeType": "Link"
}
}
],
"variables": [],
"actions": []
},
{
"actionId": "8aa18d866e32e940f8ea5d1e",
"designCode": "designs_workflowEditItemAction",
"parameters": [
{
"attributeCode": "attributes_streetLightsNextElectricalTestDate_8018cf0f8153313404a52571",
"value": {
"script": "var lastDate = last_test_date.HasValue ? last_test_date.Value : Now; var freq = cyclic_change_frequency.HasValue ? (int)(cyclic_change_frequency.Value) : 1; return lastDate.AddMonths(freq);"
},
"attributeType": "DateTime"
}
],
"variables": [
{
"name": "last_test_date",
"value": {
"inputParent": 0,
"itemValue": {
"attributeCode": "attributes_streetLightsLastElectricalTestDate_8d503513cdc82857d5642672"
}
}
},
{
"name": "cyclic_change_frequency",
"value": {
"outputAction": "8a1cc88d860d6545a343ceff",
"itemValue": {
"attributeCode": "attributes_streetLightingUnitTypesElectricalTestCycle_8c1f12a72daafb2d3d36b6f8"
},
"outputMode": "Input"
}
}
],
"actions": []
}
]
}
]
}
]
},
{
"actionId": "86222c7a2fbdc14daa8df082",
"designCode": "designs_workflowRelationAction",
"description": "Team Member",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root.attributes_tasksTeamMember",
"attributeType": "Link"
}
}
],
"variables": [],
"actions": [
{
"actionId": "810394abb873c35a29ed7663",
"designCode": "designs_workflowRelationAction",
"description": "Team Member Equipment",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root.attributes_teamMembersMeterNo_8ab962ac4abfae4e7c52296b",
"attributeType": "Link"
}
}
],
"variables": [],
"actions": []
}
]
},
{
"actionId": "84ca7a8535f10c2b7af986de",
"designCode": "designs_workflowEditItemAction",
"parameters": [
{
"attributeCode": "attributes_streetLightingUkElectricalTestTestMeter",
"value": {
"outputAction": "810394abb873c35a29ed7663",
"itemValue": {
"property": "ItemId"
},
"outputMode": "Input"
},
"attributeType": "Link"
}
],
"variables": [],
"actions": [
{
"actionId": "8defa201c3cb3bd055b6779e",
"designCode": "designs_workflowFilterAction",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowFilterActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"attributes": [
"attributes_itemsTitle",
"attributes_itemsSubtitle"
],
"collectionCode": "Live",
"dodiCode": "designs_streetLightingUkElectricalTest"
}
},
"attributeType": "Aqs"
}
}
],
"variables": [],
"actions": [
{
"actionId": "8a98dac396cbd157e66678b6",
"designCode": "designs_workflowEditItemAction",
"parameters": [
{
"attributeCode": "attributes_mayriseStreetLightingUkElectricalTestTestedBy",
"value": {
"outputAction": "86222c7a2fbdc14daa8df082",
"itemValue": {
"attributeCode": "attributes_itemsTitle"
},
"outputMode": "Input"
},
"attributeType": "String"
}
],
"variables": [],
"actions": []
}
]
}
]
},
{
"actionId": "812891d1376af1199dea44c3",
"designCode": "designs_workflowRelationAction",
"description": "Relation to Lantern",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root^attributes_tasksAssignableTasks<designs_streetLights>.attributes_streetLightingAllowsBracketsBrackets.attributes_streetLightingAllowsLanternsLanterns",
"attributeType": "Link"
}
}
],
"variables": [],
"actions": [
{
"actionId": "885cd27cc87e2862480ee097",
"designCode": "designs_workflowEditItemAction",
"parameters": [
{
"attributeCode": "attributes_lanternsLanternCleanedDate",
"attributeType": "DateTime",
"value": {
"offsetMilliseconds": 6000
}
}
],
"variables": [],
"actions": []
}
]
}
]
}