Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt

Use this file to discover all available pages before exploring further.

A UserTask in a bpmn file in its simplest form looks as follows:
<userTask id="simple.initiated" name="INITIATED" activiti:candidateGroups="${approvers}" activiti:candidateUsers="${serviceUser}">
  ...
</userTask>
Here we specify:
  • the ID of the task
  • the name of the task
  • the user roles (candidate groups) who may execute the task, which is managed by Activiti
  • the users (candidate users) who may execute the task
To add a custom workflow action, add the following to your UserTask:
<userTask id="simple.initiated" name="INITIATED" activiti:candidateGroups="${approvers}" activiti:candidateUsers="${serviceUser}">
  <documentation>Initial state of tasks</documentation>
  <extensionElements>
    <activiti:formProperty id="workflowTaskActionBeans" type="enum">
      <activiti:value id="aBeanNameToMatch" name="an action name"/>
      <activiti:value id="approveWorkflowAction" name="approve"/>
      <activiti:value id="rejectWorkflowAction" name="reject"/>
      <activiti:value id="rollbackWorkflowAction" name="rollback"/>
      <activiti:value id="requestAdjustmentDeletionWorkflowAction" name="request adjustment deletion"/>
      <activiti:value id="requestAdjustmentWorkflowAction" name="request adjustment"/>
    </activiti:formProperty>
  </extensionElements>
</userTask>
where
  • the formProperty id = workflowTaskActionBeans tells Atoti Sign-Off that it should pick up the contents of this formProperty to resolve one or more Spring Beans.
The id must be workflowTaskActionBeans, otherwise Atoti Sign-Off will not resolve the tasks.This is defined in com.activeviam.signoff.workflow.service.ActivitiService#WORKFLOW_TASK_ACTION_BEANS.
  • the value’s name specifies the name of the Spring Bean Atoti Sign-Off should resolve.
Take care when selecting the name of the Spring Bean. These must be unique for each action and every other Spring Bean in the application. A good naming convention is to prefix/suffix the bean with something unique to the type of bean, for example, ButtonWorkflowAction. Should you need to overwrite an existing bean you may use @Primary.
Now Atoti Sign-Off can find the actions linked to each task. The next step is to define the actions as Spring Beans.