@wmfs/tymly-cardscript-plugin
Version:
Plugin which handles interactions to do with Cardscript
55 lines (54 loc) • 1.21 kB
JSON
{
"Comment": "Archives stale running executions",
"version": "1.0",
"StartAt": "FindActive",
"States": {
"FindActive": {
"Type": "Task",
"Parameters": {
"allUsers": true
},
"Resource": "module:listLongRunningTasks",
"ResultPath": "$",
"Next": "Filter"
},
"Filter": {
"Type": "Task",
"Resource": "function:tymly_filterStaleLongRunningTasks",
"ResultPath": "$.toArchive",
"Next": "StopAndArchiveEach"
},
"StopAndArchiveEach": {
"Type": "Map",
"InputPath": "$",
"ItemsPath": "$.toArchive",
"Iterator": {
"StartAt": "Stop",
"States": {
"Stop": {
"Type": "Task",
"Resource": "function:tymly_stopExecution",
"Next": "Archive"
},
"Archive": {
"Type": "Task",
"Resource": "module:archiveExecution",
"Parameters": {
"executionName.$": "$.executionName"
},
"End": true
}
}
},
"End": true
}
},
"restrictions": [
{
"roleId": "$authenticated",
"allows": [
"*"
]
}
]
}