The Requea platform embeds a simple workflow engine that can be used for the following tasks:

  • send email notifications. Recipients and content may be calculated based on the current data.
  • request approvals
  • assign tasks to users and notify them.

Workflows run against a workflow definition. Each time a workflow is started, a workflow "instance" is created and linked to the workflow definition.

Warning: For consistency reasons, once a workflow is started, the workflow instance will use the definition at the time of the start. If the workflow definition changes, the changes will be used for future instances only. Existing running instances will continue to follow the definition of the workflow that was valid when the instance was started.

Let's start by a simple example:

Sending EMail to a user

In that case, the workflow has a single step.

In the menu Design / Workflow, you get the list of the workflow definitions and you can create a new one:

Capture8.png

Note : if you want the email to relate to an entity, you must fill the target application property.

The notification step is the following:

Capture6.png

You can select recipients (groups, users, and so on)

  • Predefined: this is a "sysWorkflowAssignee" script where the recipient is calculated based on the target entity ("data")
  • User: A specific user in the database. Not recommended, since you will have to change the workflow if the users leaves. It is recommended to send to a group, event if there is only one person in the group.
  • Group: The EMail will be sent to all users in the group
  • Other: An external email or several external emails, separated by comma (,)

In the message, you can enter the details:

Capture7.png

Create dynamic content (based on the current entity)

Subject and message fields may contain references to the target entity in the form:

${data.rqTitle}

Send to calculated users

You can send the email to a user referenced in a property of the entity by using ${data.xxx}  expressions:

Capture37.png

This works well for simples cases. For more complex cases (multiple entities, complex scripting) you can use Workflow Assignees:

Get the list of workflow assignees by clicking on the URL:

http://localhost:8080/dysoweb/do/sysWorkflowAssignee:list

You can then create / edit Workflow Assignees or Workflow actors based on scripts:

For example:

Capture39.png

In this example, the email will be sent to the assignee, the assignee group if there is one and the serviceAreaDeliveryManagerGroup. (one user, 2 groups). 

Note that the entity attached to the workflow is designed by "data"

When you have defined your workflow assignees (workflow actors), you can use (an reuse) them in the recipient definition:

Capture40.png

Triggering / Starting the workflow

The workflow can be started in an operation (that operation may be called from a user action).

For example:

Capture9.png

In the workflow details:

Capture10.png

The condition script is used to prevent the workflow to start (typically if it has already been started). For example:

data.rqStatus != "sent"
Tags:
Created by Pierre Dubois on 2011/08/01 06:56
     
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 9.11.5 - Documentation