Skip to content

Invoking A Workflow

To invoke a Workflow within IFS Cloud the following are required:

Custom Event

To be able to invoke a Workflow, a Custom Event needs to be configured within the system. The information for this can be found in the Custom Event section.

Business Process Automation Configured In Workflow Designer

The Workflow is then required to be set up within the Workflow Designer with the relevant BPMN steps of the Workflow to configure the output that is required. Refer to the Workflow Designer and BPMN sections for more information.

Event Action

A new Event Action Type named “Workflow” has been added to allow the invoking of a Workflow within IFS Cloud, the Event Action then needs to be referenced to the Custom Event that has been created along with providing a description.

Then hit Next:

The Workflow key that is assigned to the Workflow within the Workflow Designer needs to be referenced in the Workflow ID field of the Event Action. The Workflow key is located when you click off of any of the BPMN shapes in the Workspace area and the key is then visible on the Properties Panel. The following example shows the key bpaStateHandling:

Next step of the Event Action creation is to choose the type of Workflow; the different types of Workflow are explained in the Type of Workflow section

  • User Interaction
  • Validation
  • Process Enrichment

There are three different timings relative to the Event Action when a Workflow can be invoked. These timings represent different stages of a transaction, or REST request where the Workflow can be invoked:

Action Name Description
Before If you choose the Before timing option, the Workflow that is executed starts within the same transaction. The Before timing means that the Workflow will be attempted to be invoked before the main REST call. Workflows registered with a Before timing are particularly useful when altering, or adding, data prior to the main call being executed.
After If you choose the After timing option, the Workflow that is executed starts within the same transaction. The After timing means that the Workflow will be invoked on completion of the main REST call as a reaction. This allows the data within the transaction to be changed before the completion of the transaction but after the main logic of the projection has executed.
Asynchronous Asynchronous Workflows can only be used to perform Process Enrichment activities and allow functions such as Background Jobs that are on a scheduled routine to be ran without waiting for a response from the server. Workflows configured using the Asynchronous timing option are logged for execution within the same transaction and each asynchronous Workflow is then executed in a separate transaction. An example of asynchronous execution is the sending of an email; in this case program execution will log the intent to send emails and continue execution while the actual sending of the emails will happen in the future within a second transaction.

Once the Event Action has been enabled, then the Workflow is ready to be tested to ensure it works as expected.