12-10-2014 03:55 AM
main:
…
mProcessEngine = ProcessEngineConfiguration
.createStandaloneInMemProcessEngineConfiguration().buildProcessEngine();
String ip = "127.0.0.1";
String AutomationProcessId = "scriptProcess";
String fileName = "ScriptProcess.bpmn20.xml";
ProcessInstance processInstance = startProcessInstance( AutomationProcessId, fileName, ip);
mProcessEngine.getRuntimeService().signalEventReceived("signalDone");
public static ProcessInstance startProcessInstance( String processId, String processFile, String clientIp) {
String deploymentId = deployProcessOnEngine(processFile);
Map<String, Object> variableMap = initializeVarMap();
variableMap.put("map_clientIp", clientIp);
ProcessInstance processInstance = mProcessEngine.getRuntimeService().startProcessInstanceByKey( processId, variableMap);
return processInstance;
}
private static String deployProcessOnEngine(String processFilePath){
RepositoryService repositoryService = mProcessEngine.getRepositoryService();
Deployment d = repositoryService.createDeployment()
.addClasspathResource( processFilePath)
.deploy();
return d.getId();
}
private static Map<String,Object> initializeVarMap() {
Map<String, Object> variableMap = new HashMap<String, Object>();
return variableMap;
}
12-11-2014 03:43 AM
12-12-2014 02:47 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.