Overview
TheUserActionDTO dynamically generates actions on the UI and submits them to the server. The actions can be either form actions or workflow actions.
Form actions relate to product-specific actions, while workflow actions are used to move the workflow. Form actions have UI elements, such as buttons connected to them. For these to be rendered correctly, form actions can’t be removed or added. However, workflow actions are dynamically rendered, so they can be customized. This section refers only to workflow actions.
The UserActionDTO looks as follows:
WorkflowTaskActionDTO inherits all the fields of UserActionDTO and looks as follows:
UserActionInputFieldDTO tells the UI which kind of component to render and looks as follows:
UserActionInputFieldInputType can be one of:
Define the beans
Depending on the type ofWorkflowTaskActionDTO supplied to the UI, it will render a button that on clicking will either:
- Execute an action
- Show a popup for submission and then execute an action
1. Execution only action
The simplest instance of aWorkflowTaskActionDTO looks as follows:
2. Popup with execution action
A more complex instance of aWorkflowTaskActionDTO will specify input fields to be rendered in the UI, updated and submitted to the server.
It can also provide a defaultValue for fields, which will pre-populate the input field in the UI. Example:
Classification and Risk Comment, with the following properties:
Classificationis required, so the form may not be submitted until its value is filled.Risk Commentis not specified as required, so it defaults to false.Classificationhas input typeSELECT, so the options listed will be available in a dropdown.Risk Commenthas input typeTEXT, so a text field will appear requesting input.
Import the beans
Once defined, the beans can then be imported into the Atoti Sign-Off project. A nice convention is to have one@Configuration file per workflow, and to import these into a parent @Configuration.
Then, this one parent @Configuration can be imported to the project.
For example, the out-of-the-box workflow actions are included in WorkflowTaskActionsConfig:
- and the
ProcessDefinitionWorkflowActionsConfigclass contains the actions related to the process definition workflow: