[jboss-svn-commits] JBL Code SVN: r21220 - labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jul 25 07:13:06 EDT 2008


Author: kevin.conner at jboss.com
Date: 2008-07-25 07:13:06 -0400 (Fri, 25 Jul 2008)
New Revision: 21220

Modified:
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbNotifier.java
Log:
Support originator ReplyTo/FaultTo in jBPM: JBESB-1457

Modified: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbNotifier.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbNotifier.java	2008-07-25 10:20:45 UTC (rev 21219)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbNotifier.java	2008-07-25 11:13:06 UTC (rev 21220)
@@ -75,7 +75,7 @@
     /**
      * Use the replyTo or faultTo EPR from the originator.
      */
-    public String useEPR;
+    public String replyToOriginator;
     
     /**
      * Constructs an ESB Message and sends sends to the an ESB Service
@@ -83,9 +83,9 @@
      */
     public void execute (ExecutionContext executionContext) throws Exception
     {
-        if (useEPR != null) {
-            if (!(Constants.EPR_REPLY.equals(useEPR) || Constants.EPR_FAULT.equals(useEPR))) {
-                throw new ConfigurationException("EPR type (useEPR) must be \"" + Constants.EPR_REPLY + "\" or \"" + Constants.EPR_FAULT + "\"");
+        if (replyToOriginator != null) {
+            if (!(Constants.EPR_REPLY.equals(replyToOriginator) || Constants.EPR_FAULT.equals(replyToOriginator))) {
+                throw new ConfigurationException("EPR type (replyToOriginator) must be \"" + Constants.EPR_REPLY + "\" or \"" + Constants.EPR_FAULT + "\"");
             }
         } else {
             if (null == esbCategoryName) {
@@ -100,13 +100,13 @@
         JBpmObjectMapper mapper = new JBpmObjectMapper();
         Message message = mapper.mapFromJBpmToEsbMessage(bpmToEsbVars, globalProcessScope, executionContext);
         if (logger.isDebugEnabled()) logger.debug("Created ESB message=" + message);
-        if (useEPR != null) {
+        if (replyToOriginator != null) {
             final EPR epr ;
             final ContextInstance contextInstance = executionContext.getContextInstance() ;
             final Object replyToEPR = contextInstance.getVariable(Constants.REPLY_TO);
             final Object faultToEPR = contextInstance.getVariable(Constants.FAULT_TO);
 
-            if (Constants.EPR_FAULT.equals(useEPR) && (faultToEPR != null)) {
+            if (Constants.EPR_FAULT.equals(replyToOriginator) && (faultToEPR != null)) {
                 epr = EPRHelper.fromXMLString(faultToEPR.toString()) ;
             } else if (replyToEPR != null) {
                 epr = EPRHelper.fromXMLString(replyToEPR.toString()) ;




More information about the jboss-svn-commits mailing list