When I create a model with Activiti Explorer, I am giving to a task a formProperty with an enum that will contain my different ways after an exclusive gateway. To find the correct way, I create a value that is tested just after thanks to the "Flow condition" of the flows after the gateway. What I would like to have is, when I am at a particular task, the name of all the next sequenceFlows, but I can't find how to do it with REST API. Is it possible and how ?
I don't think that is exposed in the REST api. In the Java API, you can inspect the process definition through the org.activiti.bpmn.model.BpmnModel getBpmnModel(String processDefinitionId) method on RepositoryService.
Note that this is not a BPMN 2.0 best practice. The best practice is to have a variable (set when clicking one of the buttons) here and let the task be followed by an exclusive gateway.
Yes, this is my case. I can't attach a .png to show you my diagram (only .txt can be added ??), but several times, after a task I have an exclusive gateway permitting to go to a particular way, according to the value tested by the "flow Condition". So, what I would like is, when I am at the first task before the gateway, to have the different names of all the possible sequenceFlows.