2024 October Release

ProcessesPermanent link for this heading

BPMN process diagrams are used to model business processes which can be directly executed. Aside from predefined BPMN processes, ad hoc processes can be started whenever they are needed.

Useful for the Following Tasks

  • Modeling processes in a straight-forward and graphical way
  • Tailoring processes to the requirements of your organization
  • Involving several departments in the processing of business objects
  • Traceable approving and releasing of documents
  • Sequential or parallel execution of activities
  • Using ad-hoc processes

Essential information about processes can be found in the user help:

https://help.cloud.fabasoft.com/index.php?topic=doc/User-Help-Fabasoft-Cloud-eng/workflow.htm: new window

ScenarioPermanent link for this heading

Objective

The “Legal Services” department may only release contracts that are approved by the head of department. The “Sales” department should be informed about each approved contract.

To achieve the objective, proceed as follows:

  • It is assumed that the contract is a Word document extended by a user-defined form that provides a Responsible User field (Standard Objects, Allowed Standard Objects: “User”).
  • In addition, an organizational structure has to be available (your organization > Membership > Organizational Structure) that defines the “Legal Services” and “Sales” departments (members and a head).
  • Navigate to “Templates and Presettings” > “Process Collections” > “your desired process collection”.
  • Define a BPMN process.
  • Add a “Pool” and set the Is Executable option to “Yes” (properties of the pool).
  • Restrict Applicable for (properties of the pool) to the category of the user-defined form. This way, the properties of the form are available for modeling the process.
  • Define one lane for “Legal Services”. For Abstract Participant, select “Role by Property of the Object”. For Property, select the Responsible User property as defined by the form. As Position, select “Head”. This way, the “Legal Services” department will be evaluated because the responsible user is a member of this department. The “Head” is the head of the “Legal Services” department who will receive the activity.
  • Define one lane for “Sales”. As Organizational Unit, select the “Sales” department. This way all members of the “Sales” department receive the “Take Note” activity.
  • Add a “Start Event”, then a task, then an exclusive gateway (not approved: the process ends; approved: “Sales” receives the “Take Note” activity).
    • Select the “Approve” activity as the first task. The participant is taken from the lane.
    • Exclusive gateway:
      • “Not Approved” sequence flow
        Define the Condition Type “Default Flow”.
      • “Approved” sequence flow
        Open the condition editor and select “Approve” in the Last Signature Type field (“Signatures” tab).
    • Select “Take Note” activity for the second task (“Approved” sequence flow). The participant is taken from the lane.

Processes can be started the following way:

  • Manually, by executing the “Tools” > “Start New Process” context menu command on the corresponding object.
  • Categories may define background tasks with a “Start Process” action.
  • An inbox rule can also be used to start a process.

Using Fabasoft app.ducx ExpressionsPermanent link for this heading

Following expressions can be defined in the context of processes.

Note: Using the “Show Overview of app.ducx Expressions” context menu command, you get an overview of all app.ducx expressions defined in the process and, if applicable, in the subprocesses. This facilitates troubleshooting in particular.

Process ElementsPermanent link for this heading

The following expressions are available in the context of process elements.

Expression When Completing the Activity

Defines a Fabasoft app.ducx expression that is executed when the activity is completed (see also COOWF@1.1:wfcompleteexpression: new window).

To define the expression, double-click a task and switch to the “Extended” tab.

Example

// the object on which the process runs and the current activity are
//
available in the local scope
// the processing state of the object will be set
object.ObjectLock(true, true);

object.FSCFOLIO@1.1001:bostate = #FSCFOLIO@1.1001:StateToVerify;

// another process will be started based on a
// BPMN process diagram (e.g. COO.1.506.2.3642)

// the process instance
will be stored as global process parameter
COOWF@1.1:ProcessInstance @instance =
  object.COOWF@1.1:StartProcessDiagram(COO.1.506.2.3642);
process.COOWF@1.1:SetProcessParameter("proc1", @instance);

// the previously started process can be conditionally terminated in a
// following activity

if (object.FSCFOLIO@1.1001:bostate == #FSCFOLIO@1.1001:StateDone) {
  COOWF@1.1:ProcessInstance @instance =
    process.COOWF@1.1:GetProcessParameter("proc1");
  @instance.COOWF@1.1:SetProcessTerminated();
}

Execute Expression in Background

The Execute Expression in Background activity can be used to execute an expression in background instead of providing the activity to the user (see also FSCDIAGRAMEDITOR@1.1001:wfbackgroundexpression: new window). The process is not continued until the background task has been executed.

To define the expression, double-click a task and select “Execute Expression in Background” as Activity.

Example

// sends an e-mail to the responsible user
import FSCFOLIO@1.1001;
import LASC_1_1384RELEASEFORMS@1.506;

coouser.SendBackgroundSecure(object.responsibleuser, null, null, "My Subject", "My Body Text");

Loop Condition

Defines a Fabasoft app.ducx expression that is used to evaluate the loop condition of an activity (see also COOWF@1.1:wfwexpression: new window).

To define the expression, select a task and define a Loop Type. Edit the Loop Condition of the task. You can either directly enter a Fabasoft app.ducx expression, or use the search-like editor.

Example

// the loop continues as long as the object has the wrong state
object.FSCFOLIO@1.1001:bostate == #FSCFOLIO@1.1001:StateToVerify;

Path Condition

Defines a Fabasoft app.ducx expression that is used to evaluate whether a gateway path should be followed (see also COOWF@1.1:pathcondition: new window).

To define the expression, select a sequence flow and edit the Condition property of the sequence flow. You can either directly enter a Fabasoft app.ducx expression, or use the search-like editor.

Example

// the sequence flow is followed if the process parameter "isprepared"
//
is true
process.COOWF@1.1:GetProcessParameter("isprepared") == true;

Intermediate Conditional Event

Defines a Fabasoft app.ducx expression that stops further processing until the condition is fulfilled (see also FSCDIAGRAMEDITOR@1.1001:eventpropscondition: new window).

To define the expression, select an intermediate conditional event, then edit the Condition property of the intermediate conditional event.

Example

// the process stops until the property has a value
object.HasAttributeValue(cootx, #LASC_1_1384RELEASEFORMS@1.506:responsibleuser);

Process DiagramPermanent link for this heading

The following expressions are available in the context of the process diagram.

Expression for Determining the Visibility

Defines a Fabasoft app.ducx expression that determines whether the process is offered for selection when a process is started (see also COOWF@1.1:wfvisibleexpression: new window).

To define the expression, select the pool and edit the Applicable for property of the pool.

Example

// the process is only visible for starting if the "Responsible User"
//
property (programming name: "responsibleuser") has a value
object.HasAttributeValue(cootx, #LASC_1_1384RELEASEFORMS@1.506:responsibleuser);

Expression for Determining the Usability

Defines a Fabasoft app.ducx expression that determines whether the process can be started. This allows, for example, to check preconditions that must be fulfilled before the process can be started (see also COOWF@1.1:wfprecondexpression: new window). If the preconditions are not fulfilled, an error message is shown.

To define the expression, select the pool and edit the Applicable for property of the pool.

Example

// a customized error is shown if the process is started on an object
//
that is still valid
// to show the generic error message just enter an expression that

//
returns a Boolean value
import COODESK@1.1;
if (object.objvalidto >= coonow){
  coouser.RaiseError(#ErrorGeneric, "The object is still valid.");
}
else {
  true;
}

Expression for Initializations

Defines a Fabasoft app.ducx expression that allows defining common initializations and global process parameters (see also COOWF@1.1:wfinitializationexpression: new window).

To define the expression, select the pool and edit the Initializations property of the pool.

Example

// initially defined process parameters can be read in other process
// expressions
using: process.GetProcessParameter("isprepared");
process.SetProcessParameter("isprepared", true);
process.SetProcessParameter(
"anotherkey", "another value");