Workflow - advanced concepts, notes
A workflow consists of an orchestrated and repeatable pattern of tasks enabled by the systematic organization of resources into processes that process events, generate events, or process information.It can be depicted as a sequence of tasks (operations), declared as work of an action or independent execution as part of query.
Unlike business workflows, which are driven by data exchanges, activity executions and people interactions, TQL Workflows are purely data driven and is collection of multiple tasks. It has following constructs
Since workflow language defines an acyclic dependency graph and since all dataflow variables are immutable, each process [instance] can be executed only once. As was noted above, dataflow variables (i.e. volatile values) are modeled as a sequence (stream) of immutable values. Repeatable workflows are no exception and represented as process streams where each process instance is a self-contained independent copy of the original workflow [definition] run with specific arguments.
Therefore to start/kill a workflow is to create/destroy a stream of its process instances (all of them, current and future ones). To start/kill a process [instance] is to fulfill that instance start condition (e.g. send an event) or send cancellation/error signal to that instance (e.g. exception).
Workflow – a definition (WDL document) and also a “handle” to a correspondent process stream (if repeatable) such as DfBuffer. (That is, DfChannel and DfBuffer are encapsulations of the dataflow streams which serve as “handles” to them). In other words, workflow is something which can have a WorkflowId (wid)