Restrict variables that can be used for user task completion

Hello all,

In my application I have a process that has a number of user tasks. I have also implemented a .NET application that uses camunda api client NuGet package.

So, in order to complete user tasks, I basically use the complete task rest api request.

My issue is that I can submit any variable in the complete request without any control. My app gives the proper variables to be submitted but I would like a mechanism as an extra security measure to ensure that a user task must be completed with (for example) 3 variables (var1, var2, var3)

And if I try to complete the user task with var1, var2 I must get an error. Same for var1, var2, var4.
The only acceptable submission must be var1, var2, var3.

Is this possible?
Thank you!

Hi @konkouts,

as the process engine can handle variables very flexible, there is no built-in way available to check the variables before completing the tasks.

One way to achieve this could be a layer in your external task client implementation.

Here you check the variables that are set in your worker against some specifications, for example variables names given in an extension property, before you call the complete API.

Hope this helps, Ingo

2 Likes