I'm setting the few variables in serviceTask before starting the userTask. On some condition in the flow I want to clear the delegateExecution variables and set the new one's.
Ex : execution.setVariable("name","Jhon");
how do I clear this ?
even If I'm overwriting it I'm only getting the previously set value.
Tried removing the variables with execution.removeVariables() and removeVariablesLocal() but no luck.
Setting variables from within a service-task should just work. Make sure you're using the right scope - setVariableLocal() and setVariable() are different. Local set a variable on the local execution, the latter will set the variable higher in the execution-tree (most of the times, on process-scope).