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&...]