06-26-2015 11:49 AM
public static void spawnBPMNProcess() {
System.out.println("Started spawnBPMNProcess()");
Authentication.setAuthenticatedUserId("admin");
ProcessEngine processEngine = ProcessEngineConfiguration
.createStandaloneProcessEngineConfiguration()
.buildProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
RuntimeService runtimeService = processEngine.getRuntimeService();
IdentityService identityService = processEngine.getIdentityService();
System.out.println("Referencing BPMN diagram to launch…");
repositoryService.createDeployment()
.addClasspathResource("liveprocess.bpmn20.xml")
.deploy();
Map<String, Object> variableMap = new HashMap<String, Object>();
variableMap.put("clientString", "test_ACP");
identityService.setAuthenticatedUserId("admin");
System.out.println("Launching process…");
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("variableMap", variableMap);
System.out.println("Process Definition ID: " + processInstance.getProcessDefinitionId());
System.out.println("Activiti ID: " + processInstance.getActivityId());
System.out.println("Launch complete!");
}
06-27-2015 05:32 PM
06-29-2015 05:07 AM
06-30-2015 04:14 PM
07-02-2015 10:17 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.