I’m unable to reproduce the conditions to generate the INTERNALLY_TERMINATED process_instance status. I thought the process depicted on [Terminate Events | docs.camunda.org] would do just that but It actually ends with a process_instance status of “COMPLETED”.
Can someone give me an example of a process that could actually end with the INTERNALLY_TERMINATED status.
Ultimately, I’m trying find a way to distinguish processes that:
Are cancelled → EXTERNALLY_TERMINATED
Reach their normal ending → COMPLETED
End prematurely due to process instance conditions → ??? (INTERNALLY_TERMINATED)
/**
* Return current state of HistoricProcessInstance, following values are recognized during process engine operations:
*
* STATE_ACTIVE - running process instance
* STATE_SUSPENDED - suspended process instances
* STATE_COMPLETED - completed through normal end event
* STATE_EXTERNALLY_TERMINATED - terminated externally, for instance through REST API
* STATE_INTERNALLY_TERMINATED - terminated internally, for instance by terminating boundary event
*/
String getState();
So INTERNALLY_TERMINATED are instances terminated by terminating boundary event.
Terminate end event cause completion of the process instance.
The Error end event is producing INTERNALLY_TERMINATED process instances.
There is no such thing as terminating boundary events, maybe the javadoc needs to be adjusted.
Sorry for the misleading info.
I am unable to receive INTERNALLY_TERMINATED through error end event. find attached files and suggest me…it is still showing completed. c3.txt (4.3 KB)
Please reply to this, and let me know if any other part of the code is needed.Please send me changes apart from the bpmn to be made to produce INTERNALLY TERMINATED status
Why do you need INTERNALLY_TERMINATED status, what is your goal?
The conditionals when the INTERNALLY_TERMINATED is recorded are quite specific.
If you check the example posted by pmessier:
You need parent process with call activity and child process with Error End event.
When you trigger the parent process, the child process will be mark as INTERNALLY_TERMINATED and the parent as COMPLETED.
There is a java delegate code written in my service task, and when there is an error I want the process to terminate and it should show TERMINATED status. So, if it keeps showing COMPLETED , I am not able to ascertain error while giving the history rest call. I am throwing a new bpmnError in from my code which is caught by error boundary event and thereafter it should terminate with error.
Please understand that this forum is a free offering that is community-driven and that Camunda operates on a best effort basis. If you need timely assistance, please consider contacting a Camunda partner for consulting: Partners | Camunda
My goal is to ascertain the actual status of the process, if it is completed then it should show completed and if there is an error it should terminate abruptly. Otherwise by the history call, error is not visible with the completed status.
So if my process is fairly simple and doesn’t contain a subprocess it cannot reach the INTERNALLY_TERMINATED state? I am evaluating Camunda and built this process:
I was surprised to see, that the process ends up with the COMPLETED state regardless if it runs into the End Event or the Error End Event.
That way it’s not possible to identify failed processes when going through the history.