Skip to main content

Overview

Once the task has been submitted on the Atoti Limits UI, the details are sent to the Atoti Limits server, where the action is completed by the IWorkflowTaskActionDelegator. This delegator accepts the submitted WorkflowTaskActionExecutionDTO, then delegates and executes the task as required.

The submitted DTO

The WorkflowTaskActionExecutionDTO object looks as follows:

The delegator

The IWorkflowTaskActionDelegator is a simple delegator that accepts a WorkflowTaskActionExecutionDTO and delegates the work to a backend service. It contains two methods:
The executeTaskActionForTaskActionKey() method accepts the WorkflowTaskActionExecutionDTO and delegates it to a task action based on its taskName. The retrieveWorkflowKey() method is used to retrieve a map of all workflows by their name. The default implementation maps to the limit workflow properties.

Customize the Java tasks

The delegator has a custom implementation defined. This can be overridden if you’re not using the out-of-the-box workflows. Alternatively, you can append custom actions to the default implementation by implementing the ICustomWorkflowTaskActionService.

The default delegator

The default delegator is defined in the starter’s DefaultWorkflowTaskActionDelegator. Take a look to see how the tasks are delegated, but note that the methods of delegation are completely optional to you.

Override the default delegator

To override the delegator, implement your own IWorkflowTaskActionDelegator. Here’s an example of a simple delegator that only logs the action that is executed:

Append to the default delegator

To append to the default delegator, add an implementation of ICustomWorkflowTaskActionService. The ICustomWorkflowTaskActionService has one method which needs to be overridden: executeCustomTask(). This method is responsible for managing how the task is executed in the backend.
If a task key is provided that is not handled, it will eventually be routed to the ICustomWorkflowTaskActionService and the default implementation in the starter will throw an exception:
Here’s an example of a custom comment action:

Import the services

Once the appropriate components/services have been defined, import them to the project using a Spring configuration class.