[jboss-svn-commits] JBL Code SVN: r18044 - in labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3: scripts and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Jan 22 22:46:51 EST 2008


Author: tcunning
Date: 2008-01-22 22:46:50 -0500 (Tue, 22 Jan 2008)
New Revision: 18044

Modified:
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/build.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/readme.txt
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy
   labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy
Log:
bug:JBESB-1432
Change usage of jbpmTokenId to fit the jbpm integration changes.


Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/build.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/build.xml	2008-01-22 21:30:40 UTC (rev 18043)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/build.xml	2008-01-23 03:46:50 UTC (rev 18044)
@@ -45,7 +45,6 @@
   </target> 
   
   <target name="startProcess" depends="compile" description="Sends a message to start a new process instance">
-	<echo>TOKEN=$token</echo>
     <echo>Sends a message to start a new 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_start_Request_gw"/>       
@@ -65,7 +64,7 @@
        <arg value="queue/quickstart_bpm_orchestration3_signal_Request_gw"/>      
      	 <arg value="Hello Signal"/>
      	 <arg value="${token}"/>
-		   <classpath refid="exec-classpath"/>
+	  <classpath refid="exec-classpath"/>
      </java>
   </target> 
 	

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml	2008-01-22 21:30:40 UTC (rev 18043)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml	2008-01-23 03:46:50 UTC (rev 18044)
@@ -57,7 +57,7 @@
                 <jms-listener name="ESB-Listener" busidref="deployEsbChannel"
                 maxThreads="1"/>
             </listeners>
-              <actions>
+              <actions mep="OneWay">
                 <action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore">
                     <property name="logSuccess" value="true"/>
                 </action>
@@ -81,7 +81,7 @@
                 <jms-listener name="ESB-Listener" busidref="startEsbChannel"
                 maxThreads="1"/>
             </listeners>
-            <actions>
+            <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">
@@ -111,7 +111,7 @@
                 <jms-listener name="ESB-Listener" busidref="signalEsbChannel"
                 maxThreads="1"/>
             </listeners>
-            <actions>
+            <actions mep="OneWay">
                  <!--
                  <action name="dump1" class="org.jboss.soa.esb.actions.SystemPrintln">
                       <property name="message" value="SIGNAL" />
@@ -146,7 +146,7 @@
                 <jms-listener name="ESB-Listener" busidref="service1EsbChannel"
                 maxThreads="1"/>
             </listeners>
-            <actions>
+            <actions mep="OneWay">
 								 <!--
                  <action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln">
                    	<property name="printfull" value="true"/>

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/readme.txt
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/readme.txt	2008-01-22 21:30:40 UTC (rev 18043)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/readme.txt	2008-01-23 03:46:50 UTC (rev 18044)
@@ -19,41 +19,41 @@
      '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
-     [STDOUT] ** Begin Service 1 **
-		 [STDOUT] In: Hello start
-		 [STDOUT] jbpmTokenId: 12
-		 [STDOUT] Out: Hello start 'Service 1'
-		 [STDOUT] ** End Service 1 **
-		 Note: "12" will be unique to your installation and will change with each process instance you start
-		 It is important to remember this number as it is used in the next step .
-  4. In Window1, type 'ant signalProcess -Dtoken=12'
+     [STDOUT] ** Begin Service 1 **
+     [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: 12
-     [SetupSignal] Body: Hello Signal
-     [SetupSignal] --------------------------------
-     [STDOUT] ** Begin Service 2 **
-     [STDOUT] In: Hello Signal
-		 [STDOUT] jbpmTokenId: 12
-		 [STDOUT] Out: Hello Signal 'Service 2'
-     [STDOUT] ** End Service 2 **
+     [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] --------------------------------
+
      Note: The STDOUT messages are from the 3 groovy scripts representing the logic of
      each service.
-  5. In Window1, type 'ant signalProcess -Dtoken=12'
-     Switch back to Application/ESB Server console and look for:
-     [SetupSignal] --------------------------------
-		 [SetupSignal] jbpmTokenId: 12
-     [SetupSignal] Body: Hello Signal
-     [SetupSignal] --------------------------------
-     [STDOUT] ** Begin Service 3 **
-     [STDOUT] In: Hello Signal
-     [STDOUT] Out: Hello Signal 'Service 3'
-     [STDOUT] ** End Service 3 **
-     Note: this is the final service call and the process instance now waits at node 3.  
-     The next signal moves it to the end state.
-  6. In Window1, type 'ant signalProcess -Dtoken=12'  
-  7. To undeploy the esb archive, type 'ant undeploy' ("Window1").
 
+  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:
@@ -82,10 +82,6 @@
 	 
 	The secret to being able to wake up a sleeping process instance is the tokenid.
 	
-	When the process instance invokes an ESB Service it embeds "jbpmTokenId"
-	into the message.  It can be retrieved in a custom action or in this example's
-	case groovy with - message.body.get("jbpmTokenId")
-	
 	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
@@ -99,8 +95,7 @@
 	
 	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.
+	moving from step to step to step with each command line signal.	
 	
 	
-	
 	
\ No newline at end of file

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy	2008-01-22 21:30:40 UTC (rev 18043)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy	2008-01-23 03:46:50 UTC (rev 18044)
@@ -3,7 +3,6 @@
 println "** Begin Service 1 **"
 
 println "In: " + message.getBody().get()
-println "jbpmTokenId: " + message.body.get("jbpmTokenId")
 
 message.getBody().add(message.getBody().get() + " 'Service 1' ")
 

Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy	2008-01-22 21:30:40 UTC (rev 18043)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy	2008-01-23 03:46:50 UTC (rev 18044)
@@ -3,7 +3,6 @@
 println "** Begin Service 2 **"
 
 println "In: " + message.getBody().get()
-println "jbpmTokenId: " + message.body.get("jbpmTokenId")
 
 message.getBody().add(message.getBody().get() + " 'Service 2' ")
 




More information about the jboss-svn-commits mailing list