Open jinyoung opened 6 years ago
다음과 같이 rootProcess 를 연결함.
public JPAProcessInstance(ProcessDefinition procDefinition, String instanceId, Map options) throws Exception {
super(procDefinition, instanceId, options);
if(procDefinition == null){
return;
}
if (instanceId == null && procDefinition != null) {
setNewInstance(true);
setProcessInstanceEntity(new ProcessInstanceEntity());
getProcessInstanceEntity().setName(instanceId);
getProcessInstanceEntity().setDefId(procDefinition.getId());
if (options != null) {
if (options.containsKey("isSubProcess")) {
boolean subProcess = false;
subProcess = options.get("isSubProcess").toString() == "yes" ? true : false;
getProcessInstanceEntity().setSubProcess(subProcess);
}
if(options.containsKey("_rootProcess")){
getProcessInstanceEntity().setRootInstId(Long.parseLong(options.get("_rootProcess").toString()));
}
if(options.containsKey("_dontReturn")){
boolean dontReturn = false;
dontReturn = options.get("_dontReturn").toString() == "false" ? false : true;
getProcessInstanceEntity().setDontReturn(dontReturn);
}
}
}
}
이후, 자식 인스턴스가 부모 인스턴스를 찾는 과정에서 다음과 같은 에러가 나옴.
DefaultProcessInstance.java 의 getInstance 메소드에서...
org.uengine.kernel.UEngineException: There's no cached in-memory process where instanceId = 2
at org.uengine.kernel.DefaultProcessInstance.getInstance(DefaultProcessInstance.java:529) ~[classes/:na]
at org.uengine.kernel.DefaultProcessInstance$$FastClassBySpringCGLIB$$f1b64853.invoke(<generated>) ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.8.RELEASE.jar:4.3.8.RELEASE]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:669) ~[spring-aop-4.3.8.RELEASE.jar:4.3.8.RELEASE]
ptc 에는 인스턴스 아이디 대신 다음과 같은 이름으로 인스턴스가 저장되어있음.
트리 레이아웃 문제