REST API - Process Definition Variables

Hi all,

Let’s say I have a process that has 2 tasks and a decision gate. Task A, Decision Gate A and Task B.

Task A is an HTTP task which uses variables $TestVar and $TestVar2.
Decision Gate A uses a variable $DecisionVar in an expression to decide which way the flow should go.
Task B uses a variable named $TestVar3

Using the REST API, is there any call I can make that would retrieve me the list of all variables in the process/BPMN model?

Anything along the lines of this?
{
processId: 123xyz
variables: [
TestVar,
TestVar2,
DecisionVar,
TestVar3
]
}

I know there is the following call that will give me everything:

/flowable-task/process-api/repository/process-definitions/{definitionId}/model

And I could potentially parse through everything myself and get a unique list of variables, but I wanted to see if there is a more elegant way.

Also, assuming there is a way to bind / retrieve variables for a particular process definition (before we actually instantiate it), would there be an equivalent POST/PUT call to attach more variables to a specific task?

Or would I have to actually modify the BPMN of the process and inject variables into whichever property is needed?

Thank you in advance! Just trying to have an understanding of what is possible in terms of relationships between variables / process definitions.

No, that’s not possible. Due to the free-form of expressions (complex expressions or expressions that resolve to a java delegate that sets variables), that information is not gathered/exposed.

Thank you for the response!