[jboss-user] [jBPM] - Re: [jBPM4.4] custom activity has an end time before this activity is leaveds the activity

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


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

"Re: [jBPM4.4] custom activity has an end time before this activity is leaveds the activity"

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

--------------------------------------------------------------
A solution is to change the class UserCodeActivityBehavior:


   public void execute(ActivityExecution execution) throws Exception
    {
        ActivityBehaviour activityBehaviour = (ActivityBehaviour) customActivityReference
                .getObject(execution);
        activityBehaviour.execute(execution);
 
 
        Propagation propagation = ((ExecutionImpl) execution).getPropagation();
        if (propagation.equals(Propagation.WAIT))
            ((ExecutionImpl) execution).historyActivityStart();
        else
            ((ExecutionImpl) execution).historyAutomatic();
    }
 
 
    public void signal(ActivityExecution execution, String signalName, Map<String, ?> parameters)
            throws Exception
    {
        ExternalActivityBehaviour externalActivityBehaviour = (ExternalActivityBehaviour) customActivityReference
                .getObject(execution);
        externalActivityBehaviour.signal(execution, signalName, parameters);
 
 
        TransitionImpl transition = ((ExecutionImpl) execution).getTransition();
        if (transition != null)
            ((ExecutionImpl) execution).historyActivityEnd(transition.getName());
        else
            ((ExecutionImpl) execution).historyActivityEnd();
    }
 
--------------------------------------------------------------

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

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/32f5c4a4/attachment.html 


More information about the jboss-user mailing list