[jboss-user] [jBPM] - Re: cancel and error end activity throws exception in subprocess [jBPM 4.4]

saig0 do-not-reply at jboss.com
Tue Jun 21 02:32:07 EDT 2011


saig0 [http://community.jboss.org/people/saig0] created the discussion

"Re: cancel and error end activity throws exception in subprocess [jBPM 4.4]"

To view the discussion, visit: http://community.jboss.org/message/611115#611115

--------------------------------------------------------------
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());
    }
 
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/611115#611115]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110621/0e62b105/attachment-0001.html 


More information about the jboss-user mailing list