External Task - Process instance - State/Status

Hi All,

I am working on solution which is doing some stuff using external task (c# code).

When the process instance is complete, iComunda always marked the process as COMPLETED. Other state I can see are ACTIVE, INTERNALLY_TERMINATED, COMPLETED from process instance history rest api.

When my external task complete the process with some errors, I want to change this status/state to “COMPLETED WITH ERRORS”.

I am looking at this to see if I can set any variable
https://docs.camunda.org/manual/7.9/reference/rest/external-task/post-complete/

Please advice

Thanks,
Vikas Yadav

Hi Vikas Yadav,

Sure, you could submit a variable on task completion that indicates that the process completed with errors. You can then filter by this variable in the history search. However, it is not possible to change the value of the state field of the historic process instance to an arbitrary value.

Cheers,
Thorben

Thank you Thorben, I did the exactly same way to achieve this.

Regards,
Vikas Yaadav