[jboss-svn-commits] JBL Code SVN: r11614 - 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
Wed May 2 23:23:46 EDT 2007


Author: estebanschifman
Date: 2007-05-02 23:23:46 -0400 (Wed, 02 May 2007)
New Revision: 11614

Modified:
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java
Log:
Handle body.getContent() in esb-jBPM mapping (EsbActionHandler)

Modified: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java	2007-05-03 03:21:45 UTC (rev 11613)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actionhandlers/EsbActionHandler.java	2007-05-03 03:23:46 UTC (rev 11614)
@@ -167,11 +167,16 @@
 		int index = 0;
 		for (String curr: jbpmNames)
 		{
+			String esbKey = esbNames[index++];
 			Object obj	= (global) ? ctxInstance.getVariable(curr)
 					: ctxInstance.getVariable(curr, _token);
 			if (null!=obj)
-				body.add(esbNames[index], obj);
-			index++;
+			{
+				if(Constants.BODY_CONTENT_VARIABLE_NAME.equals(esbKey))
+					body.setContents(obj.toString().getBytes());
+				else
+					body.add(esbKey, obj);
+			}
 		}
 	} //________________________________
 
@@ -213,7 +218,9 @@
 		int index = 0;
 		for (String curr: esbNames)
 		{
-			Object obj	= body.get(curr);
+			Object obj	= (Constants.BODY_CONTENT_VARIABLE_NAME.equals(curr))
+				?body.getContents()
+				:body.get(curr);
 			String jbpmVar = jbpmNames[index];
 			Object oldVal = (global) ? ctxInstance.getVariable(jbpmVar)
 							: ctxInstance.getVariable(jbpmVar,_token);




More information about the jboss-svn-commits mailing list