Stateful execution

TaskExecutor

The taskExecutor implements the atomic or otherwise stateful execution of a task (as configured in a StateTask).

The implementations have been added to the workflow component with the classes ‘AtomicInternalTaskExecutor’ and ‘NoTransactionTaskExecutor’. The taskElement in the model has a field transactiontype that defines which implementation will be used at runtime:

  • atomicInternal the task will be executed within 1 transaction
  • atomicExternal, aggregateTask, noTransaction the task will be executed without transaction

StateTransitioner

The stateTransitioner encapsulates state transitions. One StateTransitioner class is generated for each flowElement during expansion. It will provide a standard interface for the taskExecutor to change the state of the target element during execution.

This makes it possible to write TaskExecutor classes that can be used for all dataElements in a decoupled way.

StateViewer

The stateViewer encapsulates state querying. One StateViewer class is generated for each flowElement during expansion. It will provide a standard interface for the taskSequencer to query the state of the target element during sequencing.

TaskExecutor will set the interim state and the end or failed state: TaskExecutor

Version

Release Expander version Change
201712 3.2.0 Introduced StateTransitioner and StateViewer classes for encapsulation