12-19-2016 08:04 AM
Hi,
I would like to create one rest endpoint, in which I wanted to pass execution id and based on execution id, I would like fail the execution manually.
Is this possible, to fail execution manually? If yes, the how to do it ?
Thanks,
12-19-2016 11:10 AM
12-21-2016 12:06 AM
Hi Greg,
Thanks for your reply.
My scenario is as below:
I have one workflow which has async job. This async job, actually triggers some another job that is not part of Activiti. Now, when this job gets failed, I would like to notify Activiti that this job gets failed and eventually, I would like to fail the process.
Now, my question is when job (that is not part of Activiti) fails, how could I fail the Activiti process ?
Thanks,
12-21-2016 12:07 PM
Hi Jogin,
I am assuming you are creating a Java Delegate (Service Task) to call outside the workflow engine.
If the external call fails, have your service throw a BpmnError as shown in the following code snippet:
public class Example implements JavaDelegate {
public void execute(DelegateExecution delegateExecution) throws Exception {
try {
/**
*
* My logic
*
*/
} catch(Exception e) {
throw new BpmnError("Error code", e.getMessage());
}
}
}
This way, you can catch the error in your process using an Error Boundary event (make sure the error code you throw matches the boundary error code you are watching for.
Hope this helps,
Greg
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.