This content has been marked as final.
Show 1 reply
-
1. Re: cancel and error end activity throws exception in subprocess [jBPM 4.4]
saig0 Jun 21, 2011 2:32 AM (in response to saig0)One solution is to change the behavior of class ExecutionImpl to this:
protected void checkActive() { if (!isActive()) { throw new JbpmException(toString() + " is not active: " + state); } else if (this.subProcessInstance != null && !isSubProcessEnded()) { throw new JbpmException(toString() + " has running subprocess: " + this.subProcessInstance.toString() + " in state " + this.subProcessInstance.getState()); } } private boolean isSubProcessEnded() { List<String> endStates = new ArrayList<String>(); endStates.add(Execution.STATE_ENDED); endStates.add("cancel"); endStates.add("error"); return endStates.contains(this.subProcessInstance.getState()); }