02-15-2018 01:29 PM
Hello,
According to the user guide, it seems like the execute method in the interface JavaDelegate is supposed to be able to throw an exception (The examples in that area show exactly this).
https://www.activiti.org/userguide/index.html#bpmnJavaServiceTask
The issue I am having with Activiti 6 is that the execute method in the JavaDelegate doesn't allow throwing of exceptions.
https://www.activiti.org/javadocs/6.latest/
It did allow it in Activti 5.x according to the JavaDocs
https://www.activiti.org/javadocs/org/activiti/engine/delegate/JavaDelegate.html
In my implementation of the JavaDelegate, I would like to be able to throw an exception so that I can utilize the "Fail Retry" feature in activiti.
https://www.activiti.org/userguide/index.html#failRetry
Is not being able to throw an exception in the JavaDelegate expected behavior in Activiti 6? If so, is there another way to use this fail retry feature?
Thanks,
J
02-16-2018 03:35 AM
Certainly the test for failRetry is there in the v6 engine - Activiti/JobExecutorFailRetryTest.java at 6.x · Activiti/Activiti · GitHub The delegate that the test uses doesn't actually declare that it throws an exception Activiti/RetryFailingDelegate.java at 6.x · Activiti/Activiti · GitHub so you should be able to use this feature. Are you able to use that test as an example for your scenario?
Explore our Alfresco products with the links below. Use labels to filter content by product module.