Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RuntimeEngine runtimeEngine = manager.getRuntimeEngine(EmptyContext.get());
- KieSession ksession = runtimeEngine.getKieSession();
- Map<String, Object> params = new HashMap<>();
- params.put("supplyItem", item);
- ProcessInstance proc;
- try{
- proc = ksession.startProcess("com.example.bpms.simplesupplyitemapproval", params);
- }catch(WorkflowRuntimeException e){
- //Retry once. Starting a process could result in transient error when new users are added to the system.
- proc = ksession.startProcess("com.example.bpms.simplesupplyitemapproval", params);
- }
- System.out.println("Started process:" + proc);
- manager.disposeRuntimeEngine(runtimeEngine);
Advertisement
Add Comment
Please, Sign In to add comment