Multipurpose task "Execution"

A distinctive feature of this task is that it can be used to create any other simple one step tasks (1..* parallel tasks of the same type).

A BPMN process, that underlies this task, is constructed as plain as possible to be reused many times over:


                     

                                                                                         


While creating/editing of the task the following parameters are available:

  • Performers’ roles are roles to which the task will be assigned. Before starting the process representatives are selected from chosen roles and parallel tasks are assigned to them
  • “Result options” is a parameter that defines a list of available buttons. The parameter is mandatory if the task type is: wfcp:performTask.
  • Results with a mandatory comment is a list of the task outcomes (separated by commas), during the transition to them from the task, it will be requered to fill in the "Comment" field (otherwise the user will receive a warning).
  • Synchronization Roles-> Business process is a parameter that determines the synchronization of a business process by a change in a role (if assigned persons are changed in the role, they will be changed accordingly in a task/tasks).
  • Synchronization Business Process-> Roles is a parameter that determines the synchronization of the role by a change in a business process (for example, if atask is reassigned to a person not participating in the role, this person will be included in the role).
  • Repeated is a parameter that allows to run a task again, even if it has already been started and completed earlier.
  • Automatic event management is connects a task using an unconditional branch with a previous element of a case (by the time of case's completion) in the same hierarchy level.
  • Manual started allows to start a task manually (a button appears on the "Case process" tab in the "Actions" column).


Form:

                                                                                                    first version#alf#second version#alf#third version



Outcome:

If some internal value is needed + localization (text on the button), then this is implemented as follows:

                                                                                                    first|first version#alf#second|second version

This parameter can be conveniently used to limit the number of buttons that are already set via constraints. That is, if there is the "Approval” task for which the "Confirm, Rework, Reject" completion options, so if we write in this field " Confirm#alf#Reject”, we will remove the "Rework" button (if there is localization for constraints, then it will not be lost with a record in this way).

  • A task type is a parameter that defines a task type. In the drop-down list the wfcp:performTask type and all its heirs are available. For an arbitrary type of a task, we can describe any number of properties / associations, make a non-standard form, and describe the options for completing the task.


An example of the type inherited from  wfcp:performTask

<type name="uniwf:confirmTask">

<parent>wfcp:performTask</parent>

  <overrides>

      <property name="wfcp:performOutcome">

          <constraints>

              <constraint name="uniwf:confirmOutcomeConstraint" type="LIST">

                  <parameter name="allowedValues">

                      <list>

                          <!—Here we merely specified a list of possible completion options-->

                          <value>Confirm</value>

                          <value>Rework</value>

                          <value>Reject</value>

                      </list>

                  </parameter>

              </constraint>

          </constraints>

      </property>

  </overrides>

</type>

The task form

<config evaluator="task-type" condition="uniwf:confirmTask">

  <forms>

      <form id="inline">

          <edit-form template="/ru/citeck/components/form/workflow/case-perform/perform-task-inline.ftl" />

      </form>

  </forms>

</config>


perform-task-inline.ftl is a standard template with a description (task name in case management), a comment field and a result selection buttons. This template describes the logic in work with the "Result options" field and if the template is not used, it will be necessary to modify it when this functionality is required.


  • Interrupt the process with results"” is a parameter that specifies a list of results separated by a comma, when receiving them you should interrupt the parallel process. For example, if there is a task with the results options "Confirm, Rework, Reject", in order to interrupt the process, if one of the parallel performers click "Reject" or "Rework", it is required to write down the following:

Rework,Reject


  • Results with a mandatory comment” is a parameter that determines the list of results separated by commas, when selecting them the performer is obliged to enter a comment. If there is no comment, an error will appear. The format of the field is the same as for "Interrupt the process with results".

All logic for the "Performance" task is rendered in Java classes  CasePerformWorkflowHandler and CasePerformUtils.