AnsweredAssumed Answered

Access to 'assembled' process definitions

Question asked by mackking-ns on May 16, 2016
Latest reply on May 17, 2016 by mackking-ns

We are currently working on building up a sort of 'wizard' style application that leverages Activiti under the covers to define the steps in the wizard. As a result, we have a number of User Tasks chained together in our Process Definitions, many/all of which are to be completed by a single user (often in quick succession).

START -> User Task 1 -> User Task 2 -> User Task 3 -> Service Task 1 -> Service Task 2 -> END

While we've figured out the steps as far as walking through the process instance(s) and populating/completing the user tasks, we were hoping to be able to retrieve and display the 'steps'  (User Tasks) metadata (name) of the process out of the Process Definition to display alongside the data collection elements rather than having to define them in some parallel location.

We have found the RepositoryService.getBpmnModel() API for retrieving a process's definition but our issue/concern with this method is that the structure (order) of the Processes (via BpmnModel.getMainProcess().getFlowElements()) are in source file order and not reflective of the actual process definition/structure.

Is there an API available whereby we can query a specific Process Definition and retrieve the list/collection/tree of User Tasks in their order as defined within the process? If not solely the User Tasks, is there an API that will return the full Process Definition in it's assembled list/tree structure which we can then walk through ourselves to locate the User Tasks?

Thanks in advance,