06-18-2018 01:04 PM
Hi,
I have a process model with a simple start event -> User Task (get 2 inputs) -> Script Task (Validate inputs & and throw exception) -> end task. The script task is to divide the inputs, input1/input2. Say if input2 is 0, rather than getting an divide by zero exception, I would like to throw a BpmnError. The script task that I have is groovy. Please advise how to throw a BpmnError here.
if(execution.getVariable('input2') == 0) {
throw new BpmnError('ERR005ivideByZeroException') // This line doesn't work and throws an error "unable to resolve class BpmnError"
}
Please advise.
11-11-2018 08:16 PM
specify the fully qualified class name: throw new org.activiti.engine.delegate.BpmnError("BusinessExceptionOccurred")
Explore our Alfresco products with the links below. Use labels to filter content by product module.