Skip to content

IFS Faliure Event

IFS Failure Event (Validation Failure End Event)

The Workflow process must end with either End Event or Terminate End Event. Terminate End Event represents Failure and End Event represents Success.

IFS Failure Event requires the following input:

  • Locale (mandatory) - The input to specify the language of the Error Message.
  • Message (mandatory) - The input to specify the Error Message required.

For error handling in the BPMN diagram, there is a custom Terminate End Event called ‘IFS Failure Event’. Users can provide the error message that they want to show to the user in case of failure, or they can provide an error code. Below is an image from Workflow Designer for the IFS Failure Event.

Generated XML

The generated XML will contain the following content for this IFS Failure End Event:

<bpmn:endEvent id="EndEvent_10233k2">  
   <bpmn:extensionElements>  
      <camunda:inputOutput>  
         <camunda:inputParameter name="ifsBpaValidationErrorMessages">  
            <camunda:map>  
               <camunda:entry key="en">Error Message</camunda:entry>  
               <camunda:entry key="fr">Message d’erreur</camunda:entry>  
            </camunda:map>  
         </camunda:inputParameter>  
      </camunda:inputOutput>  
      <camunda:executionListener class="com.ifsworld.fnd.bpa.process.validation.IfsBpaFailureEndEventListener" event="end" />  
   </bpmn:extensionElements>  
   <bpmn:incoming>SequenceFlow_08jqyb3</bpmn:incoming>  
   <bpmn:terminateEventDefinition />  
</bpmn:endEvent>

Note about the Error Code and Error Message: Users can provide error messages in multiple languages in the Workflow Designer tool. Users can also use the pre-existing error code by modifying the XML and providing the error code as ‘ifsBpaValidationErrorCode’ shown in the example below. Please note that ‘ifsBpaValidationErrorCode’ and ‘ifsBpaValidationErrorMessages’ are mutually exclusive so if the ‘ifsBpaValidationErrorCode’ is provided in the BPMN XML then ‘ifsBpaValidationErrorMessages’ parameter should not be present.

<bpmn:endEvent id="EndEvent_10233k2">  
   <bpmn:extensionElements>  
      <camunda:inputOutput>  
         <camunda:inputParameter name="ifsBpaValidationErrorCode"> ${errorCode}</camunda:inputParameter>  
      </camunda:inputOutput>  
      <camunda:executionListener class="com.ifsworld.fnd.bpa.process.validation.IfsBpaFailureEndEventListener" event="end" />  
   </bpmn:extensionElements>  
   <bpmn:incoming>SequenceFlow_08jqyb3</bpmn:incoming>  
   <bpmn:terminateEventDefinition />  
</bpmn:endEvent>