Chapter 6. Ad hoc and dynamic tasks
You can use case management to carry out tasks in an ad hoc way, rather than following a strict end-to-end process. Tasks can also be added to a case dynamically during run time when required.
Ad hoc tasks are defined in the case modeling phase. Ad hoc tasks that are not configured as Adhoc autostart
are optional and may or may not be worked on during a case. Therefore, they must be triggered by a signal event or by Java API to be available to be worked on during a case.
Dynamic tasks are defined during the case execution and are not present in the case definition model. Dynamic tasks address specific needs that arise during the case. They can be added to the case and worked on at any time using a case application, as demonstrated in the Red Hat Process Automation Manager Showcase application. Dynamic tasks can also be added by Java and Remote API calls.
Dynamic tasks can be user or service activities, while ad hoc tasks can be any type of task.
Dynamic processes are any reusable sub-process from a case project.
Ad hoc nodes with no incoming connections can be configured with the Adhoc autostart
property, which is a property of the node itself. These tasks are triggered automatically when the case instance is started.
6.1. Adding ad hoc tasks
Ad hoc tasks are optional tasks that are configured in a case definition. Because they are ad hoc, they must be triggered in some way, usually by a signal event or Java API call.
Prerequisite
- A case project has been created in Business Central.
- A case definition has been created.
Procedure
-
In the process designer, click
to open the Object Library on the left of the design palette.
From the list, select a task that you want to add to the case definition as an ad hoc task.
For example, you might want to add a user task to fill out a warranty claim if goods that are received are faulty. A warranty claim may or may not need to be completed during the course of the case, but it is available to be performed in an ad hoc way if required.
- Configure the ad hoc task properties in the Properties panel on the right.
-
Trigger the task during run time using a Java API call. For example, the
Order rejected
ad hoc task is triggered by the following API call:CaseService.triggerAdHocFragment