Toggle menu

Creating Custom Task Workflows

Copy the Workflow Model

Copy the workflow model found in the goss\CaseManagement\Tasks\Boilerplate namespace.

In your copy, update the following sections.

Model Properties

Boilerplate Properties

You should enter a new:

  1. Process Identifier - This will need to be added into your case configuration later
  2. Namespace - For organisation in the modeller
  3. Name - This is used as the labela in history records
  4. Description -The description will be displayed to users in the Self Service and User Requests templates. It can contain process variables tokens using the ## notation. See Editing a Model and Self Service and User Requests - Interacting with Workflow Processes for more information
  5. Candidates - Check that the candidates property includes all of the users groups your task may need to be assigned to

Variables Script Task

Boilerplate Base Variable Script

Update the "base variables" script task. This script task holds all of the configuration for your task and includes the following:

VariableTypeDescription
taskNameStringThe name of your task
taskIdStringThis must match the task ID and namespace of your end points copied earlier
taskHasUserActionsBooleanDefaults to true. If your task has no user actions, set this variable to false.

The workflow follows an alternate path in the event that no user actions (forms) are used throughout the entire model (including your task sub-process), to prevent timing conflicts with the Case Management engine. When the task is configured via Configuration Manager, ensure that it is not set to auto-assign to the case manager if there are no user actions to perform
useInitialFormBooleanThe boilerplate includes a user task before your custom sub process is reached. Set this variable to false to skip this user task.

If set to false but you intend to use user actions elsewhere in your sub process, the workflow message activities and script/end point actions should be copied and attached to your first user action - this will allow the claim/unclaim functionality within the engine to work as expected.

This variable should also be set to false if taskHasUserActions is set to false
taskInitialFormIdStringThe name of the form used by your first user task. This will typically be a copy of the boilerplate task form described in the next section of this document
taskSelfServiceDescriptionStringThis will be visible in the Self Service/User Request templates as the name of the task (typically on the button/link used to claim the task)
closedStatusStringDisplayed in Case Management (eg case history) when the task is closed
cancelledStatusStringDisplayed in Case Management (eg case history) when the task is cancelled

End Point Activity

Boilerplate Data Task

Update this task to call the startTask end point in the copy you created in the previous step. The namespace is goss.CaseManagement.v1.tasks.<taskTypeId>.startTask

Create Your Sub-Process

Boilerplate Sub-Process

Create your sub process in the structure provided. Your sub process must have start and end events, but otherwise there are no limits to what you can design. It is important that you avoid overwriting any process variables reserved for Case Management without careful consideration. A list of these can be found in the Email Template and Task Title Tokens documentation.

Last modified on April 30, 2024

Share this page

Facebook icon Twitter icon email icon

Print

print icon