◷ Reading Time: 8 minutes

What is Workflow?

Workflow is a special type of flow that can go to many resumable intermediate states (i.e., Waiting, Suspended, etc.) at execution time before it goes to a completed state. This allows external actors to communicate with workflow and pass information as required before the workflow is completed on those intermediate states. A workflow may take a long time to be completed (i.e., long-running business transactions).

To allow an external actor (human or computer system) to communicate with workflow in different stages, FlexRule Runtime uses different types of nodes:

  1. Pause
  2. Tasks (i.e., receive, human, etc.)

In those intermediate states, external actors (human, or system) will be able to communicate with Workflow and navigate based on the workflow model.

When a workflow goes into an intermediate state, the workflow instances will not stay loaded in memory. FlexRule tries to store the context of the instance in some storage and then keeps listening for related incoming events until it receives them. Then the engine will load the workflow instance and resume it from the last step.

A workflow must support long-running processes or business transactions. That means applications must maintain contexts of workflow in different stages of execution (i.e., run or resume). So, execution contexts must be maintained in durable storage, as a workflow may take a long time to be completed. An application should provide the relevant (latest) context to the engine when required in order to continue the Workflow (i.e., Resume).


A Workflow can be suspended temporarily during execution using a Pause step. This will put the Workflow into a Suspended state. Later on, the application can Resume the workflow and it will continue the execution onward.

A workflow can have as many Pause nodes as required. These can be placed between all different types of nodes (e.g., inside loops, after/before database calls, etc.).

Pause node to put the work in temporary state (Suspended)


Tasks are an advanced type of Pause nodes. A task puts the workflow instance in the Waiting state. In this state, the workflow can be awoken by receiving a Signal.

Tasks can be:

  1. Sequential: waiting for one signal at a time
  2. Parallel: waiting for multiple signals

Receive Task

The Receive task allows the workflow to be ‘Waiting’ for a signal to be received. That’s the simplest form of the task.


In this use case, a workflow is waiting for one signal at a time. Like any other activity in a flow, you can link multiple Receive Tasks to each other. In this case, the workflow goes into the Waiting state multiple times, but each time one Signal can be received.

Sequential Receive Task


You can use ListenerSplit to listen to multiple signals in parallel. When an associated signal is received, the workflow continues executing that path (i.e., Scope)

Waiting for multiple signals in parallel allows the application to provide options in a particular state. In the above example, the workflow goes to the Waiting state once and will be waiting for each Approve or Reject signal.

Allowing multiple options


A Timeout task allows waiting for a certain amount of time and then the workflow instance will automatically receive a signal to continue the execution.

An example of this is when you want to limit the response time for a Receive Task.

Timeout node must be used in the parallel scopes between Split and Join Listeners.

Timeout limits the amount of time workflow is waiting for either an approved or decline response

Human Task

Human tasks are used in human workflows to define Work and enable the interaction of humans and systems. These automate computerized and non-computerized activities in a workflow. When a workflow reaches the Task node, it can create a WorkItem and Assign it to the participants of the Work.

Human tasks enable the modeling of complex human-driven workflows:

  1. Enabling outcome-driven modeling of a human interaction
  2. Defining the task’s Owner and Participants
  3. Assigning tasks to participants
  4. Setting tasks expiration policy
  5. Delegating tasks
  6. Defining escalation logic
  7. Allowing multi-participant interactions
  8. WorkItems application to allow working on and interaction with assigned tasks

Enabling the interaction of two individuals on publishing content.

To add a new Workflow document,

Document Types --> Business Logic --> Workflow

Once you added a term, this will be the window.

Workflow Properties

  1. Name: Name of the flow
  2. Variable Definition: Define variables to be used in the flow
  3. Types Definition: List of types and functions
  4. Glossaries: Link Business Glossaries and Business Formulas
  5. Swimlanes: Lanes that specify context and actors in a workflow


The toolbox has all the tools from Generic Flow and a number of additional nodes that can be added to the flow.

Complete list of commands
Check the Flow Commands and Workflow Commands for the complete list.

Top Menu

At the top menu, you can see the following items.

  1. Open the related logic document for this node: Open the logic document of a selected node
  2. Create a logic document for selected node: Create a logic document for a selected node
  3. Delete item: Delete a selected item
  4. Highlight the impacts of the selected node: Highlight the impacts of a selected node
  5. Properties: Properties of the page or a node
  6. Variable Parameters: Define/ update/ delete variables
  7. Business Glossary: Link Business glossaries and Business formulas
  8. Overview of entire model: See the entire model
  9. Zooming: Zoom in or zoom out
  10. Export to image: Export the document to an image
  11. Alignments: Align nodes
  12. Resize: Resize selected nodes to a single size
  13. Layout arrangements: Automatically arrange and layout the nodes
  14. Change connections: Change connection styles to straight/ Bezier or Right Angle

Node/ Connection Properties

If you click on a node/ connection, its property window will appear. The properties vary depending on the node type.

Video Description

Download Project

Download the sample Workflow using the attachment.

Check Workflow Lifecycle and Workflow Managers for further information.

Updated on December 7, 2023

Article Attachments

Was this article helpful?

Related Articles