Search code examples
activiti

How to get Outgoing Transition name in Activiti7


Currently i am learning Activiti7. I tried like deploying Process definition,creating instances of process definition etc. but facing problem how i can get outgoing Transitions. in activiti 5 there is PVM claases which was helpful to get outgoingTransitions but in activiti 7 this packages has been removed. so how can i get this?


Solution

  • Ravi, those classes where removed long time ago in Activiti 6 so it sounds like you are a couple of versions behind. Between 2 major versions there are a lot of changes. For that particular task you can use the Activiti 6 way of doing it.

    You can take a look at this test: https://github.com/Activiti/Activiti/blob/c8666252c669d89f2c6d7063e4a89aadf6b73175/activiti-bpmn-converter/src/test/java/org/activiti/editor/language/xml/OtherToolImportConverterTest.java#L14

    which reads from the xml file directly or you can use the repository services to obtain the BpmnModel:

    BpmnModel bpmnModel = repositoryService
                  .getBpmnModel(repositoryService.createProcessDefinitionQuery()
                                .singleResult().getId());
    
    Process process = bpmnModel.getMainProcess();