Skip to content

Add task iteration on Task Context for repeteable tasks #1329

@fjtirado

Description

@fjtirado

For this workflow

document:
  dsl: 1.0.0-alpha5
  namespace: example
  name: SwitchLoopWait
  version: 0.1.0
do:
  - inc:
     set:
        count: ${.count+1}
     then: looping
  - looping:
       switch:
         - loopCount:
             when: .count < ($workflow.input.maxCount // 10000)
             then: waitABit
         - default:
             then: exit
  - waitABit:
       wait:
         milliseconds: 1000
       then: inc

The looping task is repeteable, meaning that task events for the same position and status combination might be triggered more than once.
It would be nice to be able to distinguish different executions of that task. One possible solution is to add an iteration property to TaskContext

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions