[jboss-svn-commits] JBL Code SVN: r20085 - in labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3: processDefinition and 3 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue May 20 11:24:29 EDT 2008


Author: kevin.conner at jboss.com
Date: 2008-05-20 11:24:29 -0400 (Tue, 20 May 2008)
New Revision: 20085

Added:
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb-unfiltered.xml
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/ToCallBackService.groovy
Removed:
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SetupSignal.java
Modified:
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/gpd.xml
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/processimage.jpg
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/readme.txt
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service3.groovy
   labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/test/SendJMSMessage.java
Log:
Updated quickstart to remove jBPM signalling: JBESB-1756

Modified: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/build.xml	2008-05-20 14:43:15 UTC (rev 20084)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/build.xml	2008-05-20 15:24:29 UTC (rev 20085)
@@ -10,6 +10,9 @@
   <!-- Import the base Ant build script... -->
   <import file="../conf/base-build.xml"/>
   
+  <property name="jbossesb.name" value="jboss-esb.xml"/>
+  <property name="jbossesb.responsedir" location="${build.dir}/response"/>
+
   <property name="project.process.dir" value="processDefinition"/>
 	
   <target name="quickstart-specific-assemblies">   
@@ -19,6 +22,20 @@
     </copy>
   </target>
   
+  <target name="config">
+    <delete dir="${jbossesb.responsedir}" quiet="true"/>
+    <mkdir dir="${jbossesb.responsedir}"/>
+    <antcall target="filter_jboss-esb.xml"/>
+  </target>
+
+  <target name="filter_jboss-esb.xml">
+    <copy file="jboss-esb-unfiltered.xml" tofile="${basedir}/${jbossesb.name}" overwrite="true" filtering="true">
+      <filterset>
+        <filter token="RESPONSE_DIR" value="${jbossesb.responsedir}"/>
+      </filterset>
+    </copy>
+  </target>
+
   <target name="refreshProcess" description="Moves the changed process definition to the server without restarting all the services">
     <echo>Moves the changed process definition to the server without restarting all the services</echo>
     <copy overwrite="true" 
@@ -35,14 +52,14 @@
 	<echo>Use "ant deployProcess" followed by "ant startProcess"</echo>
   </target>
 	
-  <target name="deployProcess" description="deploys the process definition" depends="dependencies">
-    <echo>Deploy the process definition</echo>
-	<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
-		<classpath refid="exec-classpath"/>
-	</taskdef>
-	<deployToServer>
-		<fileset dir="${basedir}/processDefinition" includes="*"/>
-	</deployToServer>
+  <target name="deployProcess" description="deploys the process definition" depends="dependencies">
+    <echo>Deploy the process definition</echo>
+	<taskdef name="deployToServer" classname="org.jbpm.ant.DeployProcessToServerTask">
+		<classpath refid="exec-classpath"/>
+	</taskdef>
+	<deployToServer>
+		<fileset dir="${basedir}/processDefinition" includes="*"/>
+	</deployToServer>
   </target>
   
   <target name="startProcess" depends="compile" description="Sends a message to start a new process instance">
@@ -53,22 +70,8 @@
      	 <arg value="${token}"/>
 		   <classpath refid="exec-classpath"/>
      </java>
-  </target>  
+  </target> 
   
-  <target name="test">
-  	<echo>arg1 is ${token}</echo>
-  </target>
-  
-  <target name="signalProcess" depends="compile" description="Sends a message to signal a process instance">
-    <echo>Sends a message to signal a process instance</echo>
-     <java fork="yes" classname="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.test.SendJMSMessage" failonerror="true">
-       <arg value="queue/quickstart_bpm_orchestration3_signal_Request_gw"/>      
-     	 <arg value="Hello Signal"/>
-     	 <arg value="${token}"/>
-	  <classpath refid="exec-classpath"/>
-     </java>
-  </target> 
-	
   <target name="display-instructions">
     <echo message='${line.separator}******************' />
     <echo>Quickstart deployed to target JBoss ESB/App Server at '${org.jboss.esb.server.deploy.dir}'.</echo>

Copied: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb-unfiltered.xml (from rev 20081, labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb-unfiltered.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb-unfiltered.xml	2008-05-20 15:24:29 UTC (rev 20085)
@@ -0,0 +1,192 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
+    parameterReloadSecs="5">
+
+    <providers>
+          <jms-provider name="JMS" connection-factory="ConnectionFactory">
+              <jms-bus busid="deployGwChannel">
+                  <jms-message-filter dest-type="QUEUE"
+                      dest-name="queue/quickstart_bpm_orchestration3_deploy_Request_gw" />
+              </jms-bus>
+              <jms-bus busid="deployEsbChannel">
+                  <jms-message-filter dest-type="QUEUE"
+                      dest-name="queue/quickstart_bpm_orchestration3_deploy_Request_esb" />
+              </jms-bus>              
+              <jms-bus busid="startGwChannel">
+                  <jms-message-filter dest-type="QUEUE"
+                      dest-name="queue/quickstart_bpm_orchestration3_start_Request_gw" />
+              </jms-bus>
+              <jms-bus busid="startEsbChannel">
+                  <jms-message-filter dest-type="QUEUE"
+                      dest-name="queue/quickstart_bpm_orchestration3_start_Request_esb" />
+              </jms-bus>
+              
+              <jms-bus busid="signalEsbChannel">
+                  <jms-message-filter dest-type="QUEUE"
+                      dest-name="queue/quickstart_bpm_orchestration3_signal_Request_esb" />
+              </jms-bus>
+              
+              <jms-bus busid="service1EsbChannel">
+                  <jms-message-filter dest-type="QUEUE"
+                      dest-name="queue/quickstart_bpm_orchestration3_service1_Request_esb" />
+              </jms-bus>
+              <jms-bus busid="service2EsbChannel">
+                  <jms-message-filter dest-type="QUEUE"
+                      dest-name="queue/quickstart_bpm_orchestration3_service2_Request_esb" />
+              </jms-bus>
+              <jms-bus busid="service3EsbChannel">
+                  <jms-message-filter dest-type="QUEUE"
+                      dest-name="queue/quickstart_bpm_orchestration3_service3_Request_esb" />
+              </jms-bus>
+          </jms-provider>
+                    
+          
+          <fs-provider name="FSprovider1">
+              <fs-bus busid="signalGwChannel" >
+          			<fs-message-filter
+          				directory="@RESPONSE_DIR@"
+          				input-suffix="replyToEPR.xml"          			
+          				post-delete="true"
+          				error-delete="true"
+          			/>
+          	  </fs-bus>
+          </fs-provider>
+      </providers>
+
+      <services>
+        
+        <service category="BPM_Orchestration3_Starter_Service" name="Starter_Service"
+                 description="BPM Orchestration Sample 3: Use this service to start a process instance">
+            <listeners>
+                <jms-listener name="JMS-Gateway" busidref="startGwChannel"
+                    maxThreads="1"
+                    is-gateway="true" />
+                <jms-listener name="ESB-Listener" busidref="startEsbChannel"
+                maxThreads="1"/>
+            </listeners>
+            <actions mep="OneWay">
+                 <action name="setupKey" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.esb_actions.SetupKey">
+                 </action>                    
+                 <action name="dump2" class="org.jboss.soa.esb.actions.SystemPrintln">
+                   		<property name="message" value="After" />
+                   		<property name="printfull" value="true"/>
+                 </action>
+                 <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>                  
+                 <action  name="start_a_new_process_instance" 
+                   class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
+                    <property name="command" value="StartProcessInstanceCommand" />
+                    <property name="process-definition-name" value="bpm_orchestration3Process"/>   
+                    <property name="key" value="businessKey"/>
+                    <property name="esbToBpmVars">                        
+                        <mapping esb="BODY_CONTENT" bpm="theBody" />
+                        <mapping esb="contentsAsString" bpm="theData" /> 
+                    </property>
+                 </action>
+            </actions>
+        </service>
+        
+        <service category="BPM_Orchestration3_Signal_Service" name="Signal_Service"
+                 description="BPM Orchestration Sample 3: Use this service to signal a process instance">
+            <listeners>
+                <fs-listener name="Gateway" busidref="signalGwChannel"
+                    maxThreads="1"
+                    is-gateway="true" />
+                <jms-listener name="ESB-Listener" busidref="signalEsbChannel"
+                maxThreads="1"/>
+            </listeners>
+            <actions mep="OneWay">
+                 <!--
+                 <action name="dump1" class="org.jboss.soa.esb.actions.SystemPrintln">
+                      <property name="message" value="SIGNAL" />
+                   		<property name="printfull" value="true"/>
+                 </action>                    
+                 -->
+                <action name="groovy" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
+                  <property name="script" value="/scripts/ToCallBackService.groovy" />
+                </action>
+                 <!--
+                 <action name="dump2" class="org.jboss.soa.esb.actions.SystemPrintln">
+                   		<property name="message" value="After" />
+                   		<property name="printfull" value="true"/>
+                 </action>
+                 -->
+                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
+            </actions>
+        </service>
+
+
+        <service category="BPM_Orchestration3_Service1" name="Service1"
+                 description="BPM Orchestration Sample 3: this is a service invoked within the process">
+            <listeners>
+                <jms-listener name="ESB-Listener" busidref="service1EsbChannel"
+                maxThreads="1"/>
+            </listeners>
+            <actions mep="OneWay">
+								 <!--
+                 <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
+                   	<property name="printfull" value="true"/>
+                 </action>
+                 -->                 
+																
+                <action name="groovy" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
+                  <property name="script" value="/scripts/service1.groovy" />
+                </action>
+                
+                <!--
+                <action name="alert" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.esb_actions.SimpleJMSNotifier">
+									<property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration3_service1_Alert" />     
+                </action>
+                -->                
+                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
+            </actions>
+        </service>
+        <service category="BPM_Orchestration3_Service2" name="Service2"
+                 description="BPM Orchestration Sample 3: this is a service invoked within the process">
+            <listeners>
+                <jms-listener name="ESB-Listener" busidref="service2EsbChannel"
+                maxThreads="1"/>
+            </listeners>
+            <actions mep="OneWay">
+                <!--
+                <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
+                   	<property name="printfull" value="true"/>
+                </action>
+             		-->
+                <action name="groovy" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
+                  <property name="script" value="/scripts/service2.groovy" />
+                </action>
+                <!--
+                <action name="alert" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.esb_actions.SimpleJMSNotifier">
+								  <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration2_service2_Alert" />     
+                </action>
+                -->
+                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
+            </actions>
+        </service>
+        <service category="BPM_Orchestration3_Service3" name="Service3"
+                 description="BPM Orchestration Sample 3: this is a service invoked within the process">
+            <listeners>
+                <jms-listener name="ESB-Listener" busidref="service3EsbChannel"
+                maxThreads="1"/>
+            </listeners>
+            <actions mep="OneWay">
+                <!--
+                <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
+                   	<property name="printfull" value="true"/>
+                </action>
+								-->            
+                <action name="groovy" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
+                  <property name="script" value="/scripts/service3.groovy" />
+                </action>
+                <!--
+                <action name="alert" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.esb_actions.SimpleJMSNotifier">
+								  <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration2_service3_Alert" />     
+                </action>
+                -->
+                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
+            </actions>
+        </service>
+        
+      </services>
+
+</jbossesb>

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml	2008-05-20 14:43:15 UTC (rev 20084)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml	2008-05-20 15:24:29 UTC (rev 20085)
@@ -1,194 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
-    parameterReloadSecs="5">
-
-    <providers>
-          <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
-                        jndi-URL="jnp://127.0.0.1:1099" jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
-                        jndi-pkg-prefix="org.jboss.naming:org.jnp.interfaces">
-
-              <jms-bus busid="deployGwChannel">
-                  <jms-message-filter dest-type="QUEUE"
-                      dest-name="queue/quickstart_bpm_orchestration3_deploy_Request_gw" />
-              </jms-bus>
-              <jms-bus busid="deployEsbChannel">
-                  <jms-message-filter dest-type="QUEUE"
-                      dest-name="queue/quickstart_bpm_orchestration3_deploy_Request_esb" />
-              </jms-bus>              
-              <jms-bus busid="startGwChannel">
-                  <jms-message-filter dest-type="QUEUE"
-                      dest-name="queue/quickstart_bpm_orchestration3_start_Request_gw" />
-              </jms-bus>
-              <jms-bus busid="startEsbChannel">
-                  <jms-message-filter dest-type="QUEUE"
-                      dest-name="queue/quickstart_bpm_orchestration3_start_Request_esb" />
-              </jms-bus>
-              <jms-bus busid="signalGwChannel">
-                  <jms-message-filter dest-type="QUEUE"
-                      dest-name="queue/quickstart_bpm_orchestration3_signal_Request_gw" />
-              </jms-bus>
-              <jms-bus busid="signalEsbChannel">
-                  <jms-message-filter dest-type="QUEUE"
-                      dest-name="queue/quickstart_bpm_orchestration3_signal_Request_esb" />
-              </jms-bus>
-              
-              <jms-bus busid="service1EsbChannel">
-                  <jms-message-filter dest-type="QUEUE"
-                      dest-name="queue/quickstart_bpm_orchestration3_service1_Request_esb" />
-              </jms-bus>
-              <jms-bus busid="service2EsbChannel">
-                  <jms-message-filter dest-type="QUEUE"
-                      dest-name="queue/quickstart_bpm_orchestration3_service2_Request_esb" />
-              </jms-bus>
-              <jms-bus busid="service3EsbChannel">
-                  <jms-message-filter dest-type="QUEUE"
-                      dest-name="queue/quickstart_bpm_orchestration3_service3_Request_esb" />
-              </jms-bus>
-          </jms-provider>
-      </providers>
-
-      <services>
-        
-        <service category="BPM_Orchestration3_Starter_Service" name="Starter_Service"
-                 description="BPM Orchestration Sample 3: Use this service to start a process instance">
-            <listeners>
-                <jms-listener name="JMS-Gateway" busidref="startGwChannel"
-                    maxThreads="1"
-                    is-gateway="true" />
-                <jms-listener name="ESB-Listener" busidref="startEsbChannel"
-                maxThreads="1"/>
-            </listeners>
-            <actions mep="OneWay">
-                 <action name="setupKey" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.esb_actions.SetupKey">
-                 </action>                    
-                 <action name="dump2" class="org.jboss.soa.esb.actions.SystemPrintln">
-                   		<property name="message" value="After" />
-                   		<property name="printfull" value="true"/>
-                 </action>
-                 <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>                  
-                 <action  name="start_a_new_process_instance" 
-                   class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
-                    <property name="command" value="StartProcessInstanceCommand" />
-                    <property name="process-definition-name" value="bpm_orchestration3Process"/>   
-                    <property name="key" value="businessKey"/>
-                    <property name="esbToBpmVars">                        
-                        <mapping esb="BODY_CONTENT" bpm="theBody" />
-                        <mapping esb="contentsAsString" bpm="theData" /> 
-                    </property>
-                 </action>
-            </actions>
-        </service>
-        
-        <service category="BPM_Orchestration3_Signal_Service" name="Signal_Service"
-                 description="BPM Orchestration Sample 3: Use this service to signal a process instance">
-            <listeners>
-                <jms-listener name="JMS-Gateway" busidref="signalGwChannel"
-                    maxThreads="1"
-                    is-gateway="true" />
-                <jms-listener name="ESB-Listener" busidref="signalEsbChannel"
-                maxThreads="1"/>
-            </listeners>
-            <actions mep="OneWay">
-                 <!--
-                 <action name="dump1" class="org.jboss.soa.esb.actions.SystemPrintln">
-                      <property name="message" value="SIGNAL" />
-                   		<property name="printfull" value="true"/>
-                 </action>                    
-                 -->
-                 <action name="SetupSignal" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.esb_actions.SetupSignal"/>
-                 
-                 <action  name="signal_a_process_instance" 
-                   class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
-                    <property name="command" value="SignalCommand" />
-                    <property name="esbToBpmVars">                        
-                        <mapping esb="BODY_CONTENT" bpm="theBody" /> 
-                        <mapping esb="body" bpm="theData" /> 
-                    </property>
-                 </action>
-                 
-                 <!--
-                 <action name="dump2" class="org.jboss.soa.esb.actions.SystemPrintln">
-                   		<property name="message" value="After" />
-                   		<property name="printfull" value="true"/>
-                 </action>
-                 -->
-                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
-            </actions>
-        </service>
-
-
-        <service category="BPM_Orchestration3_Service1" name="Service1"
-                 description="BPM Orchestration Sample 3: this is a service invoked within the process">
-            <listeners>
-                <jms-listener name="ESB-Listener" busidref="service1EsbChannel"
-                maxThreads="1"/>
-            </listeners>
-            <actions mep="OneWay">
-								 <!--
-                 <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
-                   	<property name="printfull" value="true"/>
-                 </action>
-                 -->
-								
-                <action name="groovy" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
-                  <property name="script" value="/scripts/service1.groovy" />
-                </action>
-                
-                <!--
-                <action name="alert" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.esb_actions.SimpleJMSNotifier">
-									<property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration3_service1_Alert" />     
-                </action>
-                -->                
-                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
-            </actions>
-        </service>
-        <service category="BPM_Orchestration3_Service2" name="Service2"
-                 description="BPM Orchestration Sample 3: this is a service invoked within the process">
-            <listeners>
-                <jms-listener name="ESB-Listener" busidref="service2EsbChannel"
-                maxThreads="1"/>
-            </listeners>
-            <actions>
-                <!--
-                <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
-                   	<property name="printfull" value="true"/>
-                </action>
-             		-->
-                <action name="groovy" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
-                  <property name="script" value="/scripts/service2.groovy" />
-                </action>
-                <!--
-                <action name="alert" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.esb_actions.SimpleJMSNotifier">
-								  <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration2_service2_Alert" />     
-                </action>
-                -->
-                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
-            </actions>
-        </service>
-        <service category="BPM_Orchestration3_Service3" name="Service3"
-                 description="BPM Orchestration Sample 3: this is a service invoked within the process">
-            <listeners>
-                <jms-listener name="ESB-Listener" busidref="service3EsbChannel"
-                maxThreads="1"/>
-            </listeners>
-            <actions>
-                <!--
-                <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
-                   	<property name="printfull" value="true"/>
-                </action>
-								-->            
-                <action name="groovy" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
-                  <property name="script" value="/scripts/service3.groovy" />
-                </action>
-                <!--
-                <action name="alert" class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration2.esb_actions.SimpleJMSNotifier">
-								  <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration2_service3_Alert" />     
-                </action>
-                -->
-                <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/>
-            </actions>
-        </service>
-        
-      </services>
-
-</jbossesb>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml	2008-05-20 14:43:15 UTC (rev 20084)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml	2008-05-20 15:24:29 UTC (rev 20085)
@@ -34,7 +34,6 @@
 		<property name="org.jboss.soa.esb.jndi.server.type" value="jboss"/>
 		<property name="org.jboss.soa.esb.jndi.server.url" value="localhost"/>
 		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-        <property name="jboss.esb.invm.scope.default" value="NONE"/>
     </properties>
     <properties name="registry">      
     	<property name="org.jboss.soa.esb.registry.queryManagerURI"     		

Modified: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/gpd.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/gpd.xml	2008-05-20 14:43:15 UTC (rev 20084)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/gpd.xml	2008-05-20 15:24:29 UTC (rev 20085)
@@ -1,25 +1,25 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<process-diagram name="bpm_orchestration3Process" width="728" height="728">
-  <node name="start-state1" x="178" y="60" width="140" height="40">
-    <transition>
+<root-container name="bpm_orchestration3Process" width="484" height="487">
+  <node name="start-state1" x="175" y="15" width="140" height="40">
+    <edge>
       <label x="5" y="-10"/>
-    </transition>
+    </edge>
   </node>
-  <node name="Service 1" x="183" y="160" width="140" height="40">
-    <transition>
+  <node name="Service 1" x="235" y="103" width="132" height="36">
+    <edge>
       <label x="5" y="-10"/>
-    </transition>
+    </edge>
   </node>
-  <node name="Service 2" x="193" y="257" width="140" height="40">
-    <transition>
+  <node name="Service 2" x="121" y="183" width="132" height="36">
+    <edge>
       <label x="5" y="-10"/>
-    </transition>
+    </edge>
   </node>
-  <node name="Service 3" x="201" y="345" width="140" height="40">
-    <transition>
+  <node name="Service 3" x="208" y="263" width="132" height="36">
+    <edge>
       <label x="5" y="-10"/>
-    </transition>
+    </edge>
   </node>
-  <node name="end-state1" x="205" y="444" width="140" height="40"/>
-</process-diagram>
+  <node name="end-state1" x="177" y="333" width="132" height="36"/>
+</root-container>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/processimage.jpg
===================================================================
(Binary files differ)

Modified: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/readme.txt	2008-05-20 14:43:15 UTC (rev 20084)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/readme.txt	2008-05-20 15:24:29 UTC (rev 20085)
@@ -1,101 +1,89 @@
-Overview:
-=========
-  The purpose of the bpm_orchestration3 quickstart sample is to demonstrate the
-  use jBPM to perform async calls into ESB services. This is a fairly advanced example.
-  Make sure you are very comfortable with the bpm_orchestration1 and 2 before attempting 
-  this one.  The provided process definition had a start, end and then three main nodes
-  that include Service1, 2 and 3 asynchronously. After each invocation it goes into a wait-state.
-  The process must then receive a signal.
-
-To Run standalone mode:
-=======================
-  Do not run standalone.
-
-To Run '.esb' archive mode:
-===========================
-  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
-  2. type 'ant deployProcess'
-  3. Switch back to Application/ESB Server console and wait for the message
-     'Process Definition Deployed:' to appear on the console.
-  3. In Window1, type 'ant startProcess -Dtoken=Demo1'
-     Switch back to Application/ESB Server console and look for
+Overview:
+=========
+  The purpose of the bpm_orchestration3 quickstart sample is to demonstrate the
+  use jBPM to perform async calls into ESB services. This is a fairly advanced example.
+  Make sure you are very comfortable with the bpm_orchestration1 and 2 before attempting 
+  this one.  The provided process definition had a start, end and then three main nodes
+  that include Service1, 2 and 3 asynchronously. After each invocation it goes into a wait-state.
+  The process must then receive a signal.
+
+To Run standalone mode:
+=======================
+  Do not run standalone.
+
+To Run '.esb' archive mode:
+===========================
+  1. In a command terminal window in this folder ("Window1"), type 'ant deploy'.
+  2. type 'ant deployProcess'
+  3. In Window1, type 'ant startProcess -Dtoken=Demo1'
+     Switch back to Application/ESB Server console and look for
      [STDOUT] ** Begin Service 1 **
-     [STDOUT] In : Hello start
+     [STDOUT] In : Hello start
      [STDOUT] Out: Hello start 'Service 1' 
      [STDOUT] ** End Service 1 **
-
+
   4. Enter the jBPM console (http://localhost:8080/jbpm-console/sa/processes.jsf), and
      login.   Once logged in, examine each process that you see using the "Examine" link 
      and find the "Instance ID" for the process that has a Key of "Demo1". 
-  5. In Window1, if the Instance ID you found in Step 4 was 1, 
-     type 'ant -Dtoken=1 signalProcess'
-     Substitute whatever number you found for an instance id in the environment variable 
-     part of that statement (-Dtoken=[Instance ID]).
-     Switch back to Application/ESB Server console and look for:
-     [SetupSignal] --------------------------------
-     [SetupSignal] jbpmTokenId: 1
-     [SetupSignal] Body: Hello Signal
-     [SetupSignal] --------------------------------
-     [STDOUT] ** Begin Service 2 **
-     [STDOUT] In: Hello Signal
-     [STDOUT] Out: Hello Signal 'Service 2' 
-     [STDOUT] ** End Service 2 **
-     [STDOUT] ** Begin Service 3 **
-     [STDOUT] In: Hello Signal 'Service 2' 
-     [STDOUT] Out: Hello Signal 'Service 2'  'Service 3' 
-     [STDOUT] ** End Service 3 **
-     [SetupSignal] --------------------------------
-     [SetupSignal] jbpmTokenId: 1
-     [SetupSignal] Body: Hello Signal
-     [SetupSignal] --------------------------------
+     
+  5. Using your favorite OSs File Explorer tool, look in the "bin" directory of your
+     ESB container (either the full Application Server + ESB or ESB Server).  A file
+     called replyToEPR.xml has been written to the disk by service1.groovy.  This file
+     is the XML-ized version of the replyTo header that came "out" from EsbActionHandler,
+     from the process flow.  Copy that file to the "build/resultdir" folder
+     which is specified in the
+     following section of the jboss-esb.xml:
+     <fs-provider name="FSprovider1">
+           <fs-bus busid="signalGwChannel" >
+        			<fs-message-filter
+        				directory="@RESULTDIR@"
+         				input-suffix="replyToEPR.xml"          			
+         				post-delete="true"
+         				error-delete="true"
+         			/>
+       	  </fs-bus>
+     </fs-provider>
+    
+     This file will be picked up and consumed by the Signal_Service which will use the
+     ToCallBackService.groovy script to reconstitute the EPR, make it the To address
+     of the message and use the ServiceInvoker deliver the message to the
+     JBpmCallbackService. 
+     
+     Note: The STDOUT messages are from the 3 groovy scripts representing the logic of
+     each service.
 
-     Note: The STDOUT messages are from the 3 groovy scripts representing the logic of
-     each service.
-
-  6. To undeploy the esb archive, type 'ant undeploy' ("Window1").
-
-Things to Consider:
-===================
-   - Review the process definition, specifically one of the nodes like Service 1:
-   	<node name="Service 1">
-		<action name="esbAction"
-			class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
-			<esbCategoryName>
-				BPM_Orchestration3_Service1
-			</esbCategoryName>
-			<esbServiceName>Service1</esbServiceName>
-			<bpmToEsbVars>
-				<mapping jbpm="theBody" esb="BODY_CONTENT" />
-			</bpmToEsbVars>
-			<returnVars>
-				<mapping jbpm="theBody" esb="BODY_CONTENT" />
-			</returnVars>
-		</action>
-		<transition to="Service 2"></transition>
-	</node>
-	
-	Note: There is NO <millisToWaitForResponse>5000</millisToWaitForResponse>
-	therefore is no waiting for a response from the ESB.  The request is
-	made asynchronously to the ESB Service and the process instance enters a wait-state.
-	It goes to sleep and waits some external "signal".  A waiting/sleeping
-	process instance is held in the database.
-	 
-	The secret to being able to wake up a sleeping process instance is the tokenid.
-	
-	This example uses two custom actions to prepare the content needed to properly
-	interact with the jBPM business process. SetupKey.java and SetupSignal.java are
-	used to peel the businessKey and/or the token id out of the JMS message and place
-	it in the proper location for 
-	org.jboss.soa.esb.services.jbpm.actions.BpmProcessor
-	
-	This command line arguments -Dtoken=12
-	are passed into the Ant build.xml, then passed into the SendJMSMessage.java as command
-	line arguments and then SendJMSMessage.java adds the value from the command line on
-	to the JMS message before sending into the appropriate queue.
-	
-	Tip: If you use the jbpm-console (http://localhost:8080) and the Graphical Process
-	Designer provided by Red Hat Developer Studio then you can visually "see" the process
-	moving from step to step to step with each command line signal.	
-	
-	
-	
\ No newline at end of file
+  6. To undeploy the esb archive, type 'ant undeploy' ("Window1").
+
+Things to Consider:
+===================
+   - Review the process definition, specifically one of the nodes like Service 1:
+	<node name="Service 1">
+		<action name="esbAction"
+			class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+			<esbCategoryName>
+				BPM_Orchestration3_Service1
+			</esbCategoryName>
+			<esbServiceName>Service1</esbServiceName>
+			<bpmToEsbVars>
+				<mapping bpm="theBody" esb="BODY_CONTENT" />
+			</bpmToEsbVars>
+			<esbToBpmVars>
+				<mapping esb="BODY_CONTENT" bpm="theBody"/>
+			</esbToBpmVars>
+		</action>
+		<transition to="Service 2"></transition>
+	</node>
+		
+	The request is made asynchronously to the ESB Service and the process instance enters a wait-state.
+	It goes to sleep and waits some external "signal" event occurs.  A waiting/sleeping
+	process instance is held in the database. 
+	
+	Please review the document called:  jBPMIntegrationGuide.pdf
+	http://anonsvn.labs.jboss.com/labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/docs/services/jBPMIntegrationGuide.pdf
+	
+	Tip: If you use the jbpm-console (http://localhost:8080) and the Graphical Process
+	Designer provided by Red Hat Developer Studio then you can visually "see" the process
+	moving from step to step to step with each command line signal.	
+	
+	
+	

Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/ToCallBackService.groovy
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/ToCallBackService.groovy	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/ToCallBackService.groovy	2008-05-20 15:24:29 UTC (rev 20085)
@@ -0,0 +1,26 @@
+import org.jboss.soa.esb.message.*
+import org.jboss.soa.esb.addressing.*
+import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper
+import org.jboss.soa.esb.client.ServiceInvoker
+import org.jboss.soa.esb.addressing.eprs.LogicalEPR
+
+println "** Begin Setup To **"
+
+// the XML representation of the EPR is in the body of the file
+// file contents show up as a byte array, hence the need for new String(message.getBody().get())
+epr = EPRHelper.fromXMLString(new String(message.getBody().get()))
+//  need to set the To on the message object
+lepr = new LogicalEPR(epr)
+
+println "To/replyTo EPR: \n" + epr
+
+message.getHeader().getCall().setTo(epr);
+message.getBody().add("") // clear the body content
+
+// now route this updated message to the callbackservice
+si = lepr.getServiceInvoker()
+
+si.deliverAsync(message)
+
+println "** End Setup To **"
+

Modified: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy	2008-05-20 14:43:15 UTC (rev 20084)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy	2008-05-20 15:24:29 UTC (rev 20085)
@@ -1,9 +1,20 @@
 import org.jboss.soa.esb.message.*
+import org.jboss.soa.esb.addressing.*
+import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper
+import java.io.*
 
 println "** Begin Service 1 **"
 
 println "In: " + message.getBody().get()
+xmlEPR = EPRHelper.toXMLString(message.getHeader().getCall().getReplyTo())
 
+// println "replyTo EPR: \n" + xmlEPR
+
+def writer=new File("replyToEPR.xml").newPrintWriter()
+writer.print(xmlEPR)
+writer.close()
+
+
 message.getBody().add(message.getBody().get() + " 'Service 1' ")
 
 println "Out: " + message.getBody().get()

Modified: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy	2008-05-20 14:43:15 UTC (rev 20084)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy	2008-05-20 15:24:29 UTC (rev 20085)
@@ -1,13 +1,22 @@
 import org.jboss.soa.esb.message.*
+import org.jboss.soa.esb.addressing.*
+import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper
+import java.io.*
 
 println "** Begin Service 2 **"
 
 println "In: " + message.getBody().get()
+xmlEPR = EPRHelper.toXMLString(message.getHeader().getCall().getReplyTo())
 
+// println "replyTo EPR: \n" + xmlEPR
+
+def writer=new File("replyToEPR.xml").newPrintWriter()
+writer.print(xmlEPR)
+writer.close()
+
+
 message.getBody().add(message.getBody().get() + " 'Service 2' ")
 
 println "Out: " + message.getBody().get()
 
-println "** End Service 2 **"
-
-
+println "** End Service 2 **"
\ No newline at end of file

Modified: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service3.groovy
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service3.groovy	2008-05-20 14:43:15 UTC (rev 20084)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service3.groovy	2008-05-20 15:24:29 UTC (rev 20085)
@@ -1,9 +1,20 @@
 import org.jboss.soa.esb.message.*
+import org.jboss.soa.esb.addressing.*
+import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper
+import java.io.*
 
 println "** Begin Service 3 **"
 
 println "In: " + message.getBody().get()
+xmlEPR = EPRHelper.toXMLString(message.getHeader().getCall().getReplyTo())
 
+// println "replyTo EPR: \n" + xmlEPR
+
+def writer=new File("replyToEPR.xml").newPrintWriter()
+writer.print(xmlEPR)
+writer.close()
+
+
 message.getBody().add(message.getBody().get() + " 'Service 3' ")
 
 println "Out: " + message.getBody().get()

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SetupSignal.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SetupSignal.java	2008-05-20 14:43:15 UTC (rev 20084)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SetupSignal.java	2008-05-20 15:24:29 UTC (rev 20085)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.esb_actions;
-
-
-import org.jboss.soa.esb.actions.AbstractActionLifecycle;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.apache.log4j.Logger;
-
-public class SetupSignal extends AbstractActionLifecycle {
-	
-	protected ConfigTree	_config;
-	private Logger logger = Logger.getLogger(SetupSignal.class);
-	
-
-	public Message process(Message message) throws ActionProcessingException {		
-		String token = (String) message.getProperties().getProperty("token");
-		logger.info("--------------------------------");
-
-		logger.info("jbpmTokenId: " + token);
-		
-		message.getBody().add("jbpmTokenId",token);
-		
-		if (message.getBody() != null && message.getBody().get() != null) {			
-			logger.info("Body: " + message.getBody().get());
-		} else {
-			logger.info("Body Contents are NULL");
-		}
-	  logger.info("--------------------------------");
-
-		return message;         	
-	}
-	 	  
-  public SetupSignal(ConfigTree config) { _config = config; } 
-  
-}	
\ No newline at end of file

Modified: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/test/SendJMSMessage.java	2008-05-20 14:43:15 UTC (rev 20084)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/test/SendJMSMessage.java	2008-05-20 15:24:29 UTC (rev 20085)
@@ -20,9 +20,13 @@
  */
 package org.jboss.soa.esb.samples.quickstarts.bpm_orchestration3.test;
 
-import org.jgroups.protocols.JMS;
-
-import javax.jms.*;
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
@@ -46,22 +50,10 @@
     }
     
     public void stop() throws JMSException 
-    {
-        try {
-            if(conn != null) {
-                conn.stop();
-            }
-        } finally {
-            try {
-                if(session != null) {
-                    session.close();
-                }
-            } finally {
-                if(conn != null) {
-                    conn.close();
-                }
-            }
-        }
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
     }
     
     public void sendAMessage(String msg, String tokenID) throws JMSException {
@@ -77,22 +69,20 @@
        
     
     public static void main(String args[]) throws Exception
-    {
-        SendJMSMessage sm = new SendJMSMessage();
-        try {
-            sm.setupConnection(args[0]);
-            if (args.length < 3)
-                sm.sendAMessage(args[1], null);
-            else
-                sm.sendAMessage(args[1], args[2]);
-        } catch (Exception e) {
-            System.out.println("\n**** Failed to send message to JMS Destination '" + args[0] + "'.  " +
-                               "\n**** Your JMS Provider (e.g. your JBoss ESB/App Server) may not be running, or the JMS Destination may not be deployed." +
-                               "\n**** Exception: " + e.getMessage());
-        } finally {
-            sm.stop();
-        }
-
+    {        	    	
+    	SendJMSMessage sm = new SendJMSMessage();
+    	try {
+    		sm.setupConnection(args[0]);
+    		if (args.length < 3)
+    			sm.sendAMessage(args[1],null); 
+    		else
+    			sm.sendAMessage(args[1],args[2]); 
+    	} catch (Exception e) {
+    		System.out.println(e);
+      } finally {
+    	  sm.stop();
+    	}  
+    	
     }
     
 }




More information about the jboss-svn-commits mailing list