Differentiate input parameters and other process variables



I have an external task in my model with few input parameters. Also there can be other process variables during process execution when token reaches my external task.
So now I fetch and lock that external task (with external task client), and I want to get process variables and also (separately) I want to get input parameters of the external task.

As I can see my input parameters are in the variables map of my ExternalTask object, along with other process variables.
Is there a way for me to differentiate between task input variables and other process variables?


Hi @jovankricka,

in the external task worker, you can’t distinguish between process variables and input variables. Both are variables of this scope. You could query the variables explicit with a second REST call. Or, an easy way, is to give the input variables a prefix (e.g. i_myInputVar).

Best regards,


Hello @Philipp_Ossler

Thanks for the quick reply!
My other option was also a prefix.
I am not really sure that I understand how to achieve this by querying variables explicitly, since, as I saw, process variable response does not contain any information on whether variable came from input parameters or just regular process variables.
Can you elaborate more on that option?



Hi @jovankricka,

I think @Philipp_Ossler means that if you query the process variables with a REST call (/process-instance/{id}/variables), you won’t get the input variables of the current external task, because they are local.

Best, Ragnar


Thanks for clarification @Ragnar

I also have one more question related to external task variables.
When I complete my external task by POST to /external-task/{id}/complete, in the body I provide variables.
What is the scope of these variables?
Are they visible inside the whole process instance once the external task is completed?