Community

jBPM get outgoing Transition names

created by Sebastian Herbst in jBPM - View the full discussion

Hello,

I'm new to jBPM and still fooling around with some examples. The goal is to integrate jBPM in an existing framework, but until now I'm not able to get the outgoing Transitions of a state.

 

 

 

public class Workflow {    public Workflow(String jpdl_file)    {        // Setup Workflow-Engine        ProcessEngine processEngine = new Configuration().buildProcessEngine();        RepositoryService repositoryService = processEngine.getRepositoryService();        ExecutionService executionService = processEngine.getExecutionService();        // Deploy Workflows/Prozessdiagramm        NewDeployment newDeployment = repositoryService.createDeployment().addResourceFromClasspath(jpdl_file);        String deploymentDbid = newDeployment.deploy();                //Set Rights        Map<String, Object> variables = new HashMap<String, Object>();        variables.put("user", new User());        variables.put("group", new Group());        // Start Workflow        // TODO executionsService nicht über den Namen aufrufen        ProcessInstance processInstance = executionService.startProcessInstanceByKey("testTask", variables);        Execution execution = executionService.findProcessInstanceById(processInstance.getId());    }}

 

 

So far I'm just starting a new ProcessEngine, deploy a given workflow, setup some variables and start an new Instance of the given Workflow.

So for now the Workflow itself isn't so important. At least I just have to know how to get the active node(s) of this wf and its transitions.

 

Thanks and Greetings

Herbst

Reply to this message by going to Community

Start a new discussion in jBPM at Community