[jboss-svn-commits] JBL Code SVN: r20858 - in labs/jbossesb/workspace/bsutter/DemoSource: .settings and 32 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jul 1 14:44:21 EDT 2008
Author: burrsutter
Date: 2008-07-01 14:44:20 -0400 (Tue, 01 Jul 2008)
New Revision: 20858
Added:
labs/jbossesb/workspace/bsutter/DemoSource/.classpath
labs/jbossesb/workspace/bsutter/DemoSource/.project
labs/jbossesb/workspace/bsutter/DemoSource/.settings/
labs/jbossesb/workspace/bsutter/DemoSource/.settings/org.codehaus.groovy.eclipse.preferences.prefs
labs/jbossesb/workspace/bsutter/DemoSource/.settings/org.eclipse.jdt.core.prefs
labs/jbossesb/workspace/bsutter/DemoSource/CBRRules.drl
labs/jbossesb/workspace/bsutter/DemoSource/Discount_Rules.drl
labs/jbossesb/workspace/bsutter/DemoSource/Priority_Rules.drl
labs/jbossesb/workspace/bsutter/DemoSource/SampleOrder.xml
labs/jbossesb/workspace/bsutter/DemoSource/SamplePetsOrder.xml
labs/jbossesb/workspace/bsutter/DemoSource/build.xml
labs/jbossesb/workspace/bsutter/DemoSource/build/
labs/jbossesb/workspace/bsutter/DemoSource/build/META-INF/
labs/jbossesb/workspace/bsutter/DemoSource/build/META-INF/deployment.xml
labs/jbossesb/workspace/bsutter/DemoSource/build/META-INF/jboss-esb.xml
labs/jbossesb/workspace/bsutter/DemoSource/build/Quickstart_bpm_orchestration5.esb
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor$1.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor$2.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor$3.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor.form
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SetupMessage.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SimpleJMSNotifier.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessage.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessageStart.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/Customer.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/OrderHeader.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/OrderItem.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/StoreAction.class
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/processDefinition/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/processDefinition/processdefinition.xml
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/check-origin.groovy
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/discount_service.groovy
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/display.groovy
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/fixer.groovy
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/intake_service.groovy
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_discount.groovy
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_key.groovy
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_priority.groovy
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/shipping_callback_service.groovy
labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/shipping_service.groovy
labs/jbossesb/workspace/bsutter/DemoSource/deployment.xml
labs/jbossesb/workspace/bsutter/DemoSource/images/
labs/jbossesb/workspace/bsutter/DemoSource/images/gear1.gif
labs/jbossesb/workspace/bsutter/DemoSource/images/java.gif
labs/jbossesb/workspace/bsutter/DemoSource/images/javaacro.gif
labs/jbossesb/workspace/bsutter/DemoSource/jbm-queue-service.xml
labs/jbossesb/workspace/bsutter/DemoSource/jbmq-queue-service.xml
labs/jbossesb/workspace/bsutter/DemoSource/jboss-esb.xml
labs/jbossesb/workspace/bsutter/DemoSource/jbossesb-properties.xml
labs/jbossesb/workspace/bsutter/DemoSource/jndi.properties
labs/jbossesb/workspace/bsutter/DemoSource/juddi.properties
labs/jbossesb/workspace/bsutter/DemoSource/lib/
labs/jbossesb/workspace/bsutter/DemoSource/lib/swing-layout-1.0.jar
labs/jbossesb/workspace/bsutter/DemoSource/listener.log
labs/jbossesb/workspace/bsutter/DemoSource/log4j.xml
labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/
labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/Review_Discount.xhtml
labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/Review_Order.xhtml
labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/forms.xml
labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/gpd.xml
labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/processdefinition.xml
labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/processimage.jpg
labs/jbossesb/workspace/bsutter/DemoSource/readme.txt
labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/
labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/gpd.xml
labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/processdefinition.xml
labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/processimage.jpg
labs/jbossesb/workspace/bsutter/DemoSource/scripts/
labs/jbossesb/workspace/bsutter/DemoSource/scripts/check-origin.groovy
labs/jbossesb/workspace/bsutter/DemoSource/scripts/discount_service.groovy
labs/jbossesb/workspace/bsutter/DemoSource/scripts/display.groovy
labs/jbossesb/workspace/bsutter/DemoSource/scripts/fixer.groovy
labs/jbossesb/workspace/bsutter/DemoSource/scripts/intake_service.groovy
labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_discount.groovy
labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_key.groovy
labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_priority.groovy
labs/jbossesb/workspace/bsutter/DemoSource/scripts/shipping_callback_service.groovy
labs/jbossesb/workspace/bsutter/DemoSource/scripts/shipping_service.groovy
labs/jbossesb/workspace/bsutter/DemoSource/smooks-config.xml
labs/jbossesb/workspace/bsutter/DemoSource/src/
labs/jbossesb/workspace/bsutter/DemoSource/src/ServiceAlertMonitor.form
labs/jbossesb/workspace/bsutter/DemoSource/src/ServiceAlertMonitor.java
labs/jbossesb/workspace/bsutter/DemoSource/src/org/
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SetupMessage.java
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SimpleJMSNotifier.java
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessage.java
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessageStart.java
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/Customer.java
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/OrderHeader.java
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/OrderItem.java
labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/StoreAction.java
labs/jbossesb/workspace/bsutter/DemoSource/transforms/
labs/jbossesb/workspace/bsutter/DemoSource/transforms/from-dvdstore.xml
labs/jbossesb/workspace/bsutter/DemoSource/transforms/from-petstore.xml
Log:
Added: labs/jbossesb/workspace/bsutter/DemoSource/.classpath
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/.classpath (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/.classpath 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="lib" path="lib/swing-layout-1.0.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/JBoss ESB"/>
+ <classpathentry kind="lib" path="C:/demo/standalone-soa-4.2.0.GA/jboss-soa-p-standalone.4.2.0/jboss-as/client/jboss-messaging-client.jar"/>
+ <classpathentry kind="lib" path="C:/demo/standalone-soa-4.2.0.GA/jboss-soa-p-standalone.4.2.0/jboss-as/client/log4j.jar"/>
+ <classpathentry kind="lib" path="C:/demo/standalone-soa-4.2.0.GA/jboss-soa-p-standalone.4.2.0/jboss-as/client/jbossall-client.jar"/>
+ <classpathentry kind="output" path="build/classes"/>
+</classpath>
Added: labs/jbossesb/workspace/bsutter/DemoSource/.project
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/.project (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/.project 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>OrderProcessing</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.codehaus.groovy.eclipse.groovyBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.codehaus.groovy.eclipse.groovyNature</nature>
+ </natures>
+</projectDescription>
Added: labs/jbossesb/workspace/bsutter/DemoSource/.settings/org.codehaus.groovy.eclipse.preferences.prefs
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/.settings/org.codehaus.groovy.eclipse.preferences.prefs (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/.settings/org.codehaus.groovy.eclipse.preferences.prefs 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,4 @@
+#Sun May 04 09:49:30 EDT 2008
+eclipse.preferences.version=1
+groovy.compiler.output.path=bin-groovy
+support.groovy=true
Added: labs/jbossesb/workspace/bsutter/DemoSource/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/.settings/org.eclipse.jdt.core.prefs 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,3 @@
+#Sun May 04 09:49:30 EDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,*.groovy
Added: labs/jbossesb/workspace/bsutter/DemoSource/CBRRules.drl
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/CBRRules.drl (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/CBRRules.drl 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,39 @@
+#created on: Oct 30, 2006
+package com.jboss.soa.esb.routing.cbr
+
+#list any import classes here.
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.store.OrderHeader;
+
+#declare any global variables here
+global java.util.List destinations;
+
+rule "Highest Priority Orders"
+
+ when
+ OrderHeader( orderPriority >= 3)
+ then
+ System.out.println("HIGHEST PRIORITY");
+ destinations.add("SuperSpecialCustomerService");
+
+end
+
+rule "Medium Priority Orders"
+
+ when
+ OrderHeader( orderPriority == 2 )
+ then
+ System.out.println("Medium Priority");
+ destinations.add("SpecialCustomerService");
+end
+
+rule "Low Priority Orders"
+
+ when
+ OrderHeader( orderPriority == 1 )
+ then
+ System.out.println("Low Priority");
+ destinations.add("RegularCustomerService");
+end
+
Added: labs/jbossesb/workspace/bsutter/DemoSource/Discount_Rules.drl
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/Discount_Rules.drl (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/Discount_Rules.drl 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,55 @@
+#created on: Oct 30, 2006
+package com.jboss.soa.esb.routing.cbr
+
+#list any import classes here.
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.store.OrderHeader;
+import org.jboss.soa.esb.store.Customer;
+
+global java.util.List destinations;
+
+
+rule "Logging"
+salience 20
+when
+ order: OrderHeader()
+ customer: Customer()
+then
+ System.out.println("Customer Status: " + customer.getStatus());
+ System.out.println("Order Total: " + order.getTotalAmount());
+ System.out.println("Order Priority: " + order.getOrderPriority());
+end
+
+rule "Customer Silver Status"
+salience 10
+ when
+ order: OrderHeader(orderPriority == 2)
+ then
+ order.setOrderDiscount(3.4);
+end
+
+rule "Customer Gold Status"
+salience 5
+ when
+ order: OrderHeader(orderPriority == 3)
+ then
+ order.setOrderDiscount(8.6);
+end
+
+rule "Customer Diamond Status"
+salience 1
+ when
+ order: OrderHeader(orderPriority == 4)
+ then
+ order.setOrderDiscount(12.9);
+end
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/Priority_Rules.drl
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/Priority_Rules.drl (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/Priority_Rules.drl 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,53 @@
+#created on: Oct 30, 2006
+package com.jboss.soa.esb.routing.cbr
+
+#list any import classes here.
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.store.OrderHeader;
+import org.jboss.soa.esb.store.Customer;
+
+global java.util.List destinations;
+
+
+rule "Logging"
+salience 20
+when
+ order: OrderHeader()
+ customer: Customer()
+then
+ order.setOrderPriority(1);
+end
+
+rule "Customer Silver Status"
+salience 10
+ when
+ customer: Customer(status > 10)
+ order: OrderHeader(totalAmount > 25)
+ then
+ order.setOrderPriority(2);
+end
+
+rule "Customer Gold Status"
+salience 5
+ when
+ customer: Customer(status >= 40)
+ order: OrderHeader(totalAmount > 50)
+ then
+ order.setOrderPriority(3);
+end
+
+rule "Customer Diamond Status"
+salience 1
+ when
+ customer: Customer(status >= 40)
+ order: OrderHeader(totalAmount > 150)
+ then
+ order.setOrderPriority(4);
+end
+
+
+
+
+
+
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/SampleOrder.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/SampleOrder.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/SampleOrder.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,12 @@
+<Order orderId="2" orderDate="Wed Nov 15 13:45:28 EST 2006" statusCode="0"
+netAmount="59.97" totalAmount="64.92" tax="4.95">
+ <Customer userName="user1" firstName="Rex" lastName="Myers" state="SD"/>
+ <OrderLines>
+ <OrderLine position="1" quantity="1">
+ <Product productId="364" title="Superman Returns" price="29.98"/>
+ </OrderLine>
+ <OrderLine position="2" quantity="1">
+ <Product productId="299" title="Pulp Fiction" price="29.99"/>
+ </OrderLine>
+ </OrderLines>
+</Order>
Added: labs/jbossesb/workspace/bsutter/DemoSource/SamplePetsOrder.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/SamplePetsOrder.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/SamplePetsOrder.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<Order orderId="1182" orderDate="Sat Oct 06 13:41:16 EDT 2007" status="P" totalPrice="188.29" username="j2ee" shipToFirstName="Sally" shipToLastName="Smith" shipState="CA">
+ <LineItems>
+ <LineItem lineNumber="1" quantity="2">
+ <Item itemId="EST-1" listPrice="16.5" />
+ </LineItem>
+ <LineItem lineNumber="2" quantity="1">
+ <Item itemId="EST-27" listPrice="155.29" />
+ </LineItem>
+ </LineItems>
+</Order>
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/META-INF/deployment.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/META-INF/deployment.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/META-INF/deployment.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,6 @@
+<?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:deployment=smooks.esb</depends>
+</jbossesb-deployment>
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/META-INF/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/META-INF/jboss-esb.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/META-INF/jboss-esb.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,315 @@
+<?xml version="1.0"?>
+<jbossesb parameterReloadSecs="5"
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
+ <providers>
+ <jms-provider 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" name="JMSProvider">
+ <jms-bus busid="startGwChannel">
+ <jms-message-filter dest-name="queue/quickstart_simple_cbr_Request" dest-type="QUEUE"/>
+ <!-- quickstart_bpm_orchestration5_start_gw
+ This queue is used for JPetstore's order
+ queue/quickstart_simple_cbr_Request -->
+ </jms-bus>
+ <jms-bus busid="startEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_start_esb" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="intakeServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_intake_service_esb" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="discountServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_discount_service_esb" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="shippingServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_shipping_service_esb" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="expressServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_ConciergeManager" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="distributionServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_DistributionManager" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="basicShippingServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_BasicShipping" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="rejectionEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_Rejection" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="rejectionWorkflowChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_RejectionWorkflow" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="timeoutChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_Timeout" dest-type="QUEUE"/>
+ </jms-bus>
+ </jms-provider>
+ <fs-provider name="FileSystemProvider">
+ <fs-bus busid="warehouseCallbackChannel">
+ <fs-message-filter directory="/tmp/fromWarehouse"
+ error-delete="true" error-suffix="error"
+ input-suffix="shipmentNotice.xml" post-delete="true"
+ post-suffix="done" work-suffix="working"/>
+ </fs-bus>
+ <fs-bus busid="warehouseCallbackChannelESB">
+ <fs-message-filter directory="/tmp/fromWarehouse"
+ error-delete="true" error-suffix="esbError"
+ input-suffix="shipmentNotice.xml.esb" post-delete="true" work-suffix="esbWorking"/>
+ </fs-bus>
+ </fs-provider>
+ </providers>
+ <services>
+ <!-- removed the deploy service, the process definition needs to be deployed by a .par and/or from
+ the graphical process designer -->
+ <service category="BPM_orchestration5_Starter_Service"
+ description="BPM Orchestration Sample 5: Use this service to start a process instance" name="Starter_Service">
+ <listeners>
+ <jms-listener busidref="startGwChannel" is-gateway="true"
+ maxThreads="1" name="JMS-Gateway"/>
+ <jms-listener busidref="startEsbChannel" maxThreads="1" name="ESB-Listener"/>
+ </listeners>
+ <actions>
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="setup_key">
+ <property name="script" value="/scripts/setup_key.groovy"/>
+ </action>
+ <action class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor" name="start_a_new_order_process">
+ <property name="command" value="StartProcessInstanceCommand"/>
+ <property name="esbToBpmVars">
+ <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT"/>
+ </property>
+ <property name="key" value="body.businessKey"/>
+ <property name="process-definition-name" value="bpm5_ESBOrderProcess"/>
+ </action>
+ <action class="org.jboss.soa.esb.actions.SystemPrintln" name="dump2">
+ <property name="message" value="After"/>
+ <property name="printfull" value="true"/>
+ </action>
+ </actions>
+ </service>
+ <service category="BPM_Orchestration5"
+ description="IntakeService: transforms, massages, calculates priority" name="IntakeService">
+ <listeners>
+ <jms-listener busidref="intakeServiceEsbChannel" maxThreads="1" name="ESB-Listener"/>
+ </listeners>
+ <actions mep="RequestResponse">
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="groovy">
+ <property name="script" value="/scripts/intake_service.groovy"/>
+ </action>
+ <!-- transform -->
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="discover-message-origin">
+ <property name="script" value="/scripts/check-origin.groovy"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.actions.converters.SmooksTransformer" name="transform">
+ <property name="resource-config" value="/smooks-config.xml"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SetupMessage" name="setupMessage">
+ <property name="status" value="40"/>
+ <!-- status was not in order XML, this is just for demo purposes -->
+ </action>
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="display">
+ <property name="script" value="/scripts/display.groovy"/>
+ </action>
+ <!-- Use the BRP to calculate the order priority -->
+ <action class="org.jboss.soa.esb.actions.BusinessRulesProcessor" name="calc_order_priority">
+ <property name="object-paths">
+ <object-path esb="body.orderHeader"/>
+ <object-path esb="body.customer"/>
+ </property>
+ <property name="ruleReload" value="true"/>
+ <property name="ruleSet" value="Priority_Rules.drl"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="setupPriority">
+ <property name="script" value="/scripts/setup_priority.groovy"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="BODY_KEY" value="order_orderPriority"/>
+ <property name="PREPENDED_TEXT" value="Priority"/>
+ </action>
+ </actions>
+ </service>
+ <service category="BPM_Orchestration5" description="DiscountService" name="DiscountService">
+ <listeners>
+ <jms-listener busidref="discountServiceEsbChannel" maxThreads="1" name="ESB-Listener"/>
+ </listeners>
+ <actions mep="RequestResponse">
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="groovy">
+ <property name="script" value="/scripts/discount_service.groovy"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="display">
+ <property name="script" value="/scripts/display.groovy"/>
+ </action>
+ <action class="org.jboss.soa.esb.actions.BusinessRulesProcessor" name="discount_calc">
+ <property name="object-paths">
+ <object-path esb="body.orderHeader"/>
+ <object-path esb="body.customer"/>
+ </property>
+ <property name="ruleReload" value="true"/>
+ <property name="ruleSet" value="Discount_Rules.drl"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="setupDiscount">
+ <property name="script" value="/scripts/setup_discount.groovy"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="BODY_KEY" value="order_orderDiscount"/>
+ <property name="PREPENDED_TEXT" value="Discount Service"/>
+ </action>
+ </actions>
+ </service>
+ <service category="BPM_Orchestration5" description="ShippingService" name="ShippingService">
+ <listeners>
+ <jms-listener busidref="shippingServiceEsbChannel" maxThreads="1" name="ESB-Listener"/>
+ </listeners>
+ <actions mep="RequestResponse">
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="groovy">
+ <property name="script" value="/scripts/shipping_service.groovy"/>
+ </action>
+ <action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
+ <property name="destinations">
+ <route-to destination-name="SuperSpecialCustomerService"
+ service-category="ExpressWarehouseManager" service-name="ExpressWarehouseService"/>
+ <route-to destination-name="SpecialCustomerService"
+ service-category="DistributionWarehouseManager" service-name="DistributionWarehouseService"/>
+ <route-to destination-name="RegularCustomerService"
+ service-category="BasicShipping" service-name="BasicShipperService"/>
+ </property>
+ <property name="object-paths">
+ <object-path esb="body.orderHeader"/>
+ <object-path esb="body.customer"/>
+ </property>
+ <property name="ruleReload" value="true"/>
+ <property name="ruleSet" value="CBRRules.drl"/>
+ </action>
+ </actions>
+ </service>
+ <service category="ExpressWarehouseManager"
+ description="For highest priority customers" name="ExpressWarehouseService">
+ <listeners>
+ <jms-listener busidref="expressServiceEsbChannel" maxThreads="1" name="expressServiceEsbChannel"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="BODY_KEY" value="orderHeader"/>
+ <property name="PREPENDED_TEXT" value="Express:Highest Priority Customers/Orders"/>
+ </action>
+ </actions>
+ </service>
+ <service category="DistributionWarehouseManager"
+ description="For medium priority customers" name="DistributionWarehouseService">
+ <listeners>
+ <jms-listener busidref="distributionServiceEsbChannel"
+ maxThreads="1" name="distributionServiceEsbChannel"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="BODY_KEY" value="orderHeader"/>
+ <property name="PREPENDED_TEXT" value="Distribution Manager:Medium Priority Customers/Orders"/>
+ </action>
+ </actions>
+ </service>
+ <service category="BasicShipping"
+ description="For low priority customers" name="BasicShipperService">
+ <listeners>
+ <jms-listener busidref="basicShippingServiceEsbChannel"
+ maxThreads="1" name="basicShippingServiceEsbChannel"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="BODY_KEY" value="orderHeader"/>
+ <property name="PREPENDED_TEXT" value="Basic:Lowest Priority Customers/Orders"/>
+ </action>
+ </actions>
+ </service>
+ <service category="RejectionCategory" description="Handles Rejection" name="RejectionService">
+ <listeners>
+ <jms-listener busidref="rejectionEsbChannel" maxThreads="1" name="rejectionListener"/>
+ </listeners>
+ <actions mep="RequestResponse">
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="PREPENDED_TEXT" value="REJECT, REJECT! Bye, Bye"/>
+ </action>
+ </actions>
+ </service>
+ <service category="bpm_orchestration5"
+ description="Handles Async Callback from Warehouse" name="WarehouseCallbackService">
+ <listeners>
+ <fs-listener busidref="warehouseCallbackChannel" is-gateway="true"
+ maxThreads="1" name="warehouseCallbackGatewayListener"/>
+ <fs-listener busidref="warehouseCallbackChannelESB" maxThreads="1" name="warehouseCallbackESBListener"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="signalCallback">
+ <property name="script" value="/scripts/shipping_callback_service.groovy"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="PREPENDED_TEXT" value="Received Shipment Notice"/>
+ </action>
+ </actions>
+ </service>
+ <service category="bpm_orchestration5"
+ description="starts another workflow" name="RejectionWorkflow">
+ <listeners>
+ <jms-listener busidref="rejectionWorkflowChannel" maxThreads="1" name="rejectionWorkflowListener"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor" name="start_a_new_rejection_workflow">
+ <property name="command" value="StartProcessInstanceCommand"/>
+ <property name="esbToBpmVars">
+ <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT"/>
+ </property>
+ <property name="key" value="body.businessKey"/>
+ <property name="process-definition-name" value="rejectionWorkflow"/>
+ </action>
+ </actions>
+ </service>
+ <service category="bpm_orchestration5"
+ description="sends a msg to the monitor" name="TimeoutService">
+ <listeners>
+ <jms-listener busidref="timeoutChannel" maxThreads="1" name="timeoutListener"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="PREPENDED_TEXT" value="Still Waiting..."/>
+ </action>
+
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/Quickstart_bpm_orchestration5.esb
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/Quickstart_bpm_orchestration5.esb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor$1.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor$1.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor$2.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor$2.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor$3.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor$3.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor.form
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor.form (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/ServiceAlertMonitor.form 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="3"/>
+ <Property name="title" type="java.lang.String" value="Service Alert Monitor"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <Events>
+ <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
+ </Events>
+ <AuxValues>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jScrollPane1" alignment="0" pref="265" max="32767" attributes="0"/>
+ <Component id="jButton1" alignment="0" pref="265" max="32767" attributes="0"/>
+ <Component id="jLabel3" alignment="0" pref="265" max="32767" attributes="0"/>
+ <Component id="jLabel1" alignment="0" pref="265" max="32767" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jLabel1" min="-2" pref="39" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jScrollPane1" min="-2" pref="98" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabel3" pref="84" max="32767" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jButton1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Tahoma" size="18" style="0"/>
+ </Property>
+ <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="cc" green="0" red="0" type="rgb"/>
+ </Property>
+ <Property name="horizontalAlignment" type="int" value="0"/>
+ <Property name="text" type="java.lang.String" value="Service Alert Monitor"/>
+ </Properties>
+ </Component>
+ <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+ <AuxValues>
+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTextArea" name="textAreaOrderQueue">
+ <Properties>
+ <Property name="columns" type="int" value="20"/>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Arial" size="14" style="0"/>
+ </Property>
+ <Property name="rows" type="int" value="5"/>
+ <Property name="tabSize" type="int" value="2"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Component class="javax.swing.JButton" name="jButton1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Clear"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel3">
+ <Properties>
+ <Property name="horizontalAlignment" type="int" value="0"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+</Form>
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SetupMessage.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SetupMessage.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SimpleJMSNotifier.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SimpleJMSNotifier.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessage.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessage.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessageStart.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessageStart.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/Customer.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/Customer.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/OrderHeader.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/OrderHeader.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/OrderItem.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/OrderItem.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/StoreAction.class
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/org/jboss/soa/esb/store/StoreAction.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/processDefinition/processdefinition.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/processDefinition/processdefinition.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/processDefinition/processdefinition.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition
+ name="bpm5_ESBOrderProcess">
+ <start-state name="start">
+ <transition name="" to="Intake Order"></transition>
+ </start-state>
+
+ <node name="Intake Order">
+
+ <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbCategoryName>BPM_Orchestration5</esbCategoryName>
+ <esbServiceName>IntakeService</esbServiceName>
+ <!-- async call of IntakeService -->
+ <bpmToEsbVars>
+ <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping esb="body.entireOrderAsXML" bpm="entireOrderAsXML" />
+ <mapping esb="body.orderHeader" bpm="entireOrderAsObject" />
+ <mapping esb="body.customer" bpm="entireCustomerAsObject" />
+ <mapping esb="body.order_orderId" bpm="order_orderid" />
+ <mapping esb="body.order_totalAmount" bpm="order_totalamount" />
+ <mapping esb="body.order_orderPriority" bpm="order_priority" />
+ <mapping esb="body.customer_firstName" bpm="customer_firstName" />
+ <mapping esb="body.customer_fullName" bpm="customer_fullName" />
+ <mapping esb="body.customer_lastName" bpm="customer_lastName" />
+ <mapping esb="body.customer_status" bpm="customer_status" />
+ </esbToBpmVars>
+ </action>
+
+ <transition name="" to="Review Order"></transition>
+ </node>
+
+ <task-node name="Review Order">
+ <task name="Order Review">
+ <assignment actor-id="user"></assignment>
+ <controller>
+ <variable name="customer_firstName" access="read,write,required"></variable>
+ <variable name="customer_lastName" access="read,write,required"></variable>
+ <variable name="customer_status" access="read"></variable>
+ <variable name="order_totalamount" access="read"></variable>
+ <variable name="order_priority" access="read,write"></variable>
+ <variable name="order_orderid" access="read"></variable>
+ <variable name="order_discount" access="read"></variable>
+ <variable name="entireOrderAsXML" access="read"></variable>
+ </controller>
+ </task>
+ <transition to="Calculate Discount" name="OK"></transition>
+ </task-node>
+
+ <node name="Calculate Discount">
+ <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbCategoryName>BPM_Orchestration5</esbCategoryName>
+ <esbServiceName>DiscountService</esbServiceName>
+ <bpmToEsbVars>
+ <mapping bpm="entireCustomerAsObject" esb="customer" />
+ <mapping bpm="entireOrderAsObject" esb="orderHeader" />
+ <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping bpm="entireOrderAsObject" esb="order" />
+ <mapping esb="body.order_orderDiscount" bpm="order_discount" />
+ </esbToBpmVars>
+ </action>
+ <transition to="Review Discount" name=""></transition>
+ </node>
+
+ <node name="Shipment and Close">
+ <action class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbNotifier">
+ <esbServiceName>
+ ShippingService
+ </esbServiceName>
+ <esbCategoryName>
+ BPM_Orchestration5
+ </esbCategoryName>
+ <bpmToEsbVars>
+ <mapping bpm="entireCustomerAsObject" esb="customer" />
+ <mapping bpm="entireOrderAsObject" esb="orderHeader" />
+ <mapping bpm="entireOrderAsXML" esb="entireOrderAsXML" />
+ </bpmToEsbVars>
+ </action>
+ <transition to="end"></transition>
+ </node>
+
+ <task-node name="Review Discount">
+ <task name="Discount Review">
+ <assignment actor-id="manager"></assignment>
+ <controller>
+ <variable name="customer_firstName" access="read,write,required"></variable>
+ <variable name="customer_lastName" access="read,write,required"></variable>
+ <variable name="customer_status" access="read"></variable>
+ <variable name="order_totalamount" access="read"></variable>
+ <variable name="order_priority" access="read,write"></variable>
+ <variable name="order_orderid" access="read"></variable>
+ <variable name="order_discount" access="read"></variable>
+ <variable name="entireOrderAsXML" access="read"></variable>
+ </controller>
+ </task>
+ <transition to="Shipment and Close" name="OK"></transition>
+ </task-node>
+
+ <end-state name="end"></end-state>
+
+</process-definition>
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/check-origin.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/check-origin.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/check-origin.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,11 @@
+
+def messageText = message.getBody().get();
+def order = new XmlParser().parseText(messageText);
+
+if(order.OrderLines.size() == 1) {
+ message.getProperties().setProperty("from", "dvdstore");
+} else if(order.LineItems.size() == 1) {
+ message.getProperties().setProperty("from", "petstore");
+}
+
+println "Message from: " + message.getProperties().getProperty("from");
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/discount_service.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/discount_service.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/discount_service.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,3 @@
+import org.jboss.soa.esb.message.*
+
+println " Begin Discount Service "
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/display.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/display.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/display.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,6 @@
+import org.jboss.soa.esb.message.*
+
+println " == BEGIN =="
+println "orderHeader: " + message.body.get("orderHeader")
+println "customer: " + message.body.get("customer")
+println " == END =="
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/fixer.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/fixer.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/fixer.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,11 @@
+import org.jboss.soa.esb.message.*
+
+println "*********** BEGIN FIXER ***********"
+
+println "In: " + new String(message.body.contents)
+
+message.body.add(new String(message.body.contents))
+
+println "Out: " + new String(message.body.get())
+
+println "************ END FIXER ************"
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/intake_service.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/intake_service.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/intake_service.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,5 @@
+import org.jboss.soa.esb.message.*
+
+println " == Begin Intake Service =="
+println "DEFAULT: " + message.body.get()
+println " == End Intake Service =="
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_discount.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_discount.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_discount.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,13 @@
+import org.jboss.soa.esb.message.*
+import org.jboss.soa.esb.store.OrderHeader
+
+println "*********** BEGIN ORDER DISCOUNT ***********"
+
+println "Order: " + message.body.get("orderHeader")
+order = (OrderHeader) message.body.get("orderHeader")
+println "Order Discount: " + order.getOrderDiscount()
+
+message.body.add("order_orderDiscount",order.getOrderDiscount())
+
+
+println "************ END ORDER DISCOUNT ************"
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_key.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_key.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_key.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,11 @@
+import org.jboss.soa.esb.message.*
+
+println "*********** BEGIN ORDER KEY SETUP ***********"
+
+def messageText = message.getBody().get();
+def order = new XmlParser().parseText(messageText);
+def key = order['@orderId']
+println "Key: " + key
+message.getBody().add("businessKey",key);
+
+println "************ END ORDER KEY SETUP ************"
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_priority.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_priority.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/setup_priority.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,12 @@
+import org.jboss.soa.esb.message.*
+import org.jboss.soa.esb.store.OrderHeader
+
+println "*********** BEGIN ORDER PRIORITY FIXER ***********"
+
+println "Order: " + message.body.get("orderHeader")
+order = (OrderHeader) message.body.get("orderHeader")
+
+message.body.add("order_orderPriority",order.getOrderPriority())
+
+
+println "************ END ORDER PRIORITY FIXER ************"
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/shipping_callback_service.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/shipping_callback_service.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/shipping_callback_service.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -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 **"
+
Added: labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/shipping_service.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/shipping_service.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build/classes/scripts/shipping_service.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,21 @@
+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 Shipping Service "
+
+println "Original XML: " + message.body.get("entireOrderAsXML")
+println "Customer: " + message.body.get("customer")
+println "Order: " + message.body.get("orderHeader")
+
+// the action order information is routed to the appropriate fullfillment service via the
+// CBR, this is to handle the eventual callback where we need the replyTo EPR
+
+xmlEPR = EPRHelper.toXMLString(message.getHeader().getCall().getReplyTo())
+def writer=new File("/tmp/shipmentNotice.xml").newPrintWriter()
+writer.print(xmlEPR)
+writer.close()
+
+println " End Shipping Service "
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/build.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/build.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/build.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,85 @@
+<project name="Quickstart_bpm_orchestration5" default="deploy" basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <property name="deploy.exploded" value="true"/>
+
+ <property name="additional.deploys" value="Priority_Rules.drl,Discount_Rules.drl,CBRRules.drl,smooks-config.xml,scripts/**,transforms/**"/>
+
+ <!-- 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="run">
+ <echo>Follow the instructions in the readme.</echo>
+ </target>
+
+ <target name="runtest">
+ <echo>Follow the instructions in the readme.</echo>
+ </target>
+
+ <target name="deployProcess" description="deploys the process definition" depends="jbossesb-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 the process instance">
+ <echo>Sends a message to start the process instance</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.test.SendJMSMessageStart" failonerror="true">
+ <arg value="SampleOrder.xml"/>
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+ <target name="startProcessPets" depends="compile" description="Sends a message to start the process instance">
+ <echo>Sends a message to start the process instance</echo>
+ <java fork="yes" classname="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.test.SendJMSMessageStart" failonerror="true">
+ <arg value="SamplePetsOrder.xml"/>
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+ <target name="startMonitor" depends="compile" description="Sends a message to start the process instance">
+ <echo>Starting the Swing-based Service Monitor</echo>
+ <java fork="yes" classname="ServiceAlertMonitor" failonerror="true">
+ <arg value="Monitor 5"/>
+ <arg value="quickstart_bpm_orchestration5_monitor"/>
+ <arg value="images/java.gif"/>
+ <classpath refid="exec-classpath"/>
+ </java>
+ </target>
+
+ <target name="refreshRules" depends="dependencies">
+ <echo>Deploy to: ${org.jboss.esb.server.deploy.dir}/${ant.project.name}.esb</echo>
+ <copy todir="${org.jboss.esb.server.deploy.dir}/${ant.project.name}.esb">
+ <fileset dir="${basedir}" includes="Priority_Rules.drl" />
+ <fileset dir="${basedir}" includes="Discount_Rules.drl" />
+ <fileset dir="${basedir}" includes="CBRRules.drl" />
+ </copy>
+
+ </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. Carefully review the Readme.</echo>
+ <echo message='******************' />
+ </target>
+</project>
Added: labs/jbossesb/workspace/bsutter/DemoSource/deployment.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/deployment.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/deployment.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,6 @@
+<?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:deployment=smooks.esb</depends>
+</jbossesb-deployment>
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/images/gear1.gif
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/images/gear1.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/images/java.gif
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/images/java.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/images/javaacro.gif
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/images/javaacro.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/jbm-queue-service.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/jbm-queue-service.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_start_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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_start_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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_intake_service_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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_intake_service_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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_discount_service_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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_discount_service_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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_shipping_service_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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_shipping_service_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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_monitor"
+ 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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_ConciergeManager"
+ 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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_DistributionManager"
+ 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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_BasicShipping"
+ 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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_Rejection"
+ 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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_RejectionWorkflow"
+ 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.messaging.destination:service=Queue,name=quickstart_bpm_orchestration5_Timeout"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ </mbean>
+
+</server>
Added: labs/jbossesb/workspace/bsutter/DemoSource/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/jbmq-queue-service.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/jbmq-queue-service.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=quickstart_bpm_orchestration5_start_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=quickstart_bpm_orchestration5_start_gw">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=quickstart_bpm_orchestration5_intake_service_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=quickstart_bpm_orchestration5_intake_service_esb_reply">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=quickstart_bpm_orchestration5_discount_service_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=quickstart_bpm_orchestration5_discount_service_esb_reply">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=quickstart_bpm_orchestration5_shipping_service_esb">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=quickstart_bpm_orchestration5_shipping_service_esb_reply">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+
+ <mbean code="org.jboss.mq.server.jmx.Queue"
+ name="jboss.mq.destination:service=Queue,name=quickstart_bpm_orchestration5_monitor">
+ <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_orchestration5_ConciergeManager">
+ <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_orchestration5_DistributionManager">
+ <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_orchestration5_BasicShipping">
+ <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_orchestration5_Rejection">
+ <depends optional-attribute-name="DestinationManager">
+ jboss.mq:service=DestinationManager
+ </depends>
+ </mbean>
+
+
+</server>
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/jboss-esb.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/jboss-esb.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/jboss-esb.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,315 @@
+<?xml version="1.0"?>
+<jbossesb parameterReloadSecs="5"
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
+ <providers>
+ <jms-provider 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" name="JMSProvider">
+ <jms-bus busid="startGwChannel">
+ <jms-message-filter dest-name="queue/quickstart_simple_cbr_Request" dest-type="QUEUE"/>
+ <!-- quickstart_bpm_orchestration5_start_gw
+ This queue is used for JPetstore's order
+ queue/quickstart_simple_cbr_Request -->
+ </jms-bus>
+ <jms-bus busid="startEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_start_esb" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="intakeServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_intake_service_esb" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="discountServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_discount_service_esb" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="shippingServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_shipping_service_esb" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="expressServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_ConciergeManager" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="distributionServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_DistributionManager" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="basicShippingServiceEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_BasicShipping" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="rejectionEsbChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_Rejection" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="rejectionWorkflowChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_RejectionWorkflow" dest-type="QUEUE"/>
+ </jms-bus>
+ <jms-bus busid="timeoutChannel">
+ <jms-message-filter
+ dest-name="queue/quickstart_bpm_orchestration5_Timeout" dest-type="QUEUE"/>
+ </jms-bus>
+ </jms-provider>
+ <fs-provider name="FileSystemProvider">
+ <fs-bus busid="warehouseCallbackChannel">
+ <fs-message-filter directory="/tmp/fromWarehouse"
+ error-delete="true" error-suffix="error"
+ input-suffix="shipmentNotice.xml" post-delete="true"
+ post-suffix="done" work-suffix="working"/>
+ </fs-bus>
+ <fs-bus busid="warehouseCallbackChannelESB">
+ <fs-message-filter directory="/tmp/fromWarehouse"
+ error-delete="true" error-suffix="esbError"
+ input-suffix="shipmentNotice.xml.esb" post-delete="true" work-suffix="esbWorking"/>
+ </fs-bus>
+ </fs-provider>
+ </providers>
+ <services>
+ <!-- removed the deploy service, the process definition needs to be deployed by a .par and/or from
+ the graphical process designer -->
+ <service category="BPM_orchestration5_Starter_Service"
+ description="BPM Orchestration Sample 5: Use this service to start a process instance" name="Starter_Service">
+ <listeners>
+ <jms-listener busidref="startGwChannel" is-gateway="true"
+ maxThreads="1" name="JMS-Gateway"/>
+ <jms-listener busidref="startEsbChannel" maxThreads="1" name="ESB-Listener"/>
+ </listeners>
+ <actions>
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="setup_key">
+ <property name="script" value="/scripts/setup_key.groovy"/>
+ </action>
+ <action class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor" name="start_a_new_order_process">
+ <property name="command" value="StartProcessInstanceCommand"/>
+ <property name="esbToBpmVars">
+ <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT"/>
+ </property>
+ <property name="key" value="body.businessKey"/>
+ <property name="process-definition-name" value="bpm5_ESBOrderProcess"/>
+ </action>
+ <action class="org.jboss.soa.esb.actions.SystemPrintln" name="dump2">
+ <property name="message" value="After"/>
+ <property name="printfull" value="true"/>
+ </action>
+ </actions>
+ </service>
+ <service category="BPM_Orchestration5"
+ description="IntakeService: transforms, massages, calculates priority" name="IntakeService">
+ <listeners>
+ <jms-listener busidref="intakeServiceEsbChannel" maxThreads="1" name="ESB-Listener"/>
+ </listeners>
+ <actions mep="RequestResponse">
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="groovy">
+ <property name="script" value="/scripts/intake_service.groovy"/>
+ </action>
+ <!-- transform -->
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="discover-message-origin">
+ <property name="script" value="/scripts/check-origin.groovy"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.actions.converters.SmooksTransformer" name="transform">
+ <property name="resource-config" value="/smooks-config.xml"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SetupMessage" name="setupMessage">
+ <property name="status" value="40"/>
+ <!-- status was not in order XML, this is just for demo purposes -->
+ </action>
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="display">
+ <property name="script" value="/scripts/display.groovy"/>
+ </action>
+ <!-- Use the BRP to calculate the order priority -->
+ <action class="org.jboss.soa.esb.actions.BusinessRulesProcessor" name="calc_order_priority">
+ <property name="object-paths">
+ <object-path esb="body.orderHeader"/>
+ <object-path esb="body.customer"/>
+ </property>
+ <property name="ruleReload" value="true"/>
+ <property name="ruleSet" value="Priority_Rules.drl"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="setupPriority">
+ <property name="script" value="/scripts/setup_priority.groovy"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="BODY_KEY" value="order_orderPriority"/>
+ <property name="PREPENDED_TEXT" value="Priority"/>
+ </action>
+ </actions>
+ </service>
+ <service category="BPM_Orchestration5" description="DiscountService" name="DiscountService">
+ <listeners>
+ <jms-listener busidref="discountServiceEsbChannel" maxThreads="1" name="ESB-Listener"/>
+ </listeners>
+ <actions mep="RequestResponse">
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="groovy">
+ <property name="script" value="/scripts/discount_service.groovy"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="display">
+ <property name="script" value="/scripts/display.groovy"/>
+ </action>
+ <action class="org.jboss.soa.esb.actions.BusinessRulesProcessor" name="discount_calc">
+ <property name="object-paths">
+ <object-path esb="body.orderHeader"/>
+ <object-path esb="body.customer"/>
+ </property>
+ <property name="ruleReload" value="true"/>
+ <property name="ruleSet" value="Discount_Rules.drl"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="setupDiscount">
+ <property name="script" value="/scripts/setup_discount.groovy"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="BODY_KEY" value="order_orderDiscount"/>
+ <property name="PREPENDED_TEXT" value="Discount Service"/>
+ </action>
+ </actions>
+ </service>
+ <service category="BPM_Orchestration5" description="ShippingService" name="ShippingService">
+ <listeners>
+ <jms-listener busidref="shippingServiceEsbChannel" maxThreads="1" name="ESB-Listener"/>
+ </listeners>
+ <actions mep="RequestResponse">
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="groovy">
+ <property name="script" value="/scripts/shipping_service.groovy"/>
+ </action>
+ <action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter">
+ <property name="destinations">
+ <route-to destination-name="SuperSpecialCustomerService"
+ service-category="ExpressWarehouseManager" service-name="ExpressWarehouseService"/>
+ <route-to destination-name="SpecialCustomerService"
+ service-category="DistributionWarehouseManager" service-name="DistributionWarehouseService"/>
+ <route-to destination-name="RegularCustomerService"
+ service-category="BasicShipping" service-name="BasicShipperService"/>
+ </property>
+ <property name="object-paths">
+ <object-path esb="body.orderHeader"/>
+ <object-path esb="body.customer"/>
+ </property>
+ <property name="ruleReload" value="true"/>
+ <property name="ruleSet" value="CBRRules.drl"/>
+ </action>
+ </actions>
+ </service>
+ <service category="ExpressWarehouseManager"
+ description="For highest priority customers" name="ExpressWarehouseService">
+ <listeners>
+ <jms-listener busidref="expressServiceEsbChannel" maxThreads="1" name="expressServiceEsbChannel"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="BODY_KEY" value="orderHeader"/>
+ <property name="PREPENDED_TEXT" value="Express:Highest Priority Customers/Orders"/>
+ </action>
+ </actions>
+ </service>
+ <service category="DistributionWarehouseManager"
+ description="For medium priority customers" name="DistributionWarehouseService">
+ <listeners>
+ <jms-listener busidref="distributionServiceEsbChannel"
+ maxThreads="1" name="distributionServiceEsbChannel"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="BODY_KEY" value="orderHeader"/>
+ <property name="PREPENDED_TEXT" value="Distribution Manager:Medium Priority Customers/Orders"/>
+ </action>
+ </actions>
+ </service>
+ <service category="BasicShipping"
+ description="For low priority customers" name="BasicShipperService">
+ <listeners>
+ <jms-listener busidref="basicShippingServiceEsbChannel"
+ maxThreads="1" name="basicShippingServiceEsbChannel"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="BODY_KEY" value="orderHeader"/>
+ <property name="PREPENDED_TEXT" value="Basic:Lowest Priority Customers/Orders"/>
+ </action>
+ </actions>
+ </service>
+ <service category="RejectionCategory" description="Handles Rejection" name="RejectionService">
+ <listeners>
+ <jms-listener busidref="rejectionEsbChannel" maxThreads="1" name="rejectionListener"/>
+ </listeners>
+ <actions mep="RequestResponse">
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="PREPENDED_TEXT" value="REJECT, REJECT! Bye, Bye"/>
+ </action>
+ </actions>
+ </service>
+ <service category="bpm_orchestration5"
+ description="Handles Async Callback from Warehouse" name="WarehouseCallbackService">
+ <listeners>
+ <fs-listener busidref="warehouseCallbackChannel" is-gateway="true"
+ maxThreads="1" name="warehouseCallbackGatewayListener"/>
+ <fs-listener busidref="warehouseCallbackChannelESB" maxThreads="1" name="warehouseCallbackESBListener"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action
+ class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor" name="signalCallback">
+ <property name="script" value="/scripts/shipping_callback_service.groovy"/>
+ </action>
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="PREPENDED_TEXT" value="Received Shipment Notice"/>
+ </action>
+ </actions>
+ </service>
+ <service category="bpm_orchestration5"
+ description="starts another workflow" name="RejectionWorkflow">
+ <listeners>
+ <jms-listener busidref="rejectionWorkflowChannel" maxThreads="1" name="rejectionWorkflowListener"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor" name="start_a_new_rejection_workflow">
+ <property name="command" value="StartProcessInstanceCommand"/>
+ <property name="esbToBpmVars">
+ <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT"/>
+ </property>
+ <property name="key" value="body.businessKey"/>
+ <property name="process-definition-name" value="rejectionWorkflow"/>
+ </action>
+ </actions>
+ </service>
+ <service category="bpm_orchestration5"
+ description="sends a msg to the monitor" name="TimeoutService">
+ <listeners>
+ <jms-listener busidref="timeoutChannel" maxThreads="1" name="timeoutListener"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action
+ class="org.jboss.soa.esb.samples.quickstarts.bpm_orchestration5.esb_actions.SimpleJMSNotifier" name="monitor">
+ <property name="ALERT_QUEUE_NAME" value="quickstart_bpm_orchestration5_monitor"/>
+ <property name="PREPENDED_TEXT" value="Still Waiting..."/>
+ </action>
+
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Added: labs/jbossesb/workspace/bsutter/DemoSource/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/jbossesb-properties.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/jbossesb-properties.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -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/workspace/bsutter/DemoSource/jndi.properties
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/jndi.properties (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/jndi.properties 2008-07-01 18:44:20 UTC (rev 20858)
@@ -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/workspace/bsutter/DemoSource/juddi.properties
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/juddi.properties (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/juddi.properties 2008-07-01 18:44:20 UTC (rev 20858)
@@ -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/workspace/bsutter/DemoSource/lib/swing-layout-1.0.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/lib/swing-layout-1.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/listener.log
===================================================================
Added: labs/jbossesb/workspace/bsutter/DemoSource/log4j.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/log4j.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/log4j.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -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/workspace/bsutter/DemoSource/processDefinition/Review_Discount.xhtml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/Review_Discount.xhtml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/Review_Discount.xhtml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,78 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
+
+<!-- the DOCTYPE means we are required to use html for a root element -->
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tf="http://jbpm.org/jsf/tf"
+ xmlns:jbpm="http://jbpm.org/jsf">
+
+ <ui:component>
+
+ <jbpm:dataform>
+
+ <f:facet name="header">
+ <h:outputText value="#{taskName}"/>
+ </f:facet>
+
+ <!-- TASKFORM ROWS -->
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="customer_firstName"/>
+ </f:facet>
+ <h:inputText value="#{var['customer_firstName']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="customer_lastName"/>
+ </f:facet>
+ <h:inputText value="#{var['customer_lastName']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="customer_status"/>
+ </f:facet>
+ <h:inputText value="#{var['customer_status']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="order_totalamount"/>
+ </f:facet>
+ <h:inputText value="#{var['order_totalamount']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="order_priority"/>
+ </f:facet>
+ <h:inputText value="#{var['order_priority']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="order_orderid"/>
+ </f:facet>
+ <h:inputText value="#{var['order_orderid']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="order_discount"/>
+ </f:facet>
+ <h:inputText value="#{var['order_discount']}" />
+ </jbpm:datacell>
+
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="Actions"/>
+ </f:facet>
+ <!-- TASKFORM BUTTONS -->
+ <tf:saveButton value="Save"/>
+ <tf:transitionButton transition="OK" value="Approve"/>
+ <tf:transitionButton transition="to Reject" value="Reject"/>
+ </jbpm:datacell>
+
+ </jbpm:dataform>
+
+ </ui:component>
+
+</html>
Added: labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/Review_Order.xhtml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/Review_Order.xhtml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/Review_Order.xhtml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
+
+<!-- the DOCTYPE means we are required to use html for a root element -->
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tf="http://jbpm.org/jsf/tf"
+ xmlns:jbpm="http://jbpm.org/jsf">
+
+ <ui:component>
+
+ <jbpm:dataform>
+
+ <f:facet name="header">
+ <h:outputText value="#{taskName}"/>
+ </f:facet>
+
+ <!-- TASKFORM ROWS -->
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="customer_firstName"/>
+ </f:facet>
+ <h:inputText value="#{var['customer_firstName']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="customer_lastName"/>
+ </f:facet>
+ <h:inputText value="#{var['customer_lastName']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="customer_status"/>
+ </f:facet>
+ <h:inputText value="#{var['customer_status']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="order_totalamount"/>
+ </f:facet>
+ <h:inputText value="#{var['order_totalamount']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="order_priority"/>
+ </f:facet>
+ <h:inputText value="#{var['order_priority']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="order_orderid"/>
+ </f:facet>
+ <h:inputText value="#{var['order_orderid']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="order_discount"/>
+ </f:facet>
+ <h:inputText value="#{var['order_discount']}" />
+ </jbpm:datacell>
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="entireOrder"/>
+ </f:facet>
+ <h:inputText value="#{var['entireOrderAsXML']}" />
+ </jbpm:datacell>
+
+ <jbpm:datacell>
+ <f:facet name="header">
+ <h:outputText value="Actions"/>
+ </f:facet>
+ <!-- TASKFORM BUTTONS -->
+ <tf:saveButton value="Save"/>
+ <tf:transitionButton transition="OK" value="Save and Continue"/>
+
+
+ </jbpm:datacell>
+
+ </jbpm:dataform>
+
+ </ui:component>
+
+</html>
Added: labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/forms.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/forms.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/forms.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<forms>
+ <form task="Order Review" form="Review_Order.xhtml"/>
+ <form task="Discount Review" form="Review_Discount.xhtml"/>
+</forms>
Added: labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/gpd.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/gpd.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/gpd.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="bpm5_ESBOrderProcess" width="546" height="399">
+ <node name="start" x="159" y="9" width="140" height="40">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="Intake Order" x="25" y="79" width="140" height="40">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="Review Order" x="27" y="165" width="140" height="40">
+ <edge>
+ <label x="-11" y="-14"/>
+ </edge>
+ </node>
+ <node name="Calculate Discount" x="211" y="76" width="140" height="40">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="Shipment and Close" x="380" y="76" width="158" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="Review Discount" x="215" y="163" width="140" height="40">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="end" x="388" y="166" width="140" height="40"/>
+ <node name="Reject" x="217" y="227" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="Call Customer" x="217" y="280" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+</root-container>
Added: labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/processdefinition.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/processdefinition.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/processdefinition.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition
+ name="bpm5_ESBOrderProcess">
+ <start-state name="start">
+ <transition name="" to="Intake Order"></transition>
+ </start-state>
+
+ <node name="Intake Order">
+
+ <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbCategoryName>BPM_Orchestration5</esbCategoryName>
+ <esbServiceName>IntakeService</esbServiceName>
+ <!-- async call of IntakeService -->
+ <bpmToEsbVars>
+ <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping esb="body.entireOrderAsXML" bpm="entireOrderAsXML" />
+ <mapping esb="body.orderHeader" bpm="entireOrderAsObject" />
+ <mapping esb="body.customer" bpm="entireCustomerAsObject" />
+ <mapping esb="body.order_orderId" bpm="order_orderid" />
+ <mapping esb="body.order_totalAmount" bpm="order_totalamount" />
+ <mapping esb="body.order_orderPriority" bpm="order_priority" />
+ <mapping esb="body.customer_firstName" bpm="customer_firstName" />
+ <mapping esb="body.customer_fullName" bpm="customer_fullName" />
+ <mapping esb="body.customer_lastName" bpm="customer_lastName" />
+ <mapping esb="body.customer_status" bpm="customer_status" />
+ </esbToBpmVars>
+ </action>
+
+ <transition name="" to="Review Order"></transition>
+ </node>
+
+ <task-node name="Review Order">
+ <task name="Order Review">
+ <assignment actor-id="user"></assignment>
+ <controller>
+ <variable name="customer_firstName" access="read,write,required"></variable>
+ <variable name="customer_lastName" access="read,write,required"></variable>
+ <variable name="customer_status" access="read"></variable>
+ <variable name="order_totalamount" access="read"></variable>
+ <variable name="order_priority" access="read,write"></variable>
+ <variable name="order_orderid" access="read"></variable>
+ <variable name="order_discount" access="read"></variable>
+ <variable name="entireOrderAsXML" access="read"></variable>
+ </controller>
+ </task>
+ <transition to="Calculate Discount" name="OK"></transition>
+ </task-node>
+
+ <node name="Calculate Discount">
+ <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbCategoryName>BPM_Orchestration5</esbCategoryName>
+ <esbServiceName>DiscountService</esbServiceName>
+ <bpmToEsbVars>
+ <mapping bpm="entireCustomerAsObject" esb="customer" />
+ <mapping bpm="entireOrderAsObject" esb="orderHeader" />
+ <mapping bpm="entireOrderAsXML" esb="BODY_CONTENT" />
+ </bpmToEsbVars>
+ <esbToBpmVars>
+ <mapping bpm="entireOrderAsObject" esb="order" />
+ <mapping esb="body.order_orderDiscount" bpm="order_discount" />
+ </esbToBpmVars>
+ </action>
+ <transition to="Review Discount" name=""></transition>
+ </node>
+
+ <node name="Shipment and Close">
+ <action class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbServiceName>
+ ShippingService
+ </esbServiceName>
+ <esbCategoryName>
+ BPM_Orchestration5
+ </esbCategoryName>
+ <bpmToEsbVars>
+ <mapping bpm="entireCustomerAsObject" esb="customer" />
+ <mapping bpm="entireOrderAsObject" esb="orderHeader" />
+ <mapping bpm="entireOrderAsXML" esb="entireOrderAsXML" />
+ </bpmToEsbVars>
+ </action>
+ <transition to="end"></transition>
+ </node>
+
+ <task-node name="Review Discount">
+ <task name="Discount Review">
+ <assignment actor-id="manager"></assignment>
+ <controller>
+ <variable name="customer_firstName" access="read,write,required"></variable>
+ <variable name="customer_lastName" access="read,write,required"></variable>
+ <variable name="customer_status" access="read"></variable>
+ <variable name="order_totalamount" access="read"></variable>
+ <variable name="order_priority" access="read,write"></variable>
+ <variable name="order_orderid" access="read"></variable>
+ <variable name="order_discount" access="read"></variable>
+ <variable name="entireOrderAsXML" access="read"></variable>
+ </controller>
+ </task>
+ <transition to="Shipment and Close" name="OK"></transition>
+ <transition to="Reject" name="to Reject"></transition>
+ </task-node>
+
+ <node name="Reject">
+ <action class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
+ <esbServiceName>
+ RejectionService
+ </esbServiceName>
+ <esbCategoryName>
+ RejectionCategory
+ </esbCategoryName>
+ </action>
+ <transition to="Call Customer"></transition>
+ </node>
+
+ <state name="Call Customer">
+ <transition to="end"></transition>
+ </state>
+
+ <end-state name="end"></end-state>
+
+</process-definition>
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/processimage.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/processDefinition/processimage.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/readme.txt
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/readme.txt (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/readme.txt 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1 @@
+Review docs from bpm_orchestration4
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/gpd.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/gpd.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/gpd.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root-container name="rejectionWorkflow" width="812" height="588">
+ <node name="start-state" x="70" y="33" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+ <node name="end-state" x="69" y="168" width="132" height="36"/>
+ <node name="Call for HELP" x="68" y="100" width="132" height="36">
+ <edge>
+ <label x="5" y="-10"/>
+ </edge>
+ </node>
+</root-container>
Added: labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/processdefinition.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/processdefinition.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/processdefinition.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition xmlns="" name="rejectionWorkflow">
+
+
+ <start-state name="start-state">
+ <transition to="Call for HELP"></transition>
+ </start-state>
+
+
+ <state name="Call for HELP">
+ <transition to="end-state"></transition>
+ </state>
+
+
+ <end-state name="end-state"></end-state>
+
+
+</process-definition>
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/processimage.jpg
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/bsutter/DemoSource/rejectionWorkflow/processimage.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/bsutter/DemoSource/scripts/check-origin.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/scripts/check-origin.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/scripts/check-origin.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,11 @@
+
+def messageText = message.getBody().get();
+def order = new XmlParser().parseText(messageText);
+
+if(order.OrderLines.size() == 1) {
+ message.getProperties().setProperty("from", "dvdstore");
+} else if(order.LineItems.size() == 1) {
+ message.getProperties().setProperty("from", "petstore");
+}
+
+println "Message from: " + message.getProperties().getProperty("from");
Added: labs/jbossesb/workspace/bsutter/DemoSource/scripts/discount_service.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/scripts/discount_service.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/scripts/discount_service.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,3 @@
+import org.jboss.soa.esb.message.*
+
+println " Begin Discount Service "
Added: labs/jbossesb/workspace/bsutter/DemoSource/scripts/display.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/scripts/display.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/scripts/display.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,6 @@
+import org.jboss.soa.esb.message.*
+
+println " == BEGIN =="
+println "orderHeader: " + message.body.get("orderHeader")
+println "customer: " + message.body.get("customer")
+println " == END =="
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/scripts/fixer.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/scripts/fixer.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/scripts/fixer.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,11 @@
+import org.jboss.soa.esb.message.*
+
+println "*********** BEGIN FIXER ***********"
+
+println "In: " + new String(message.body.contents)
+
+message.body.add(new String(message.body.contents))
+
+println "Out: " + new String(message.body.get())
+
+println "************ END FIXER ************"
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/scripts/intake_service.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/scripts/intake_service.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/scripts/intake_service.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,5 @@
+import org.jboss.soa.esb.message.*
+
+println " == Begin Intake Service =="
+println "DEFAULT: " + message.body.get()
+println " == End Intake Service =="
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_discount.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_discount.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_discount.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,13 @@
+import org.jboss.soa.esb.message.*
+import org.jboss.soa.esb.store.OrderHeader
+
+println "*********** BEGIN ORDER DISCOUNT ***********"
+
+println "Order: " + message.body.get("orderHeader")
+order = (OrderHeader) message.body.get("orderHeader")
+println "Order Discount: " + order.getOrderDiscount()
+
+message.body.add("order_orderDiscount",order.getOrderDiscount())
+
+
+println "************ END ORDER DISCOUNT ************"
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_key.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_key.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_key.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,11 @@
+import org.jboss.soa.esb.message.*
+
+println "*********** BEGIN ORDER KEY SETUP ***********"
+
+def messageText = message.getBody().get();
+def order = new XmlParser().parseText(messageText);
+def key = order['@orderId']
+println "Key: " + key
+message.getBody().add("businessKey",key);
+
+println "************ END ORDER KEY SETUP ************"
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_priority.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_priority.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/scripts/setup_priority.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,12 @@
+import org.jboss.soa.esb.message.*
+import org.jboss.soa.esb.store.OrderHeader
+
+println "*********** BEGIN ORDER PRIORITY FIXER ***********"
+
+println "Order: " + message.body.get("orderHeader")
+order = (OrderHeader) message.body.get("orderHeader")
+
+message.body.add("order_orderPriority",order.getOrderPriority())
+
+
+println "************ END ORDER PRIORITY FIXER ************"
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/scripts/shipping_callback_service.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/scripts/shipping_callback_service.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/scripts/shipping_callback_service.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -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 **"
+
Added: labs/jbossesb/workspace/bsutter/DemoSource/scripts/shipping_service.groovy
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/scripts/shipping_service.groovy (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/scripts/shipping_service.groovy 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,21 @@
+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 Shipping Service "
+
+println "Original XML: " + message.body.get("entireOrderAsXML")
+println "Customer: " + message.body.get("customer")
+println "Order: " + message.body.get("orderHeader")
+
+// the action order information is routed to the appropriate fullfillment service via the
+// CBR, this is to handle the eventual callback where we need the replyTo EPR
+
+xmlEPR = EPRHelper.toXMLString(message.getHeader().getCall().getReplyTo())
+def writer=new File("/tmp/shipmentNotice.xml").newPrintWriter()
+writer.print(xmlEPR)
+writer.close()
+
+println " End Shipping Service "
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/smooks-config.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/smooks-config.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/smooks-config.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
+
+ <import file="classpath:/transforms/from-dvdstore.xml" />
+ <import file="classpath:/transforms/from-petstore.xml" />
+
+</smooks-resource-list>
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/src/ServiceAlertMonitor.form
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/src/ServiceAlertMonitor.form (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/src/ServiceAlertMonitor.form 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="3"/>
+ <Property name="title" type="java.lang.String" value="Service Alert Monitor"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <Events>
+ <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
+ </Events>
+ <AuxValues>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jScrollPane1" alignment="0" pref="265" max="32767" attributes="0"/>
+ <Component id="jButton1" alignment="0" pref="265" max="32767" attributes="0"/>
+ <Component id="jLabel3" alignment="0" pref="265" max="32767" attributes="0"/>
+ <Component id="jLabel1" alignment="0" pref="265" max="32767" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jLabel1" min="-2" pref="39" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jScrollPane1" min="-2" pref="98" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabel3" pref="84" max="32767" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jButton1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Tahoma" size="18" style="0"/>
+ </Property>
+ <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="cc" green="0" red="0" type="rgb"/>
+ </Property>
+ <Property name="horizontalAlignment" type="int" value="0"/>
+ <Property name="text" type="java.lang.String" value="Service Alert Monitor"/>
+ </Properties>
+ </Component>
+ <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+ <AuxValues>
+ <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JTextArea" name="textAreaOrderQueue">
+ <Properties>
+ <Property name="columns" type="int" value="20"/>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Arial" size="14" style="0"/>
+ </Property>
+ <Property name="rows" type="int" value="5"/>
+ <Property name="tabSize" type="int" value="2"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Component class="javax.swing.JButton" name="jButton1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Clear"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel3">
+ <Properties>
+ <Property name="horizontalAlignment" type="int" value="0"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+</Form>
Added: labs/jbossesb/workspace/bsutter/DemoSource/src/ServiceAlertMonitor.java
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/src/ServiceAlertMonitor.java (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/src/ServiceAlertMonitor.java 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,192 @@
+/*
+ * ServiceAlertMonitor2.java
+ *
+ * Created on November 21, 2006, 12:10 AM
+ */
+import javax.swing.UIManager;
+import java.awt.Dimension;
+import java.awt.Toolkit;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.jms.Message;
+import javax.jms.QueueReceiver;
+import javax.jms.MessageListener;
+
+/**
+ *
+ * @author burr
+ */
+public class ServiceAlertMonitor extends javax.swing.JFrame implements MessageListener {
+ InitialContext iniCtx = null;
+ QueueConnectionFactory qcf = null;
+ QueueConnection conn = null;
+ QueueSession receiverSession = null;
+ Queue receiverQueue = null;
+ QueueReceiver queueReceiver = null;
+
+ String imageName = "images/javawork.gif";
+
+ /** Creates new form ServiceAlertMonitor */
+ public ServiceAlertMonitor(String serviceName, String queueName, String imageName) {
+ initComponents();
+ this.jLabel1.setText(serviceName);
+ try {
+ if (iniCtx == null) iniCtx = new InitialContext();
+ if (qcf == null) qcf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
+ if (conn == null) {
+ conn = qcf.createQueueConnection();
+ conn.start();
+ }
+ String responseQueueName = "queue/" + queueName;
+ this.imageName = imageName;
+ receiverQueue = (Queue) iniCtx.lookup(responseQueueName);
+ receiverSession = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+ queueReceiver = receiverSession.createReceiver(receiverQueue);
+ queueReceiver.setMessageListener(this);
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+ }
+
+ /** This method is called from within the constructor to
+ * initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ jLabel1 = new javax.swing.JLabel();
+ jScrollPane1 = new javax.swing.JScrollPane();
+ textAreaOrderQueue = new javax.swing.JTextArea();
+ jButton1 = new javax.swing.JButton();
+ jLabel3 = new javax.swing.JLabel();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+ setTitle("Service Alert Monitor");
+ addWindowListener(new java.awt.event.WindowAdapter() {
+ public void windowClosing(java.awt.event.WindowEvent evt) {
+ formWindowClosing(evt);
+ }
+ });
+
+ jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18));
+ jLabel1.setForeground(new java.awt.Color(0, 0, 204));
+ jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
+ jLabel1.setText("Service Alert Monitor");
+
+ textAreaOrderQueue.setColumns(20);
+ textAreaOrderQueue.setFont(new java.awt.Font("Arial", 0, 14));
+ textAreaOrderQueue.setRows(5);
+ textAreaOrderQueue.setTabSize(2);
+ jScrollPane1.setViewportView(textAreaOrderQueue);
+
+ jButton1.setText("Clear");
+ jButton1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jButton1ActionPerformed(evt);
+ }
+ });
+
+ jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
+
+ org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .addContainerGap()
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
+ .add(jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
+ .add(jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE)
+ .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE))
+ .addContainerGap())
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(layout.createSequentialGroup()
+ .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 98, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jButton1)
+ .addContainerGap())
+ );
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
+ try {
+ if (queueReceiver != null) queueReceiver.close();
+ if (receiverSession != null) receiverSession.close();
+
+ } catch (JMSException e) {
+ System.out.println(e);
+ }
+ }//GEN-LAST:event_formWindowClosing
+
+ boolean on = false;
+ private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
+ textAreaOrderQueue.setText("");
+ this.jLabel3.setIcon(null);
+ //this.jLabel3.setVisible(false);
+ }//GEN-LAST:event_jButton1ActionPerformed
+
+
+ public void onMessage(Message msg) {
+ try {
+ String textMessage = ((TextMessage)msg).getText();
+ textAreaOrderQueue.setText(textMessage);
+ java.io.File x = new java.io.File(imageName);
+ System.out.println(x.getAbsolutePath());
+ javax.swing.ImageIcon icon = new javax.swing.ImageIcon(x.getAbsolutePath()); // animated gif
+ this.jLabel3.setIcon(icon);
+ this.jLabel3.setVisible(true);
+ } catch (Exception e) {
+ System.err.println(e);
+ textAreaOrderQueue.setText("ERROR: " + e.getMessage());
+ }
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String args[]) throws Exception {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ System.out.println(args[0]);
+ final String tempServiceName = args[0];
+ System.out.println(args[1]);
+ final String tempQueueName = args[1];
+ System.out.println(args[2]);
+ final String tempImageName = args[2];
+ java.awt.EventQueue.invokeLater(new Runnable() {
+ public void run() {
+ ServiceAlertMonitor frame = new ServiceAlertMonitor(tempServiceName,tempQueueName,tempImageName);
+
+ // center the window
+ Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
+ frame.setLocation(d.width/2 - frame.getWidth()/2,
+ d.height/2 - frame.getHeight()/2);
+ frame.setVisible(true);
+ }
+ });
+ }
+
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton jButton1;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel3;
+ private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JTextArea textAreaOrderQueue;
+ // End of variables declaration//GEN-END:variables
+
+}
Added: labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SetupMessage.java
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SetupMessage.java (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SetupMessage.java 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,70 @@
+/*
+ * 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_orchestration5.esb_actions;
+
+import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.store.Customer;
+import org.jboss.soa.esb.store.OrderHeader;
+import org.apache.log4j.Logger;
+
+public class SetupMessage extends AbstractActionPipelineProcessor {
+ private Logger logger = Logger.getLogger(SetupMessage.class);
+ private int status = 0;
+
+ public Message process(Message message) throws ActionProcessingException {
+
+ OrderHeader order = (OrderHeader) message.getBody().get("orderHeader");
+ Customer customer = (Customer) message.getBody().get("customer");
+ //List orderItems = (List) message.getBody().get("orderItemList");
+
+ customer.setStatus(status);
+
+ logger.info("--------------------------------");
+ logger.info("Customer: " + customer);
+ logger.info("Order: " + order);
+ logger.info("businessKey: " + order.getOrderId());
+ logger.info("--------------------------------");
+
+ message.getBody().add("entireOrderAsXML", message.getBody().get());
+ message.getBody().add("order_orderId", order.getOrderId());
+ message.getBody().add("order_orderPriority", order.getOrderPriority());
+ message.getBody().add("order_totalAmount", order.getTotalAmount());
+ message.getBody().add("order_discount", order.getOrderDiscount());
+ message.getBody().add("businessKey", order.getOrderId());
+
+ message.getBody().add("customer_firstName", customer.getFirstName());
+ message.getBody().add("customer_lastName", customer.getLastName());
+ message.getBody().add("customer_status", customer.getStatus());
+
+ logger.info("Moved the transformed Order Header and Customer");
+
+ return message;
+ }
+
+ public SetupMessage(ConfigTree configTree) { // demo purposes, passed in
+ // from the jboss-esb.xml
+ status = Integer.parseInt(configTree.getAttribute("status"));
+ }
+
+}
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SimpleJMSNotifier.java
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SimpleJMSNotifier.java (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/esb_actions/SimpleJMSNotifier.java 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,94 @@
+/*
+ * 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_orchestration5.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_bpm_orchestration5_monitor";
+ String prependedText = "";
+ String bodyKey = "";
+
+ 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);
+ String msg = "";
+
+ if (bodyKey == null) {
+ msg = prependedText;
+ } else {
+ msg = prependedText + "\n" + message.getBody().get(bodyKey);
+ }
+ TextMessage tm = session.createTextMessage(msg);
+ 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");
+ prependedText = _config.getAttribute("PREPENDED_TEXT");
+ bodyKey = _config.getAttribute("BODY_KEY");
+ logger.info("Who to alert: " + queueName);
+ }
+}
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessage.java (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessage.java 2008-07-01 18:44:20 UTC (rev 20858)
@@ -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.quickstarts.bpm_orchestration5.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
Added: labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessageStart.java
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessageStart.java (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/samples/quickstarts/bpm_orchestration5/test/SendJMSMessageStart.java 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,110 @@
+/*
+ * 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_orchestration5.test;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class SendJMSMessageStart {
+ QueueConnection conn;
+ QueueSession session;
+ Queue que;
+
+
+ public void setupConnection() throws JMSException, NamingException
+ {
+ InitialContext iniCtx = new InitialContext();
+ Object tmp = iniCtx.lookup("ConnectionFactory");
+ QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+ conn = qcf.createQueueConnection();
+ que = (Queue) iniCtx.lookup("queue/quickstart_bpm_orchestration5_start_gw");
+ 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) throws JMSException {
+
+ QueueSender send = session.createSender(que);
+ ObjectMessage tm = session.createObjectMessage(msg);
+ send.send(tm);
+ send.close();
+ }
+ public String readAsciiFile(String fileName) throws IOException {
+ FileReader fr = null;
+ char[] thechars = null;
+
+ try {
+ File thefile = new File( fileName );
+ fr = new FileReader( thefile );
+ int size = (int) thefile.length();
+ thechars = new char[size];
+
+ int count, index = 0;
+
+ // read in the bytes from the input stream
+ while( ( count = fr.read( thechars, index, size ) ) > 0 ) {
+ size -= count;
+ index += count;
+ }
+ } catch(Exception e) {
+ System.out.println(e);
+ }
+ finally {
+ if( fr != null )
+ fr.close();
+ }
+ return new String(thechars);
+
+ } // readAsciiFile
+
+ public static void main(String args[]) throws Exception
+ {
+ SendJMSMessageStart sm = new SendJMSMessageStart();
+ sm.setupConnection();
+ String fileContent = sm.readAsciiFile(args[0]);
+ System.out.println("---------------------------------------------");
+ System.out.println(fileContent);
+ System.out.println("---------------------------------------------");
+ sm.sendAMessage(fileContent);
+ sm.stop();
+
+ }
+
+}
\ No newline at end of file
Added: labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/Customer.java
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/Customer.java (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/Customer.java 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,107 @@
+/*
+ * 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.store;
+
+import java.io.Serializable;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class Customer implements Serializable{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ // <Customer userName="user1" firstName="Harry" lastName="Potter" state="SD"/>
+ private String userName;
+ private String firstName;
+ private String lastName;
+ private String state;
+ private int status;
+
+ public void setStatus(int status) {
+ this.status = status;
+ }
+ public int getStatus() {
+ return this.status;
+ }
+ /**
+ * @return Returns the firstName.
+ */
+ public String getFirstName() {
+ return firstName;
+ }
+ /**
+ * @param firstName The firstName to set.
+ */
+ public void setFirstName(String firstName) {
+ //System.out.println("**** firstName: " + firstName);
+ this.firstName = firstName;
+ }
+ /**
+ * @return Returns the lastName.
+ */
+ public String getLastName() {
+ return lastName;
+ }
+ /**
+ * @param lastName The lastName to set.
+ */
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+ /**
+ * @return Returns the state.
+ */
+ public String getState() {
+ return state;
+ }
+ /**
+ * @param state The state to set.
+ */
+ public void setState(String state) {
+ this.state = state;
+ }
+ /**
+ * @return Returns the userName.
+ */
+ public String getUserName() {
+ return userName;
+ }
+ /**
+ * @param userName The userName to set.
+ */
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return userName + "," + firstName + "," + lastName + "," + state;
+ }
+
+
+}
Added: labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/OrderHeader.java
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/OrderHeader.java (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/OrderHeader.java 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,139 @@
+/*
+ * 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.store;
+
+import java.util.Calendar;
+import java.io.Serializable;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class OrderHeader implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ // <Order orderId="1" orderDate="Wed Nov 15 13:45:28 EST 2006" statusCode="0" netAmount="59.97" totalAmount="64.92" tax="4.95">
+ private String orderId;
+ private Calendar orderDate;
+ private String statusCode;
+ private double netAmount;
+ private double totalAmount;
+ private double tax;
+ private double orderDiscount;
+ private int orderPriority;
+
+ public void setOrderPriority(int orderPriority) {
+ this.orderPriority = orderPriority;
+ }
+ public int getOrderPriority() {
+ return this.orderPriority;
+ }
+
+ public void setOrderDiscount(double orderDiscount) {
+ this.orderDiscount = orderDiscount;
+ }
+ public double getOrderDiscount() {
+ return orderDiscount;
+ }
+ /**
+ * @return Returns the netAmount.
+ */
+ public double getNetAmount() {
+ return netAmount;
+ }
+ /**
+ * @param netAmount The netAmount to set.
+ */
+ public void setNetAmount(double netAmount) {
+ this.netAmount = netAmount;
+ }
+ /**
+ * @return Returns the orderDate.
+ */
+ public Calendar getOrderDate() {
+ return orderDate;
+ }
+ /**
+ * @param orderDate The orderDate to set.
+ */
+ public void setOrderDate(Calendar orderDate) {
+ this.orderDate = orderDate;
+ }
+ /**
+ * @return Returns the orderId.
+ */
+ public String getOrderId() {
+ return orderId;
+ }
+ /**
+ * @param orderId The orderId to set.
+ */
+ public void setOrderId(String orderId) {
+ this.orderId = orderId;
+ }
+ /**
+ * @return Returns the statusCode.
+ */
+ public String getStatusCode() {
+ return statusCode;
+ }
+ /**
+ * @param statusCode The statusCode to set.
+ */
+ public void setStatusCode(String statusCode) {
+ this.statusCode = statusCode;
+ }
+ /**
+ * @return Returns the tax.
+ */
+ public double getTax() {
+ return tax;
+ }
+ /**
+ * @param tax The tax to set.
+ */
+ public void setTax(double tax) {
+ this.tax = tax;
+ }
+ /**
+ * @return Returns the totalAmount.
+ */
+ public double getTotalAmount() {
+ return totalAmount;
+ }
+ /**
+ * @param totalAmount The totalAmount to set.
+ */
+ public void setTotalAmount(double totalAmount) {
+ this.totalAmount = totalAmount;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return orderId + ", " + (orderDate == null?null:orderDate.getTime()) + ", " + statusCode + ", " + netAmount + ", " + totalAmount + ", " + tax + ", ";
+ }
+}
Added: labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/OrderItem.java
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/OrderItem.java (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/OrderItem.java 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,114 @@
+/*
+ * 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.store;
+
+import java.io.Serializable;
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class OrderItem implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ // <OrderLine position="1" quantity="1">
+ // <Product productId="364" title="The 40-Year-Old Virgin " price="29.98"/>
+ // </OrderLine>
+ private int position;
+ private int quantity;
+ private String productId;
+ private String title;
+ private double price;
+
+ /**
+ * @return Returns the position.
+ */
+ public int getPosition() {
+ return position;
+ }
+ /**
+ * @param position The position to set.
+ */
+ public void setPosition(int position) {
+ //System.out.println("**** position: " + position);
+ this.position = position;
+ }
+ /**
+ * @return Returns the price.
+ */
+ public double getPrice() {
+ return price;
+ }
+ /**
+ * @param price The price to set.
+ */
+ public void setPrice(double price) {
+ //System.out.println("**** price: " + price);
+ this.price = price;
+ }
+ /**
+ * @return Returns the productId.
+ */
+ public String getProductId() {
+ return productId;
+ }
+ /**
+ * @param productId The productId to set.
+ */
+ public void setProductId(String productId) {
+ this.productId = productId;
+ }
+ /**
+ * @return Returns the quantity.
+ */
+ public int getQuantity() {
+ return quantity;
+ }
+ /**
+ * @param quantity The quantity to set.
+ */
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
+ }
+ /**
+ * @return Returns the title.
+ */
+ public String getTitle() {
+ return title;
+ }
+ /**
+ * @param title The title to set.
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return position + "," + quantity + "," + productId + "," + title + "," + price;
+
+ }
+}
Added: labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/StoreAction.java
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/StoreAction.java (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/src/org/jboss/soa/esb/store/StoreAction.java 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,71 @@
+/*
+ * 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.store;
+
+import java.util.List;
+
+import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * Store action.
+ * <p/>
+ * This action uses bean value objects that were prepopulated by Smooks in an earlier action on the pipline.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class StoreAction extends AbstractActionPipelineProcessor {
+
+ public StoreAction(ConfigTree configTree) { }
+
+ public Message process(Message message) throws ActionProcessingException {
+
+ StringBuffer results = new StringBuffer();
+ // "order", "customer", "orderItem" is set in the smooks config file: from-dvdstore.xml
+ OrderHeader header = (OrderHeader) message.getBody().get("orderHeader");
+ Customer customer = (Customer) message.getBody().get("customer");
+ List orderItems = (List) message.getBody().get("orderItemList");
+ // System.out.println("************************\n\n");
+ // System.out.println(header.toString());
+ // System.out.println(customer.toString());
+ // System.out.println(orderItems.toString());
+ // System.out.println("************************\n\n");
+ results.append("Demonstrates Smooks ability to rip the XML into Objects\n");
+ results.append("********** StoreAction - Order Value Objects Populated ***********\n");
+ results.append("Header: " + header + "\n");
+ results.append("Customer: " + customer + "\n");
+ if(orderItems != null) {
+ results.append("Order Items (" + orderItems.size() + "):\n");
+ for(int i = 0; i < orderItems.size(); i++) {
+ results.append("\t" + i + ": " + orderItems.get(i) + "\n");
+ }
+ }
+ results.append("\n****************************************************************** ");
+ message.getBody().add("OrderHeader",header);
+ message.getBody().add("Customer",customer);
+ message.getBody().add("OrderItems",orderItems);
+ // Take this "parsed" and reformatted output
+ message.getBody().add(results.toString());
+ return message;
+ }
+}
Added: labs/jbossesb/workspace/bsutter/DemoSource/transforms/from-dvdstore.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/transforms/from-dvdstore.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/transforms/from-dvdstore.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,54 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd"
+ default-target-profile="from:dvdstore">
+
+ <!-- Populate the OrderHeader -->
+ <resource-config selector="order">
+ <resource>org.milyn.javabean.BeanPopulator</resource>
+ <param name="beanId">orderHeader</param>
+ <param name="beanClass">org.jboss.soa.esb.store.OrderHeader</param>
+ <param name="bindings">
+ <binding property="orderId" selector="Order @orderId" />
+ <binding property="orderDate" selector="Order @orderDate" type="LongDate"/>
+ <binding property="statusCode" selector="Order @statusCode" />
+ <binding property="netAmount" selector="Order @netAmount" type="Double" />
+ <binding property="totalAmount" selector="Order @totalAmount" type="Double" />
+ <binding property="tax" selector="Order @tax" type="Double" />
+ </param>
+ </resource-config>
+
+ <!-- Populate the Customer -->
+ <resource-config selector="order customer">
+ <resource>org.milyn.javabean.BeanPopulator</resource>
+ <param name="beanId">customer</param>
+ <param name="beanClass">org.jboss.soa.esb.store.Customer</param>
+ <param name="bindings">
+ <binding property="userName" selector="order customer @userName" />
+ <binding property="firstName" selector="order customer @firstName" />
+ <binding property="lastName" selector="order customer @lastName" />
+ <binding property="state" selector="order customer @state" />
+ </param>
+ </resource-config>
+
+ <!-- Populate the OrderItem list -->
+ <resource-config selector="order orderlines orderline">
+ <resource>org.milyn.javabean.BeanPopulator</resource>
+ <param name="beanId">orderItem</param>
+ <param name="beanClass">org.jboss.soa.esb.store.OrderItem</param>
+ <param name="addToList">true</param>
+ <param name="bindings">
+ <binding property="position" selector="order orderlines orderline @position" type="Integer" />
+ <binding property="quantity" selector="order orderlines orderline @quantity" type="Integer" />
+ <binding property="productId" selector="order orderlines orderline product @productId" />
+ <binding property="title" selector="order orderlines orderline product @title" />
+ <binding property="price" selector="order orderlines orderline product @price" type="Double" />
+ </param>
+ </resource-config>
+
+
+ <resource-config selector="decoder:LongDate">
+ <resource>org.milyn.javabean.decoders.CalendarDecoder</resource>
+ <param name="format">EEE MMM dd HH:mm:ss z yyyy</param>
+ </resource-config>
+
+</smooks-resource-list>
Added: labs/jbossesb/workspace/bsutter/DemoSource/transforms/from-petstore.xml
===================================================================
--- labs/jbossesb/workspace/bsutter/DemoSource/transforms/from-petstore.xml (rev 0)
+++ labs/jbossesb/workspace/bsutter/DemoSource/transforms/from-petstore.xml 2008-07-01 18:44:20 UTC (rev 20858)
@@ -0,0 +1,52 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd"
+ default-target-profile="from:petstore">
+
+ <!-- Populate the OrderHeader -->
+ <resource-config selector="order">
+ <resource>org.milyn.javabean.BeanPopulator</resource>
+ <param name="beanId">orderHeader</param>
+ <param name="beanClass">org.jboss.soa.esb.store.OrderHeader</param>
+ <param name="bindings">
+ <binding property="orderId" selector="Order @orderId" />
+ <binding property="orderDate" selector="Order @orderDate" type="LongDate"/>
+ <binding property="statusCode" selector="Order @status" />
+ <binding property="totalAmount" selector="Order @totalPrice" type="Double" />
+ </param>
+ </resource-config>
+
+ <!-- Populate the Customer -->
+ <resource-config selector="order">
+ <resource>org.milyn.javabean.BeanPopulator</resource>
+ <param name="beanId">customer</param>
+ <param name="beanClass">org.jboss.soa.esb.store.Customer</param>
+ <param name="bindings">
+ <binding property="userName" selector="order @username" />
+ <binding property="firstName" selector="order @shipToFirstName" />
+ <binding property="lastName" selector="order @shipToLastName" />
+ <binding property="state" selector="order @shipState" />
+ </param>
+ </resource-config>
+
+ <!-- Populate the OrderItem list -->
+ <resource-config selector="order LineItems LineItem">
+ <resource>org.milyn.javabean.BeanPopulator</resource>
+ <param name="beanId">orderItem</param>
+ <param name="beanClass">org.jboss.soa.esb.store.OrderItem</param>
+ <param name="addToList">true</param>
+ <param name="bindings">
+ <binding property="position" selector="LineItem @lineNumber" type="Integer" />
+ <binding property="quantity" selector="LineItem @quantity" type="Integer" />
+ <binding property="productId" selector="LineItem Item @itemId" />
+ <binding property="price" selector="LineItem Item @listPrice" type="Double" />
+ <binding property="title" selector="LineItem Item @name" />
+ </param>
+ </resource-config>
+
+
+ <resource-config selector="decoder:LongDate">
+ <resource>org.milyn.javabean.decoders.CalendarDecoder</resource>
+ <param name="format">EEE MMM dd HH:mm:ss z yyyy</param>
+ </resource-config>
+
+</smooks-resource-list>
More information about the jboss-svn-commits
mailing list