[jbpm-commits] JBoss JBPM SVN: r2474 - in jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model: op and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Oct 3 08:13:06 EDT 2008


Author: tom.baeyens at jboss.com
Date: 2008-10-03 08:13:06 -0400 (Fri, 03 Oct 2008)
New Revision: 2474

Added:
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java
Removed:
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/IncomingExecutionEvent.java
Modified:
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/MoveToParentNode.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/SignalMessage.java
Log:
rolled back renaming of Signal operation

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java	2008-10-03 11:18:34 UTC (rev 2473)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java	2008-10-03 12:13:06 UTC (rev 2474)
@@ -49,7 +49,7 @@
 import org.jbpm.pvm.internal.model.op.MoveToChildNode;
 import org.jbpm.pvm.internal.model.op.MoveToParentNode;
 import org.jbpm.pvm.internal.model.op.ProceedToDestination;
-import org.jbpm.pvm.internal.model.op.IncomingExecutionEvent;
+import org.jbpm.pvm.internal.model.op.Signal;
 import org.jbpm.pvm.internal.model.op.TakeTransition;
 import org.jbpm.pvm.internal.type.Converter;
 import org.jbpm.pvm.internal.type.Type;
@@ -378,7 +378,7 @@
   public void signal(String signal, Map<String, Object> parameters) {
     checkLock();
     if (node!=null) {
-      performAtomicOperation(new IncomingExecutionEvent(signal, parameters, node));
+      performAtomicOperation(new Signal(signal, parameters, node));
     } else if (transition!=null) {
       performAtomicOperation(ExecutionImpl.PROCEED_TO_DESTINATION);
     } else {

Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/IncomingExecutionEvent.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/IncomingExecutionEvent.java	2008-10-03 11:18:34 UTC (rev 2473)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/IncomingExecutionEvent.java	2008-10-03 12:13:06 UTC (rev 2474)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.model.op;
-
-import java.util.Map;
-
-import org.jbpm.pvm.PvmException;
-import org.jbpm.pvm.activity.ExternalActivity;
-import org.jbpm.pvm.internal.job.MessageImpl;
-import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
-import org.jbpm.pvm.internal.model.NodeImpl;
-import org.jbpm.pvm.internal.model.ExecutionImpl.Propagation;
-
-/**
- * @author Tom Baeyens
- */
-public class IncomingExecutionEvent implements AtomicOperation {
-
-  private static final Log log = Log.getLog(IncomingExecutionEvent.class.getName());
-
-  String signalName;
-  Map<String, Object> parameters;
-  NodeImpl node;
-
-  public IncomingExecutionEvent(String signalName, Map<String, Object> parameters, NodeImpl node) {
-    this.signalName = signalName;
-    this.parameters = parameters;
-    this.node = node;
-  }
-
-  public boolean isAsync(ExecutionImpl execution) {
-    return execution.getNode().isSignalAsync();
-  }
-
-  public void perform(ExecutionImpl execution) {
-    if (execution.getName()!=null) {
-      log.debug(execution.toString()+" signals "+node);
-    } else {
-      log.debug("signalling "+node+", signal="+signalName);
-    }
-
-    ExternalActivity externalActivity = (ExternalActivity) node.getBehaviour();
-    
-    try {
-      execution.setPropagation(Propagation.UNSPECIFIED);
-      externalActivity.signal(execution, signalName, parameters);
-
-    } catch (RuntimeException e) {
-      throw e;
-      
-    } catch (Exception e) {
-      throw new PvmException("couldn't signal "+node+": "+e.getMessage(), e);
-    }
-
-    if (execution.getPropagation() == Propagation.UNSPECIFIED) {
-      execution.proceed();
-    }
-  }
-  
-  public String toString() {
-    return "signal(node)";
-  }
-
-  public MessageImpl<?> createAsyncMessage(ExecutionImpl execution) {
-    return new SignalMessage(execution, signalName, node);
-  }
-}

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/MoveToParentNode.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/MoveToParentNode.java	2008-10-03 11:18:34 UTC (rev 2473)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/MoveToParentNode.java	2008-10-03 12:13:06 UTC (rev 2474)
@@ -39,7 +39,7 @@
     // (so that the call to moveTo updates the previous node) 
     propagatingExecution.setNode(node);
     propagatingExecution.moveTo(parentNode);
-    propagatingExecution.performAtomicOperation(new IncomingExecutionEvent(null, null, parentNode));
+    propagatingExecution.performAtomicOperation(new Signal(null, null, parentNode));
   }
 
   public MessageImpl<?> createAsyncMessage(ExecutionImpl execution) {

Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java (from rev 2471, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/IncomingExecutionEvent.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java	                        (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/Signal.java	2008-10-03 12:13:06 UTC (rev 2474)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.model.op;
+
+import java.util.Map;
+
+import org.jbpm.pvm.PvmException;
+import org.jbpm.pvm.activity.ExternalActivity;
+import org.jbpm.pvm.internal.job.MessageImpl;
+import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.internal.model.NodeImpl;
+import org.jbpm.pvm.internal.model.ExecutionImpl.Propagation;
+
+/**
+ * @author Tom Baeyens
+ */
+public class Signal implements AtomicOperation {
+
+  private static final Log log = Log.getLog(Signal.class.getName());
+
+  String signalName;
+  Map<String, Object> parameters;
+  NodeImpl node;
+
+  public Signal(String signalName, Map<String, Object> parameters, NodeImpl node) {
+    this.signalName = signalName;
+    this.parameters = parameters;
+    this.node = node;
+  }
+
+  public boolean isAsync(ExecutionImpl execution) {
+    return execution.getNode().isSignalAsync();
+  }
+
+  public void perform(ExecutionImpl execution) {
+    if (execution.getName()!=null) {
+      log.debug(execution.toString()+" signals "+node);
+    } else {
+      log.debug("signalling "+node+", signal="+signalName);
+    }
+
+    ExternalActivity externalActivity = (ExternalActivity) node.getBehaviour();
+    
+    try {
+      execution.setPropagation(Propagation.UNSPECIFIED);
+      externalActivity.signal(execution, signalName, parameters);
+
+    } catch (RuntimeException e) {
+      throw e;
+      
+    } catch (Exception e) {
+      throw new PvmException("couldn't signal "+node+": "+e.getMessage(), e);
+    }
+
+    if (execution.getPropagation() == Propagation.UNSPECIFIED) {
+      execution.proceed();
+    }
+  }
+  
+  public String toString() {
+    return "signal(node)";
+  }
+
+  public MessageImpl<?> createAsyncMessage(ExecutionImpl execution) {
+    return new SignalMessage(execution, signalName, node);
+  }
+}

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/SignalMessage.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/SignalMessage.java	2008-10-03 11:18:34 UTC (rev 2473)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/op/SignalMessage.java	2008-10-03 12:13:06 UTC (rev 2474)
@@ -49,8 +49,8 @@
   public Object execute(Environment environment) throws Exception {
     unlockExecution();
     
-    IncomingExecutionEvent incomingExecutionEvent = new IncomingExecutionEvent(signalName, null, node);
-    execution.performAtomicOperationSync(incomingExecutionEvent);
+    Signal signal = new Signal(signalName, null, node);
+    execution.performAtomicOperationSync(signal);
     
     JobDbSession jobDbSession = environment.get(JobDbSession.class);
     jobDbSession.delete(this);




More information about the jbpm-commits mailing list