Skip to main content

Workflow

A workflow is a structured sequence of steps or actions that are executed in a predefined order to accomplish a particular task, process, or objective. Workflows are employed to streamline and automate processes, improve efficiency, reduce errors, and ensure consistency in task execution. They provide a visual representation of the entire process, making it easier to understand and manage.

Key Features of Workflow​

  • Fault-Tolerant Execution — Ensures workflows are reliable even if workers crash or restart.

  • Durability — State is persisted in a database (SQLServer) so workflows can resume after failures.

  • Scalability — Supports millions of workflows running in parallel.

  • Event-Driven & Asynchronous — Uses event sourcing to manage workflow progress.

  • Long-Running Workflows — Unlike traditional systems, workflows can run for days, months, or even years.

  • Retries and Compensation — Automatically retries failed activities and supports rollback mechanisms

    OwlGen allows you to build fault-tolerant, scalable, and durable workflows in a distributed system. It leverages Durable Task Framework to run the workflows.

Versioning​

Modifying workflows is a common occurrence throughout the lifespan of an application. There are two methods to modify an active workflow.

The first method is to terminate all currently active workflow instances. Once there are no more active workflow instances running, the existing workflows can be modified without any adverse effects. This approach is typically recommended for local development.

The second method is the "Side by Side" approach. In this method, a new version of the workflow can be created and deployed alongside the previous version. Older versions of the workflow can continue to run to completion, while all new requests use the latest version of the workflow. This approach is typically recommended for production deployments.

Workflow Constraints​

Workflows leverage event sourcing to retain local variable state and guarantee reliable execution. The logic in workflow is constrained by the replay behavior of the code. Workflow logic, needs to be deterministic because it will be replayed multiple times and needs to yield the same outcome each time. Example: Approval, Batch renewals etc. Example: for current date time, Current UTC DateTime construct should be used instead of the regular Today() system function.

Workflow Tools​

Workflow center serves as a centralized hub for managing workflows, activities, helper flows and exceptions in an application. It allows the user to view, create, and manage workflow in an application. From left menu, user can click Workflow to view the following.

  • Dashboard

  • Explorer Panel

  • Properties Panel

    Dashboard

    Dashboard contains the following information:

    • Recent Work Flows
  • Recent Activities

  • Recent Helper Flows

    This helps the user to access the recent items quickly and edit as required.

    If a user is accessing the Workflow for the first time, an empty screen with "No Workflows Found" text displays.

    Explorer

    Users can create workflow of an application from explorer panel. The structure of the Explorer panel is as follows:

    | Option | Functionality | | --- | --- | | Search | To search the created workflows, helper flows, activities, etc. | | Workflows | To create and manage a workflow. | | Activities | To create and manage an activity. | | Helper Flows | To create and manage a helper flow. | | Workflow Exceptions | To create and manage exceptions. | | Resources | To add, upload, store, and organize resources, including documents and JSON files, within workflow process. |

    Properties

    • When creating or updating workflows, activities, etc, the properties panel slides up to show the attributes that can be configured for a particular item.
  • The slide up/down button is used to expand and collapse the properties panel as applicable. It also contains Zoom-in, Zoom-out, Auto-align, Undo and Redo options which are useful while creating workflows, activities, and helper flows in the designer canvas.

Create Workflows​

Follow the below steps to create a new workflow:

  1. From the explorer menu, right-click Workflows and select Add Workflow.

  2. In the properties panel, configure the properties as required and then click Save.

    | Property | Description | Comments | | --- | --- | --- | | Name* | A unique identifier for the Workflow. | Starts with a letter, contains only letters, numbers, and underscores, no special characters, at least two characters. | | Description | A brief explanation of the Workflow purpose. | Helps users understand the Workflow functionality. | | Is Active | Specify whether the workflow is active for accessing or not. | Options: Yes (active) or No (inactive). Defaults to Yes. |

Note: An asterisk (*) denotes that the property is mandatory for creating a workflow..

The "Workflow created successfully" message displays upon successful creation.

  1. Whenever a new workflow is created, a v1 version is automatically created.

Create Version​

  1. From the explorer menu, right-click on any created WorkFlow and select Add Version.

  2. In the properties panel, configure the properties as required and then click Save.

    | Property | Description | Comments | | --- | --- | --- | | Name* | A unique identifier for the Workflow version. | Same validations as workflow name. | | Description | A brief explanation of the Workflow version purpose. | Helps users understand the Workflow version functionality. | | Is Active | Specify whether the Workflow version is active for accessing or not. | Options: Yes (active) or No (inactive). Defaults to Yes. |

    1. The workflow designer canvas shows the Start and Stop constructs by default.
  3. From the toolbar, add the required constructs and configure them as required to create a Workflow Version.

  4. Click save to save a Workflow Version. The "Workflow Version created successfully" message displays upon successful creation.

Structure of a Workflow version​

The created workflow version contains the following:

  • Input Params
  • Output Param
  • Variables
  • Exceptions (A base exception is created by default).

Add Input Parameters, Output Parameter and Variables​

Users can add the parameters and variables to a workflow as applicable. To add, follow the below steps:

  1. Right-click the Input Params (or) Output Param (or) Variables and select Add. A pop-up window displays.

  2. Configure the properties as required and then click Save.

    Property Description Comments

    Parameter Name* A unique identifier for the Name.

    What It Supports:

    Starts with a letter (A-Z or a-z)

    Allows letters, digits, and underscores after the first character

    Supports single-character variable names

    Empty trailing characters after the first letter are allowed

    What It Does Not Support:

    Does not start with a letter

    Contains unsupported special characters

    Empty strings are still invalid

    Is Array Specify whether the parameter is an array or not. By default, it is set to No.

    Data Type* Select the data type of the parameter from the drop-down.

    1) For Map Configuration:

    Key Type: Specifies the data type of the map's keys (supports all primitive types).

    Value Type: Defines the data type of the map's values (supports both primitive and complex types).

    Map types are not allowed as value types.

    Is Array (for Value Type): Determines if the value type should be an array.

    Behavior: The Default Value field is NOT visible when Map type is selected.

    2) Default Value Controls:

    Boolean: Dropdown with True and False options.

    String: Textbox for string input.

    Integer, Double, Long: Numeric textbox.

    DateTime:

    Fixed: Displays a calendar for date selection.

    Current: Uses the current date and time.

    Description A brief explanation of the parameter purpose. Helps users understand the parameter functionality.

Note: An asterisk (*) denotes that the property is mandatory for creating a parameter or variable.

The success message displays upon successfully adding a parameter or variable.

Add Exceptions​

Users can add the exceptions to a workflow as applicable. To add, follow the below steps:

  1. Right-click Exceptions and select Add. A pop-up window displays.
  2. Configure the properties as required and click Save.
PropertyDescriptionComments
Name*A unique identifier for the exception.What It Supports:Starts with a letter (A-Z or a-z)Allows letters, digits, and underscores after the first characterSupports single-character variable namesEmpty trailing characters after the first letter are allowedWhat It Does Not Support:Does not start with a letterContains unsupported special charactersEmpty strings are still invalid
Exception*Select the exception from the drop-down.The exceptions created in the Workflow Exceptions folder are available in the drop-down.

Note: An asterisk (*) denotes that the property is mandatory for adding an exception.

Constructs​

The following are the constructs available in a workflow:

Construct
If
Break
Return
Call Activity
Log
Wait For External Event
Current UTC DateTime
WhenAny
Create Anonymous Object
Call Aggregate Function