Daily scheduled workflow to generate tasks for Schedules
This workflow is included in the Scheduling package.
Description
Runs every day at 0100 in your timezone finding tasks to be generated against schedulable items and updating the periodicity dates. If manual schedule generation is required, use workflows_generateTasksForSchedules_83daf473e645176dfaff63dd directly.
Properties
This workflow has the following properties.
| Property | Value |
|---|---|
| Name | Daily scheduled workflow to generate tasks for Schedules |
| Code | workflows_schedulerClockForTaskGeneration_83daf473e645176dfaff63dd |
| Type | Workflow |
| Context | Package |
| Enabled | Yes |
| Tags | Causeway |
| Can trigger other workflows | Yes (the items it changes and messages it publishes can trigger other workflows) |
| Log retention | 7 days |
Trigger
The system triggers this workflow on a schedule, rather than in response to item changes.
| Property | Value |
|---|---|
| Workflow type | Schedule workflow (Frequency) |
| Every | 1 day |
| Starting | 2023-07-30 |
Actions
This workflow runs 3 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 (178 lines)
{
"trigger": {
"interval": 1,
"units": "Day",
"start": "2023-07-30T01:00:00.000Z"
},
"actions": [
{
"actionId": "87268702d85f422ee351922f",
"designCode": "designs_updateNextDateForGenerationFrequencies_8706d5205143134c25c4f3b1",
"comments": "Update all generation frequencies next date",
"parameters": [],
"actions": [
{
"actionId": "87268702d85f42aee351944f",
"designCode": "designs_workflowQueryAction",
"comments": "[WFC] - Get the computed date items from the sequential dates design.",
"parameters": [
{
"attribute": {
"attributeCode": "attributes_workflowQueryActionsSingleInstance",
"value": true
}
},
{
"attribute": {
"attributeCode": "attributes_workflowQueryActionsAqsQuery",
"value": {
"type": "Query",
"properties": {
"collectionCode": "Live",
"dodiCode": "designInterfaces_schedule_8bbf2c5dac22df0ab9d7e055",
"parameters": [
{
"name": "startInclusive",
"type": "Date"
},
{
"name": "endExclusive",
"type": "Date"
}
]
},
"children": [
{
"type": "And",
"children": [
{
"type": "GreaterThan",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_periodicityNextDate_8b766935838e7116fb62e7c0",
"path": "root.attributes_scheduleGenerationFrequency_85e3a5bd733c864694ecffbd"
}
},
{
"type": "Date",
"properties": {
"parameterName": "startInclusive"
}
}
],
"properties": {
"inclusive": true
}
},
{
"type": "LessThan",
"children": [
{
"type": "Attribute",
"properties": {
"attributeCode": "attributes_periodicityNextDate_8b766935838e7116fb62e7c0",
"path": "root.attributes_scheduleGenerationFrequency_85e3a5bd733c864694ecffbd"
}
},
{
"type": "Date",
"properties": {
"parameterName": "endExclusive"
}
}
],
"properties": {
"inclusive": false
}
}
]
}
]
}
}
}
],
"variables": [
{
"name": "workflowScheduledTime",
"value": {
"offsetMilliseconds": 0,
"offsetOrigin": "Scheduled"
},
"attributeType": "DateTime"
},
{
"name": "startInclusive",
"value": {
"script": "Date(workflowScheduledTime.Value)"
},
"attributeType": "Date"
},
{
"name": "endExclusive",
"value": {
"script": "Date(workflowScheduledTime.Value.AddDays(1))"
},
"attributeType": "Date"
}
],
"actions": [
{
"actionId": "85328f1a70b402ef8f7e0c51",
"designCode": "designs_generateTasksForSchedules_83daf473e645176dfaff63dd",
"comments": "Generate tasks for schedules with active periodicities within the range",
"parameters": [
{
"attributeCode": "attributes_generateTasksForSchedulesDateRangeStart_800d6f68feb01147ef0d2035",
"value": {
"script": "return Date(generationStart.Value.AddDays(startOffset.Value<double>(\"days\")).AddMonths(startOffset.Value<int>(\"months\")));"
},
"attributeType": "Date"
},
{
"attributeCode": "attributes_generateTasksForSchedulesDateRangeEnd_81c4dd81e998b56ddfe158ab",
"value": {
"script": "return Date(generationStart.Value.AddDays(startOffset.Value<double>(\"days\") + generationPeriod.Value<double>(\"days\")).AddMonths(startOffset.Value<int>(\"months\") + generationPeriod.Value<int>(\"months\")));"
},
"attributeType": "Date"
}
],
"variables": [
{
"name": "generationStart",
"value": {
"outputAction": "87268702d85f42aee351944f",
"itemValue": {
"variableName": "startInclusive"
}
}
},
{
"name": "startOffset",
"value": {
"inputParent": 0,
"itemValue": {
"attributeCode": "attributes_scheduleGenerationPeriodStart_85e3a5ba731c864294ecf358"
}
}
},
{
"name": "generationPeriod",
"value": {
"inputParent": 0,
"itemValue": {
"attributeCode": "attributes_scheduleGenerationPeriodLength_8be3a54d323c874694ecfab2"
}
}
}
],
"actions": []
}
]
}
]
}
]
}