Back

May 31, 2022

Implementing A Workflow Framework

Overview

  1. Introduction
  2. Use Cases
  3. The Framework

Introduction

TODO

Use Cases

  1. Payment processors
  2. Job application processors

The Framework

We can design a framework using Profile, Stage, Action and MessageContext.

  1. A Profile executes a list of Stage in sequence
  2. A Stage executes a list of Action in sequence
  3. An Action executes the actual logic
  4. A MessageContext is an object instance that is passed from action to action during runtime. It stores details and states of the profile flow.

Profile

Attributes:

  1. Profile Id
  2. Default Profile Id
  3. Description

Consider Profile Id as a product name derived from unique combination of product attributes.

For example, a product can be uniquely identified using :

### Stage Attributes: 1. Stage Id 1. Stage Name 1. Stage Description 1. Stage Order 1. Flow Id I ### Action Attributes: 1. Task Id 1. Task Name 1. Task Description 1. Task Order 1. Stage Id