Business key null in the external task

Hi I am using the external tasks to implement the business logic and is separate from the process engine application. So my microservice and process engine are separate systems.

While creating the process instance I have set the business key -
{
“variables”: {
“ttuaJobStatus”: {
“type”: “string”,
“value”: “ACCEPTED”
},
“ttua”: {
“type”: “boolean”,
“value”: “true”
},
“y1564”: {
“type”: “boolean”,
“value”: “false”
}
},
“businessKey”: “60f6cb8dd97ecc0617f03b54”,
“skipCustomListeners”: false,
“skipIoMappings”: false,
“withVariablesInReturn”: false
}

This process calls a subprocess(BPMN) where I declared all for both input and output variables.
But when in the external task of the subprocess I try to access this externalTask.getBusinessKey();
I am getting null.
Is there a way to access the businessKey of the parent process to all the external tasks of the sub processes.

Hello @Arnab_Naha ,

there is a possibility to insert the business key from the parent process to the called process:

I hope this solves your issue.

Jonathan

Hi Jonathan…thanks for your reply!!
I will try that and let you know

1 Like