Form Variables Output of User Task as Process Variables; Why?

When you create a embedded form, the fields output as Process Variables rather than Task variables; why is this the case? Why don’t form field variables remain inside of the Task as Task Scoped Variables?

What is the thinking/logic?

Hi Stephen,

as a process should add value in each step, it is normal that the data will be used in a following task.

Cheers, Ingo

Thanks. Is there any docs that list other situations where the variables are created/executed as process scope rather than task scope?

Thanks!

Hi Stephen,

As a rule of thumb, any API that talks about local variables is going to set variables directly in the scope that is addressed by the operation. Any other API Is going to propagate the variables to the topmost scope. For example, have a look at RuntimeService#setVariableLocal vs. RuntimeService#setVariable.

Cheers,
Thorben

When you say “talks about” is this always going to be in the API name or could it just be in the Docs Description of the API call?

It should be in the name of the method or the parameters. I don’t know all the methods of the top of my head, though, so there may be exceptions. Since this is an API aspect, it should be at least in the Javadocs of the method.

Thanks @thorben and @Ingo_Richtsmeier