10-21-2010 12:27 PM
10-22-2010 10:33 AM
diff -r 7afd0f3dfc29 modules/activiti-engine/src/main/java/org/activiti/engine/RuntimeService.java
— a/modules/activiti-engine/src/main/java/org/activiti/engine/RuntimeService.java Tue Oct 19 08:47:15 2010 -0400
+++ b/modules/activiti-engine/src/main/java/org/activiti/engine/RuntimeService.java Fri Oct 22 10:22:54 2010 -0400
@@ -168,6 +168,14 @@
*/
void signal(String executionId);
+ /** Sends an external message to an activity instance that is waiting inside the given execution.
+ * @param executionId id of execution to signal, cannot be null.
+ * @param signalName the name identifying the signal. May be null
+ * @param message the message being delivered to activity instance
+ * @throws ActivitiException when no execution is found for the given executionId.
+ */
+ void signal(String executionId, String signalName, Object message);
+
/** Find variables for an execution.
* @param executionId id of execution, cannot be null.
* @throws ActivitiException when no execution is found for the given executionId.
diff -r 7afd0f3dfc29 modules/activiti-engine/src/main/java/org/activiti/engine/impl/RuntimeServiceImpl.java
— a/modules/activiti-engine/src/main/java/org/activiti/engine/impl/RuntimeServiceImpl.java Tue Oct 19 08:47:15 2010 -0400
+++ b/modules/activiti-engine/src/main/java/org/activiti/engine/impl/RuntimeServiceImpl.java Fri Oct 22 10:22:54 2010 -0400
@@ -99,6 +99,10 @@
commandExecutor.execute(new SignalCmd(activityInstanceId, null, null));
}
+ public void signal(String activityInstanceId, String signalName, Object message) {
+ commandExecutor.execute(new SignalCmd(activityInstanceId, signalName, message));
+ }
+
public ProcessInstanceQuery createProcessInstanceQuery() {
return new ProcessInstanceQueryImpl(commandExecutor);
}
diff -r 7afd0f3dfc29 modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/ReceiveTaskActivity.java
— a/modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/ReceiveTaskActivity.java Tue Oct 19 08:47:15 2010 -0400
+++ b/modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/ReceiveTaskActivity.java Fri Oct 22 10:22:54 2010 -0400
@@ -27,12 +27,21 @@
*/
public class ReceiveTaskActivity extends TaskActivity {
+ private Object dataOutput = null;
+
public void execute(ActivityExecution execution) throws Exception {
// Do nothing: waitstate behavior
}
public void signal(ActivityExecution execution, String signalName, Object data) throws Exception {
+ this.dataOutput = data;
leave(execution);
}
-
+
+ /**
+ * @return the dataOutput of the receiveTask (if any)
+ */
+ public Object getDataOutput() {
+ return dataOutput;
+ }
}
10-25-2010 09:05 AM
Farrukh: whats the use case ? What would you be passing ?
Note that the current impl of the receive task is just a wait state.
Specifically, what I need help from someone is what needs to be done to lookup the dataOutput of the task when evaluating the conditionExpression on the outgoing sequenceFlows.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.