yWorkflow Documentation

yWorkflow Concepts

Workflow Definition The static blueprint or template of a workflowDefinition. It describes the states, transitions, and logic that govern the workflowDefinition’s behavior. It is designed once and can be used to create many workflowDefinition instances.

Workflow Instance A single, running execution of a workflowDefinition definition. Each instance has its own state, data (attributes), and execution history. It represents one specific process moving through the defined workflowDefinition.

State A fundamental component of a workflowDefinition. Each state defines a set of available transitions. A workflowDefinition can be in one or more states at the same time.

Transition The mechanism for moving between states within a workflowDefinition. The available transitions at any given moment are defined by the workflowDefinition’s current active state(s) and the conditions associated with them (a condition could prevent callers other than the owner to access it).

Initial-Transition A special kind of transition used to start a workflowDefinition (i.e. create a workflowDefinition instance).

Active State The state or states that a workflowDefinition is currently in. If a workflowDefinition is active, it will have one or more active states. The available transitions for the workflowDefinition are determined by combining the transitions from all of its active states.

Result The outcome of executing a transition. A result can either loop back to its own state or specify a split to activate multiple new states. Every transition has one default result and can have zero or more conditional results.

Default Result The fallback outcome of a transition. The default result is executed only when none of the conditions for the conditional results are satisfied.

Conditional Result An outcome of a transition that is only executed if its associated conditions are met. A transition can have multiple conditional results.

Fork A type of result that allows a workflowDefinition to enter multiple states simultaneously. When a fork occurs, all states specified in the fork become active.

Join A mechanism that transitions multiple active states into a single state. A join can have an associated condition, such as requiring all incoming active states to complete their transition before the resulting state is activated.

Attribute Register A piece of custom code designed to load data. This data is then made available within the workflowDefinition as a transient attribute under a specified name.

Transient Attributes A temporary set of data that exists only for the duration of a single workflowDefinition invocation.

Persistent Attributes A set of data that is stored using the instance store, allowing it to persist across different workflowDefinition invocations.

Extensions Construct such as input validators, attribute registers, functions, conditions, and attribute resolvers that can be plugged in at various points of a workflowDefinition . Extensions can be referred by name using the alias field or by class name using the class field in the workflowDefinition descriptor

While a couple of extensions are provided, the intent is for developer to create their own. Additionally, Script Extensions allow for scripts, such as Groovy, to be embedded directly within the workflowDefinition definition itself.

Extension Provider A mechanism for looking up extensions by name or class; One available lookup method is the Java Service Loader.