How to bring Internally Terminated process instance back to Active state

Somehow the process instance got terminated Internally. Can some one help to bring it back the internally terminated process instance. Is there any way?

we are using Community version(Camunda BPM V7.11.0)

Hi @Thanuja,

You can start your process at any point by using the fluent builder for process instances

https://docs.camunda.org/manual/latest/user-guide/process-engine/process-engine-concepts/#start-a-process-instance-at-any-set-of-activities

Thanks for the Reply.

All the Workflow metadata will be stored in Oracle DB. Is there a way to bring it back to Active State using the Oracle Query.

There are no Active Threads running on the process. Hence It went to Internally terminated state.

Hi @Thanuja,

you can restart a process instance: Process Instance Restart | docs.camunda.org.

Hope this helps, Ingo

1 Like

Hi Ingo,

I am using community Version . It mentioned that Restart feature is only included in the enterprise edition of the Camunda Platform, it is not available in the community edition.

Regards,
Thanuja.

Hi @Thanuja,

a quote from the docs:

Note that these operations are also available via REST: Restart Process Instance and Restart Process Instance (async)

It is available as the REST api is the same in Community and Enterprise version.

Hope this helps, Ingo

Hi Ingo,

Thanks for the solution.

I had tried it. There is no rest API in Community Version which I am using.

Url: http://wfdt-idc09.idc1.level3.com:7187/process-definition/aProcessDefinitionId/restart-async

Reques:
{

“instructions”: [

{

  "type": "startAfterActivity",

  "activityId": "ServiceTask_109ztxj"

}

],

“processInstanceIds”: [

"90871243"

],

“initialVariables” : true,

“skipCustomListeners” : true,

“withoutBusinessKey” : true

}

Response:
{

"timestamp": "2021-05-07T10:42:05Z",

"status": 404,

"error": "Not Found",

"message": "Not Found",

"path": "/process-definition/aProcessDefinitionId/restart-async"

}

Can you suggest what is the next step?

Hi @Thanuja,

which distribution (Tomcat/Wildfly/Spring-boot/Run) do you run?

The ID of your request is wrong: aProcessDefinitionId needs to be replaced with a real value.

Please try a simple API call without parameters in your call: Get Engine Names | docs.camunda.org

Hope this helps, Ingo

Hi Ingo,

which distribution (Tomcat/Wildfly/Spring-boot/Run) do you run? Spring Boot.

Now I replaced aProcessDefinitionId with process instance ID. Same Issue - No Method found.
http://wfdt-idc09.idc1.level3.com:7187/process-definition/90871243/restart-async

I tried with simple API.
http://wfdt-idc09.idc1.level3.com:7187/engine - no method found.

There are some defined rest APIS. Below one works
/process/history/auditLog/90871243

Regards,
Thanuja.

HI Ingo I am trying to start a processinstnce from history DB nut keep getting exception
{
“type”: “InvalidRequestException”,
“message”: “processInstanceIds is empty”
}
engine-rest/process-definition/MYACTUALPROCESDEFID/restart

{
“instructions” : [
{
“type”: “startAfterActivity”,
“activityId”: “Gateway_0eteojq”
}
],
“initialVariables” : true,
“skipCustomListeners” : false,
“withoutBusinessKey” : true,
“historicProcessInstanceQuery”: {
“processDefinitionId”: “MYACTUALPROCESDEFID”,
“processInstanceIds” : [ “MYPROCESSINSTANCEIDs” ],
“processInstanceBusinessKey” : “MYBIZKEY”,
“externallyTerminated” : true
}

}