I want to retrieve some information used in user tasks on a expression in a ExclusiveGateway.
For now, I'm using a ScriptTask to call a local service (A Spring Bean), and set the return as a Process Variable.
<javascript>
var accepted = vFormService.getFormValueAsString(execution.processInstanceId, 'formKey', 'accepted');
execution.setVariable("accepted", accepted);
</javascript>
I use a local form service to handle this data, a custom implementation. I don't use the default FormService from Activiti.
This approach works, but it will be a simplest solution, to call this service from the ExclusiveGateway, like:
<javascript>
#{vFormService.getFormValueAsString(execution.processInstanceId, 'formKey', 'accepted') == 'true'}
</javascript>
I try, but the service is never called, and the default flow is always used.