Skip to main content

CYP - Clone Tasks

This workflow is included in the Local Government Essentials - Task Allocation and Types Package package.

Description​

Clones the templated tasks of a group of taskTypes.

Properties​

This workflow has the following properties.

PropertyValue
NameCYP - Clone Tasks
Codeworkflows_cYPCloneTasks_88c2cae133b0a129e8d59af5
TypeWorkflow
ContextPackage
EnabledYes
TagsCauseway
Runs onWorking days and hours only (Both)
Can trigger other workflowsYes (the items it changes and messages it publishes can trigger other workflows)
Log retention30 days

Trigger​

A user triggers this workflow on demand, or another workflow runs it (via an MWR). It works on the items of the design below.

PropertyValue
Workflow typeManual workflow
Applies toItems
Output modeManyItems  (Runs once for all items)
Parameters designParameterDesign - MWR - CYP - Clone Tasks
Output actionThe Clone Item action highlighted in the diagram below

Actions​

This workflow runs 5 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 (264 lines)
{
"trigger": {
"dodiCode": "designInterfaces_items",
"parametersDesignCode": "designs_pdMwrCloneTasks_88c2cae133b0a129e8d59af5",
"outputActionId": "8edfe7193b00ccf29a06cb98",
"outputMode": "ManyItems"
},
"actions": [
{
"actionId": "877a26158a65fe014b0824c8",
"designCode": "designs_workflowOutputAction",
"description": "[WFC] Get parent link",
"parameters": [
{
"attributeCode": "attributes_workflowOutputActionItems",
"value": {
"parameterCode": "attributes_pdMwrCloneTasksParent_8a01f9693ca42ee2fa294d20",
"inputMode": "Each"
},
"attributeType": "Link"
},
{
"attribute": {
"attributeCode": "attributes_workflowOutputActionDodiCode",
"value": "designInterfaces_items",
"attributeType": "String"
}
}
],
"variables": [],
"actions": []
},
{
"actionId": "8edfe7193b00ccf29a06cb98",
"designCode": "designs_workflowCloneItemAction",
"description": "Clone the templated task",
"parameters": [
{
"attributeCode": "attributes_workflowCloneItemActionsParents",
"attributeType": "Link",
"value": {
"parameterCode": "attributes_pdMwrCloneTasksParent_8a01f9693ca42ee2fa294d20",
"inputMode": "Each"
}
},
{
"attribute": {
"attributeCode": "attributes_workflowCloneItemActionsIgnoreReparentOnGraphCode",
"value": "TaskType"
}
},
{
"attributeCode": "attributes_workflowCloneItemActionsParentsLinkAttributeCode",
"attributeType": "String",
"value": {
"parameterCode": "attributes_pdMwrCloneTasksParentAttributeCode_85c17f89d036dc16cfa6be82",
"inputMode": "Each"
}
},
{
"attributeCode": "attributes_tasksPriority",
"attributeType": "Link",
"value": {
"parameterCode": "attributes_pdMwrCloneTasksTaskPriority_839e1d01fd7764f7dae775e5",
"inputMode": "Each"
}
},
{
"attributeCode": "attributes_tasksWithTaskTypesTaskType",
"value": {
"outputAction": "80ea93328c15ad3d2101d9dd",
"outputMode": "Input",
"itemValue": {
"property": "ItemId"
}
},
"attributeType": "Link"
},
{
"attributeCode": "attributes_workflowCloneItemActionItem",
"value": {
"outputAction": "8344dfcfa329df1fffecd731",
"outputMode": "Input",
"itemValue": {
"property": "ItemId"
}
},
"attributeType": "Link"
},
{
"attributeCode": "attributes_tasksRaisedTime",
"value": {
"script": "raisedTimeDate?.Value ?? Now"
},
"attributeType": "DateTime"
},
{
"attributeCode": "attributes_tasksTargetTime",
"value": {
"script": "targetTimeDate?.Value"
},
"attributeType": "DateTime"
},
{
"attributeCode": "attributes_tasksEstimatedStartTime",
"value": {
"script": "return (job_tolerance_days > 0 || job_tolerance_months > 0) ? targetTimeDate?.Value.AddMonths(-(int)job_tolerance_months).AddDays(-(int)job_tolerance_days) : null;"
},
"attributeType": "DateTime"
},
{
"attributeCode": "attributes_tasksEstimatedEndTime",
"value": {
"script": "return (job_tolerance_days > 0 || job_tolerance_months > 0) ? targetTimeDate?.Value.AddMonths((int)job_tolerance_months).AddDays((int)job_tolerance_days) : null;"
},
"attributeType": "DateTime"
},
{
"attributeCode": "attributes_itemsGeometry",
"value": {
"parameterCode": "attributes_pdMwrCloneTasksGeometryMapping_839e1d01fd7764f7dae775e1",
"inputMode": "Each"
},
"attributeType": "GeoJson"
}
],
"variables": [
{
"name": "raisedTimeDate",
"value": {
"parameterCode": "attributes_pdMwrCloneTasksRaisedTimeMapping_8ac2665b87e9da36c0d2d86e",
"inputMode": "Each"
},
"attributeType": "Date"
},
{
"name": "targetTimeDate",
"value": {
"parameterCode": "attributes_pdMwrCloneTasksTargetTimeMapping_8ac2665b87e9da36c0d2d86e",
"inputMode": "Each"
},
"attributeType": "Date"
},
{
"name": "job_tolerance",
"value": {
"parameterCode": "attributes_pdMwrCloneTaskScheduleToleranceMapping_67d7fbb7fb1ac0695857260c",
"inputMode": "Each"
},
"attributeType": "Json"
},
{
"name": "job_tolerance_days",
"value": {
"script": "(double?)(job_tolerance?[\"days\"] ?? 0)"
},
"attributeType": "Number"
},
{
"name": "job_tolerance_months",
"value": {
"script": "(double?)(job_tolerance?[\"months\"] ?? 0)"
},
"attributeType": "Number"
}
],
"actions": []
},
{
"actionId": "68149ca1594f567c7a5332f1",
"designCode": "designs_workflowOutputAction",
"description": "Outputs the TaskType",
"parameters": [
{
"attributeCode": "attributes_workflowOutputActionItems",
"attributeType": "Link",
"value": {
"parameterCode": "attributes_pdMwrCloneTasksTaskTypeMapping_82c4e2a3d30d521b74ddac7c",
"inputMode": "Each"
}
},
{
"attribute": {
"attributeCode": "attributes_workflowOutputActionDodiCode",
"value": "designInterfaces_taskType"
}
},
{
"attribute": {
"attributeCode": "attributes_workflowOutputActionSingleInstance",
"value": false
}
}
],
"variables": [],
"actions": []
},
{
"actionId": "80ea93328c15ad3d2101d9dd",
"designCode": "designs_workflowOutputAction",
"description": "Outputs the TaskType ItemIds",
"parameters": [
{
"attributeCode": "attributes_workflowOutputActionItems",
"attributeType": "Link",
"value": {
"script": "return taskTypeDesignCode == \"designs_taskTypeList_8a63fe9dd1667361be296c4f\" ? taskType : null;"
}
},
{
"attribute": {
"attributeCode": "attributes_workflowOutputActionDodiCode",
"value": "designs_taskTypeList_8a63fe9dd1667361be296c4f"
}
},
{
"attribute": {
"attributeCode": "attributes_workflowOutputActionSingleInstance",
"value": false
}
}
],
"variables": [
{
"name": "taskType",
"value": {
"outputAction": "68149ca1594f567c7a5332f1",
"itemValue": {
"property": "ItemId"
},
"outputMode": "Input"
}
},
{
"name": "taskTypeDesignCode",
"value": {
"outputAction": "68149ca1594f567c7a5332f1",
"itemValue": {
"property": "DesignCode"
},
"outputMode": "Input"
}
}
],
"actions": [
{
"actionId": "8344dfcfa329df1fffecd731",
"designCode": "designs_workflowRelationAction",
"description": "Get the templated task",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowRelationActionsAqsPath",
"value": "root.attributes_taskTypeTemplate"
}
}
],
"variables": [],
"actions": []
}
]
}
]
}