The business process framework
The business domain
-
Your service domain has logical blocks of business logic that needs to be tied together in a control
flow.
-
Each of these logical blocks can be either automated or manually executed.
-
These logical blocks could be running into transitive errors, waiting for external input etc.
Examples
Let us see how we can logically group several domain's business logic into logical groups and then define
control flow among these groups
Workflow Requirements
-
The workflow definition (graph declaration) is explicit and separate from the business logic
(activities)
implementation.
-
The business logic unit will be retried automatically if they fail.
-
Control flow (transitions) between the business logic units may depend on
previous business logic unit's result.
Workflow architecture
Workflow Concepts
Workflow Definition
-
A workflow definition is the specification of a workflow.
Workflow Activity Definition
-
An activity is the business logic unit that belongs to a workflow definition.
-
The business logic unit/activity is retriable.
-
There are different variants of an activity based on some real world use cases we observe:
- System activity
- External activity
- Condition activity
- Start/Stop activity
Workflow Entity
-
Every workflow instance is tied to an entity. The entity uniquely represents a particular run of a
workflow definition.
-
For example, in the review board workflow, the review board id can be used as the workflow entity.
Workflow Engine
-
This is the brain, the command centre of the workflow framework.
-
Workflow engine manages the lifecycle of the workflow. It maintains a set of workflow definitions which
are passed to it at boot up time
Implementing Workflow
-
Define workflow entity
-
Define workflow definition
-
Define workflow activity definition
-
Create workflow activities
-
Define workflow activity transitions
-
Define workflow activity action results
-
Implement workflow activity actions
-
Implement workflow engine
Code Implementation
Define workflow definition
Define workflow activity definitions
Define workflow activity definitions
Code Gen
Workflow & Activity Definition
Questions
There are 54 unique workflows in production today across 17 multi products!