[jbpm-commits] JBoss JBPM SVN: r6822 - jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes.
do-not-reply at jboss.org
do-not-reply at jboss.org
Sun Nov 14 11:11:03 EST 2010
Author: rebody
Date: 2010-11-14 11:11:03 -0500 (Sun, 14 Nov 2010)
New Revision: 6822
Modified:
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/EndActivity.java
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/EndEventBinding.java
Log:
JBPM-2726 escalation end event
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/EndActivity.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/EndActivity.java 2010-11-14 16:09:15 UTC (rev 6821)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/EndActivity.java 2010-11-14 16:11:03 UTC (rev 6822)
@@ -48,6 +48,8 @@
protected String errorCode = null;
+ protected String escalationCode = null;
+
public void execute(ActivityExecution execution) {
execute((ExecutionImpl)execution);
}
@@ -72,6 +74,8 @@
ExecutionImpl parent = (ExecutionImpl) execution.getParent(); // save parent before it is nullified
if (parent != null && errorCode != null) {
parent.fire(errorCode, (ActivityImpl) activity.getParentActivity());
+ } else if (parent != null && escalationCode != null) {
+ parent.fire(escalationCode, (ActivityImpl) activity.getParentActivity());
} else {
execution.signal();
}
@@ -97,6 +101,10 @@
parent.fire(errorCode, (ActivityImpl) activity.getParentActivity());
}
+ if (parent != null && escalationCode != null) {
+ parent.fire(escalationCode, (ActivityImpl) activity.getParentActivity());
+ }
+
// Special case: if during concurrent execution all child executions are ended,
// then the parent execution must be ended too.
if (parent != null && parent.getExecutions().isEmpty()
@@ -118,4 +126,8 @@
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
+
+ public void setEscalationCode(String escalationCode) {
+ this.escalationCode = escalationCode;
+ }
}
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/EndEventBinding.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/EndEventBinding.java 2010-11-14 16:09:15 UTC (rev 6821)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/EndEventBinding.java 2010-11-14 16:11:03 UTC (rev 6822)
@@ -56,6 +56,11 @@
endActivity.setErrorCode(XmlUtil.attribute(errorEventDefinition, "errorRef"));
}
+ Element escalationEventDefinition = XmlUtil.element(element, "escalationEventDefinition");
+ if (escalationEventDefinition != null) {
+ endActivity.setEscalationCode(XmlUtil.attribute(escalationEventDefinition, "escalationRef"));
+ }
+
return endActivity;
}
More information about the jbpm-commits
mailing list