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 theIWorkflowTaskActionDelegator. This delegator accepts the submitted WorkflowTaskActionExecutionDTO, then delegates and
executes the task as required.
The submitted DTO
TheWorkflowTaskActionExecutionDTO object looks as follows:
The delegator
TheIWorkflowTaskActionDelegator is a simple delegator that accepts a WorkflowTaskActionExecutionDTO and delegates the work to a backend service. It contains two methods:
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 theICustomWorkflowTaskActionService.
The default delegator
The default delegator is defined in the starter’sDefaultWorkflowTaskActionDelegator. 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 ownIWorkflowTaskActionDelegator.
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 ofICustomWorkflowTaskActionService.
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: