2017 June Release

Defining parallel activitiesPermanent link for this heading

The Fabasoft Folio Workflow Engine allows you to define processes that are comprised of parallel activities and control elements.

Defining a block of parallel activitiesPermanent link for this heading

Syntax

parallel {
  // Activity definitions or control elements
  ...
}


The parallel keyword is used to define blocks of parallel activities. parallel blocks can be nested within a process block, within control element blocks or within other parallel blocks.

Example

processes APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COOWF@1.1;

  process ApproveOrderWF {
    parallel {
      activity {
        actor {
          pos = Clerk;
          orgunit = OrderProcessing;
        }
        step ApproveOrder required leave {
          execute = ApproveOrder;
        }
        step DenyApproval required leave {
          execute = DenyOrderApproval;
        }
      }
      activity {
        actor {
          pos = DeptManager;
          orgunit = OrderProcessing;
        }
        step ApproveOrder required leave {
          execute = ApproveOrder;
        }
        step DenyApproval required leave {
          execute = DenyOrderApproval;
        }
      }
    }
  }
}


A process can be split at any time using a parallel block. The default behavior when joining parallel process paths is that all parallel activities must be completed before the workflow continues with the next non-parallel activity in the process.

Defining activity sequences within a parallel blockPermanent link for this heading

Syntax

parallel {
  // Activity definitions or control elements
   ...
  sequence {
    // Activity definitions or control elements
    ...
  }
  // Activity definitions or control elements
  ...
}


The sequence keyword is used to define a sequence of activities within a parallel block. It must be followed by a block defining the sequence of activity definitions and control elements within a path of a parallel block. A sequence block can also contain another parallel block for splitting the current process path.

Example

processes APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COOWF@1.1;

  process ApproveOrderWF {
    parallel {
      activity {
        actor {
          pos = Clerk;
          orgunit = OrderProcessing;
        }
        step ApproveOrder required leave {
          execute = ApproveOrder;
        }
        step DenyApproval required leave {
          execute = DenyOrderApproval;
        }
      }
      sequence {
        activity {
          actor {
            pos = DeptSecretary;
            orgunit = OrderProcessing;
          }
          step ApproveOrder required leave {
            execute = ApproveOrder;
          }
          step DenyApproval required leave {
            execute = DenyOrderApproval;
          }
        }
        if (object.preapproved) {
          activity {
            actor {
              pos = DeptManager;
              orgunit = OrderProcessing;
            }
            step ApproveOrder required leave {
              execute = ApproveOrder;
            }
            step DenyApproval required leave {
              execute = DenyOrderApproval;
            }
          }
        }
      }
    }
  }
}