[jboss-svn-commits] JBL Code SVN: r15342 - in labs/jbossesb/trunk/product/samples/quickstarts: bpm_orchestration3 and 12 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Sep 24 12:38:28 EDT 2007
Author: burrsutter
Date: 2007-09-24 12:38:28 -0400 (Mon, 24 Sep 2007)
New Revision: 15342
Added:
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/build.xml
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/deployment.xml
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbm-queue-service.xml
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbmq-queue-service.xml
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jndi.properties
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/juddi.properties
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/lib/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/log4j.xml
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/gpd.xml
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/processdefinition.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/
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/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/MessageSpy.java
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SetupKey.java
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/SimpleJMSNotifier.java
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/test/
labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/test/SendJMSMessage.java
Log:
the async jbpm example
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/build.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/build.xml 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,79 @@
+<project name="Quickstart_bpm_orchestration3" default="run" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="deploy.exploded" value="true"/>
+
+ <!-- Import the base Ant build script... -->
+ <import file="../conf/base-build.xml"/>
+
+ <property name="project.process.dir" value="processDefinition"/>
+
+ <target name="quickstart-specific-assemblies">
+ <copy overwrite="true" file="${project.process.dir}/processdefinition.xml" todir="${classes}/${project.process.dir}" />
+ <copy todir="${classes}">
+ <fileset dir="${basedir}" includes="scripts/**/*"/>
+ </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"
+ file="${project.process.dir}/processdefinition.xml"
+ tofile="${quickstart.org.jboss.esb.server.home}/server/${quickstart.org.jboss.esb.server.config}/deploy/${ant.project.name}.esb/${project.process.dir}/processdefinition.xml"/>
+ <antcall target="deployProcess"/>
+ </target>
+
+ <target name="run">
+ <echo>Follow instructions for deploy as .esb archive</echo>
+ </target>
+
+ <target name="runtest">
+ <echo>Use "ant deployProcess" followed by "ant startProcess"</echo>
+ </target>
+
+ <target name="deployProcess" depends="compile" description="Sends a message to deploy the process definition">
+ <echo>Sends a message to deploy the process definition</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.bpm_orchestration3.test.SendJMSMessage" failonerror="true">
+ <arg value="queue/quickstart_bpm_orchestration3_deploy_Request_gw"/>
+ <arg value="Hello Deploy"/>
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+ <target name="startProcess" depends="compile" description="Sends a message to start a new process instance">
+ <echo>Sends a message to start a new process instance</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.bpm_orchestration3.test.SendJMSMessage" failonerror="true">
+ <arg value="queue/quickstart_bpm_orchestration3_start_Request_gw"/>
+ <arg value="Hello start"/>
+ <arg value="${token}"/>
+ <classpath refid="exec-classpath"/>
+ </java>
+ </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.quickstart.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>
+ <echo>1. Check your ESB Server console to make sure the deployment was executed without errors.</echo>
+ <echo>2. Run 'ant deployProcess' and 'ant startProcess' to run the Quickstart.</echo>
+ <echo>3. Check your ESB Server console again. The Quickstart should have produced some output.</echo>
+ <echo message='******************' />
+ </target>
+</project>
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/deployment.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/deployment.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/deployment.xml 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jbossesb-deployment>
+ <depends>jboss.esb:deployment=jbrules.esb</depends>
+ <depends>jboss.esb:deployment=jbpm.esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_deploy_Request_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_deploy_Request_gw</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_start_Request_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_start_Request_gw</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_signal_Request_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_signal_Request_gw</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service1_Request_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service1_Request_esb_reply</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service2_Request_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service2_Request_esb_reply</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service3_Request_esb</depends>
+ <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service3_Request_esb_reply</depends>
+
+</jbossesb-deployment>
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbm-queue-service.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbm-queue-service.xml 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_deploy_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_deploy_Request_gw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_start_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_start_Request_gw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_signal_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_signal_Request_gw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service1_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service1_Request_esb_reply"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service2_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service2_Request_esb_reply"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service3_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service3_Request_esb_reply"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_monitor"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+</server>
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbmq-queue-service.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbmq-queue-service.xml 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_deploy_Request_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_deploy_Request_gw">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_start_Request_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_start_Request_gw">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_signal_Request_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_signal_Request_gw">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service1_Request_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service1_Request_esb_reply">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service2_Request_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service2_Request_esb_reply">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service3_Request_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_service3_Request_esb_reply">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_bpm_orchestration3_monitor">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+
+</server>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jboss-esb.xml 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,216 @@
+<?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_Deploy_Service" name="Deploy_Service"
+ description="BPM Orchestration Sample 3: Use this service to deploy a process instance">
+ <listeners>
+ <jms-listener name="JMS-Gateway" busidref="deployGwChannel"
+ maxThreads="1"
+ is-gateway="true" />
+ <jms-listener name="ESB-Listener" busidref="deployEsbChannel"
+ maxThreads="1"/>
+ </listeners>
+ <actions>
+ <action name="DeployFromFile"
+ class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
+ <property name="command" value="DeployProcessDefinition" />
+ <property name="process-definition-file" value="/processDefinition/processdefinition.xml" />
+ </action>
+ <action name="deployed-message" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message" value="Process Definition Deployed" />
+ </action>
+ </actions>
+ </service>
+
+ <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>
+
+ <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="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="object-paths">
+ <object-path esb="BODY_CONTENT" bpm="theBody" />
+ <object-path esb="contentsAsString" bpm="theData" />
+ </property>
+ </action>
+ <!--
+ <action name="dump3" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message" value="After" />
+ <property name="printfull" value="true"/>
+ </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>
+ <!--
+ <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="object-paths">
+ <object-path esb="BODY_CONTENT" bpm="theBody" />
+ <object-path 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>
+ -->
+ </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>
+ <!--
+ <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>
+ -->
+ </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>
+ -->
+ </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>
+ -->
+ </actions>
+ </service>
+
+ </services>
+
+</jbossesb>
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jbossesb-properties.xml 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
+<!-- $Id: jbossesb-unittest-properties.xml $ -->
+<!--
+ These options are described in the JBossESB manual.
+ Defaults are provided here for convenience only.
+
+ Please read through this file prior to using the system, and consider
+ updating the specified entries.
+-->
+<esb
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+ <properties name="core">
+ <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"/>
+ </properties>
+ <properties name="registry">
+ <property name="org.jboss.soa.esb.registry.queryManagerURI"
+ value="jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire"/>
+ <property name="org.jboss.soa.esb.registry.lifeCycleManagerURI"
+ value="jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish" />
+ <property name="org.jboss.soa.esb.registry.implementationClass"
+ value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+ <property name="org.jboss.soa.esb.registry.factoryClass"
+ value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+ <property name="org.jboss.soa.esb.registry.user"
+ value="jbossesb"/>
+ <property name="org.jboss.soa.esb.registry.password"
+ value="password"/>
+ <!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+ <property name="org.jboss.soa.esb.scout.proxy.transportClass"
+ value="org.apache.ws.scout.transport.RMITransport"/>
+ </properties>
+ <properties name="transports" depends="core">
+ <property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
+ <property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
+ <property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+ <property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+ </properties>
+ <properties name="connection">
+ <property name="min-pool-size" value="5"/>
+ <property name="max-pool=size" value="10"/>
+ <property name="blocking-timeout-millis" value="5000"/>
+ <property name="abandoned-connection-timeout" value="10000"/>
+ <property name="abandoned-connection-time-interval" value="30000"/>
+ </properties>
+ <properties name="dbstore">
+ <property name="org.jboss.soa.esb.persistence.db.connection.url" value="jdbc:hsqldb:hsql://localhost:9001/"/>
+ <property name="org.jboss.soa.esb.persistence.db.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
+ <property name="org.jboss.soa.esb.persistence.db.user" value="sa"/>
+ <property name="org.jboss.soa.esb.persistence.db.pwd" value=""/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.initial.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.min.size" value="2"/>
+ <property name="org.jboss.soa.esb.persistence.db.pool.max.size" value="5"/>
+ <!--table managed by pool to test for valid connections - created by pool automatically -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.test.table" value="pooltest"/>
+ <!-- # of milliseconds to timeout waiting for a connection from pool -->
+ <property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis" value="5000"/>
+ <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>
+ </properties>
+ <properties name="messagerouting">
+ <property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+ </properties>
+</esb>
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jndi.properties (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/jndi.properties 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/juddi.properties (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/juddi.properties 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,69 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=com.mysql.jdbc.Driver
+juddi.jdbcUrl=jdbc:mysql://localhost:3306/juddi
+juddi.jdbcUsername=root
+juddi.jdbcPassword=admin
+# jUDDI DataSource to use
+# juddi.dataSource=java:comp/env/jdbc/MySqlDS
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/log4j.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/log4j.xml 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A size based file rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="./listener.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss">
+ <priority value="WARN"/>
+ </category>
+ <category name="org.jboss.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.jboss.internal.soa.esb">
+ <priority value="ERROR"/>
+ </category>
+ <category name="org.apache">
+ <priority value="ERROR"/>
+ </category>
+ <category name="quickstart">
+ <priority value="DEBUG"/>
+ </category>
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/gpd.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/gpd.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/gpd.xml 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="bpm_orchestration3Process" width="869" height="681">
+ <node name="start-state1" x="115" y="32" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="end-state1" x="118" y="319" width="132" height="36"/>
+ <node name="Service 1" x="116" y="95" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="Service 2" x="117" y="173" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="Service 3" x="118" y="247" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+</root-container>
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/processdefinition.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/processdefinition.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/processdefinition.xml 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition xmlns="" name="bpm_orchestration3Process">
+
+
+ <start-state name="start-state1">
+ <transition to="Service 1"></transition>
+ </start-state>
+
+
+ <node name="Service 1">
+ <action name="esbAction"
+ class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbCategoryName>
+ BPM_Orchestration3_Service1
+ </esbCategoryName>
+ <esbServiceName>Service1</esbServiceName>
+ <jbpmToEsbVars>
+ <mapping jbpm="theBody" esb="BODY_CONTENT" />
+ </jbpmToEsbVars>
+ <returnVars>
+ <mapping jbpm="theBody" esb="BODY_CONTENT" />
+ </returnVars>
+ </action>
+ <transition to="Service 2"></transition>
+ </node>
+
+ <node name="Service 2">
+ <action name="esbAction"
+ class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbCategoryName>
+ BPM_Orchestration3_Service2
+ </esbCategoryName>
+ <esbServiceName>Service2</esbServiceName>
+ <jbpmToEsbVars>
+ <mapping jbpm="theBody" esb="BODY_CONTENT" />
+ </jbpmToEsbVars>
+ <returnVars>
+ <mapping jbpm="theBody" esb="BODY_CONTENT" />
+ </returnVars>
+ </action>
+ <transition to="Service 3"></transition>
+ </node>
+
+ <node name="Service 3">
+ <action name="esbAction"
+ class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbCategoryName>
+ BPM_Orchestration3_Service3
+ </esbCategoryName>
+ <esbServiceName>Service3</esbServiceName>
+ <jbpmToEsbVars>
+ <mapping jbpm="theBody" esb="BODY_CONTENT" />
+ </jbpmToEsbVars>
+ <returnVars>
+ <mapping jbpm="theBody" esb="BODY_CONTENT" />
+ </returnVars>
+ </action>
+ <transition to="end-state1"></transition>
+ </node>
+
+
+ <end-state name="end-state1"></end-state>
+
+
+</process-definition>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/processimage.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/processDefinition/processimage.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/readme.txt (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/readme.txt 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,106 @@
+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
+ [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'
+ 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 **
+ 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").
+
+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>
+ <jbpmToEsbVars>
+ <mapping jbpm="theBody" esb="BODY_CONTENT" />
+ </jbpmToEsbVars>
+ <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.
+
+ 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
+ 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
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service1.groovy 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,13 @@
+import org.jboss.soa.esb.message.*
+
+println "** Begin Service 1 **"
+
+println "In: " + new String(message.body.contents)
+println "jbpmTokenId: " + message.body.get("jbpmTokenId")
+
+message.body.contents = (new String(message.body.contents) + " 'Service 1' ").getBytes()
+
+println "Out: " + new String(message.body.contents)
+
+println "** End Service 1 **"
+
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service2.groovy 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,14 @@
+import org.jboss.soa.esb.message.*
+
+println "** Begin Service 2 **"
+
+println "In: " + new String(message.body.contents)
+println "jbpmTokenId: " + message.body.get("jbpmTokenId")
+
+message.body.contents = (new String(message.body.contents) + " 'Service 2' ").getBytes()
+
+println "Out: " + new String(message.body.contents)
+
+println "** End Service 2 **"
+
+
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service3.groovy
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service3.groovy (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/scripts/service3.groovy 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,11 @@
+import org.jboss.soa.esb.message.*
+
+println "** Begin Service 3 **"
+
+println "In: " + new String(message.body.contents)
+
+message.body.contents = (new String(message.body.contents) + " 'Service 3' ").getBytes()
+
+println "Out: " + new String(message.body.contents)
+
+println "** End Service 3 **"
\ No newline at end of file
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/MessageSpy.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/MessageSpy.java (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/MessageSpy.java 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,46 @@
+/*
+ * 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.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.apache.log4j.Logger;
+
+public class MessageSpy extends AbstractActionLifecycle {
+
+ protected ConfigTree _config;
+ private Logger logger = Logger.getLogger(MessageSpy.class);
+
+ // modify to use the logger
+ public Message process(Message message) throws Exception {
+ if (message.getBody() != null && message.getBody().getByteArray() != null) {
+ logger.info("Body: " + new String(message.getBody().getByteArray()));
+ } else {
+ logger.info("Body Contents are NULL");
+ }
+ return message;
+ }
+
+ public MessageSpy(ConfigTree config) { _config = config; }
+
+}
\ No newline at end of file
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SetupKey.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SetupKey.java (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SetupKey.java 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,55 @@
+/*
+ * 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 SetupKey extends AbstractActionLifecycle {
+
+ protected ConfigTree _config;
+ private Logger logger = Logger.getLogger(SetupKey.class);
+
+
+ public Message process(Message message) throws ActionProcessingException {
+ String data = (String) message.getProperties().getProperty("token");
+ logger.info("--------------------------------");
+ logger.info("businessKey: " + data);
+
+ message.getBody().add("businessKey",data);
+
+ if (message.getBody() != null && message.getBody().get() != null) {
+ logger.info("Body: " + message.getBody().get());
+ } else {
+ logger.info("Body Contents are NULL");
+ }
+ logger.info("--------------------------------");
+ message.getBody().add("contentsAsString",message.getBody().get());
+ return message;
+ }
+
+ public SetupKey(ConfigTree config) { _config = config; }
+
+}
\ No newline at end of file
Added: 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 (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SetupSignal.java 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,56 @@
+/*
+ * 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().getByteArray() != null) {
+ logger.info("Body: " + new String(message.getBody().getByteArray()));
+ } else {
+ logger.info("Body Contents are NULL");
+ }
+ logger.info("--------------------------------");
+
+ return message;
+ }
+
+ public SetupSignal(ConfigTree config) { _config = config; }
+
+}
\ No newline at end of file
Added: labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SimpleJMSNotifier.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SimpleJMSNotifier.java (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/esb_actions/SimpleJMSNotifier.java 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,83 @@
+/*
+ * 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.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.apache.log4j.Logger;
+
+import java.util.Properties;
+
+import javax.jms.TextMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+public class SimpleJMSNotifier extends AbstractActionLifecycle {
+ protected ConfigTree _config;
+ private Logger logger = Logger.getLogger(SimpleJMSNotifier.class);
+ String queueName = "quickstart_helloworld_Request_gw";
+
+ public Message process(Message message) throws Exception {
+ QueueConnection conn;
+ QueueSession session;
+ Queue que;
+
+ Properties properties1 = new Properties();
+ properties1.put(Context.INITIAL_CONTEXT_FACTORY,
+ "org.jnp.interfaces.NamingContextFactory");
+ properties1.put(Context.URL_PKG_PREFIXES,
+ "org.jboss.naming:org.jnp.interfaces");
+ properties1.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
+ InitialContext iniCtx = new InitialContext(properties1);
+
+ Object tmp = iniCtx.lookup("ConnectionFactory");
+ QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+ conn = qcf.createQueueConnection();
+ que = (Queue) iniCtx.lookup("queue/" + queueName);
+ session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+ conn.start();
+ //logger.info("Connection Started");
+
+ QueueSender send = session.createSender(que);
+ TextMessage tm = session.createTextMessage(new String(message.getBody().getByteArray()));
+ send.send(tm);
+ send.close();
+
+ conn.stop();
+ session.close();
+ conn.close();
+
+ return message;
+ }
+
+ public SimpleJMSNotifier(ConfigTree config) {
+ _config = config;
+ queueName = _config.getAttribute("ALERT_QUEUE_NAME");
+ logger.info("Who to alert: " + queueName);
+ }
+}
\ No newline at end of file
Added: 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 (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/bpm_orchestration3/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration3/test/SendJMSMessage.java 2007-09-24 16:38:28 UTC (rev 15342)
@@ -0,0 +1,85 @@
+/*
+ * 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.quickstart.bpm_orchestration3.test;
+
+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;
+
+public class SendJMSMessage {
+ QueueConnection conn;
+ QueueSession session;
+ Queue que;
+
+ public void setupConnection(String queueName) throws JMSException, NamingException
+ {
+ InitialContext iniCtx = new InitialContext();
+ Object tmp = iniCtx.lookup("ConnectionFactory");
+ QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+ conn = qcf.createQueueConnection();
+ que = (Queue) iniCtx.lookup(queueName);
+ session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+ conn.start();
+ System.out.println("Connection Started");
+ }
+
+ public void stop() throws JMSException
+ {
+ conn.stop();
+ session.close();
+ conn.close();
+ }
+
+ public void sendAMessage(String msg, String tokenID) throws JMSException {
+
+ QueueSender send = session.createSender(que);
+ ObjectMessage tm = session.createObjectMessage(msg);
+ if (tokenID != null && !tokenID.equals(""))
+ tm.setStringProperty("token",tokenID);
+ send.send(tm);
+ send.close();
+ }
+
+
+ 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(e);
+ } finally {
+ sm.stop();
+ }
+
+ }
+
+}
\ No newline at end of file
More information about the jboss-svn-commits
mailing list