ConditionalMandatoryHandler

Description

Before completing a task, the ConditionalMandatoryHandler checks if all mandatory fields that are dependent on other fields in the corresponding form are filled in.

If the mandatory fields are not filled completely, the handler prevents the task from completing. Subsequently, the user is informed to fill in the mandatory fields. The mandatory fields are specified in the field mandatoryFields.


Class

com.dooris.bpm.actionhandler.ConditionalMandatoryHandler

 

Parameter

Parameter name

Default value

Description

Valid examples

Parameter name

Default value

Description

Valid examples

condition

 

The dependency is set here. E.g. condition="${variableA}"=="true"; checks if the variableA has been set. If yes, the variable in the mandatoryFields is mandatory.

  • "${variableB}">="100"

  • "${variableB}"!="${variableC}"

  • "${variableB}"=="${variableA}"

  • "(${count}+1)"=="150"

  • "${varibleA}"=="${variableB}&&100>${count}"

  • "${varibleA}"=="${variableB}||100>${count}"

mandatoryFields

 

Here all condition fields must be specified.

ID_of_form_Field,ID_of_next_form_Field,... (IMPORTANT: no blank space between "," and the ID!)


Example:

In this example, we have a task called ‘Financial approval’ in a part of Purchasing workflow. We configure the actionhandler under this node to make the comment area from the form mandatory if the decision based on the financial_approval parameter is 'No'.

If the decision is chosen as “no”, financial_approval_comment parameter from the form will be mandatory to fill it out.

Parameter

Example Value

Parameter

Example Value

condition

${financial_approval}"=="no"

mandatoryFields

financial_approval_comment