[jboss-svn-commits] JBL Code SVN: r11168 - in labs/jbossesb/trunk/product: core/listeners/tests/src/org/jboss/soa/esb/listeners/message and 6 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Apr 20 15:04:26 EDT 2007
Author: estebanschifman
Date: 2007-04-20 15:04:25 -0400 (Fri, 20 Apr 2007)
New Revision: 11168
Added:
labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/process_01.xml
labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/process_01.xml
labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/quickstart/jbpm_simple1/test/TestCommandMessages.java
labs/jbossesb/trunk/product/services/jbpm/server.hibernate.cfg.xml
labs/jbossesb/trunk/product/services/jbpm/server.jbpm.cfg.xml
Removed:
labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/processdefinition.xml
labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/processdefinition.xml
labs/jbossesb/trunk/product/services/jbpm/hibernate.cfg.xml
labs/jbossesb/trunk/product/services/jbpm/jbpm.cfg.xml
Modified:
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/Invoker.java
labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/message/InvokerUnitTest.java
labs/jbossesb/trunk/product/services/jbpm/build.xml
labs/jbossesb/trunk/product/services/jbpm/jboss-esb.xml
labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreter.java
labs/jbossesb/trunk/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreterUnitTest.java
Log:
Modify classes and tests required by migration to jBPM 3.2
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/Invoker.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/Invoker.java 2007-04-20 18:46:16 UTC (rev 11167)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/Invoker.java 2007-04-20 19:04:25 UTC (rev 11168)
@@ -43,7 +43,6 @@
import org.jboss.soa.esb.listeners.RegistryUtil;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.util.AbstractCommandVehicle;
/**
@@ -57,19 +56,18 @@
public class Invoker {
/**
- * Encapsulate command in an ESB Message, and deliverAsync.
*
- * @param command AbstractCommandMessage - Transform into an ESB Message, and send
- * @param category String - Service category name for Registry inquiry
- * @param name String - Service name for Registry inquiry
+ * @param message Message - the message to deliver
+ * @param category String - for Registry search
+ * @param name String - for Registry search
* @throws RegistryException
* @throws MalformedEPRException
* @throws CourierException
*/
- public static void invoke(AbstractCommandVehicle command, String category, String name)
+ public static void invoke(Message message, String category, String name)
throws RegistryException, MalformedEPRException, CourierException
{
- try { invokeAndAwaitResponse(command,category,name,-1); }
+ try { invokeAndAwaitResponse(message,category,name,-1); }
catch (CourierTimeoutException e)
{
_logger.fatal("Unexpected CourierTimeoutException caught!");
@@ -79,7 +77,7 @@
/**
* Encapsulate command in an ESB Message, deliverAsync it, and wait for a response Message.
*
- * @param command AbstractCommandMessage - Transform into an ESB Message, and send
+ * @param message Message - the message to deliver
* @param category String - Service category name for Registry inquiry
* @param name String - Service name for Registry inquiry
* @param maxWaitMillis int - Maximum time to wait for a response
@@ -90,18 +88,17 @@
* @throws CourierTimeoutException - If response was not received in specified time
*/
- public static Message invokeAndAwaitResponse(AbstractCommandVehicle command, String category, String name
+ public static Message invokeAndAwaitResponse(Message message, String category, String name
,int maxWaitMillis)
throws RegistryException, MalformedEPRException, CourierException, CourierTimeoutException
{
- Message outgoing = command.toCommandMessage();
- Call call = outgoing.getHeader().getCall();
+ Call call = message.getHeader().getCall();
Collection<EPR> eprs = RegistryUtil.getEprs(category, name);
if (null==eprs || eprs.size()<1)
throw new RegistryException("No eprs found for <"+category+","+name+">");
EPR service = eprs.iterator().next();
call.setTo(serviceDestination(service));
- return invokeAndAwaitResponse(outgoing, maxWaitMillis);
+ return invokeAndAwaitResponse(message, maxWaitMillis);
}
/**
Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/message/InvokerUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/message/InvokerUnitTest.java 2007-04-20 18:46:16 UTC (rev 11167)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/message/InvokerUnitTest.java 2007-04-20 19:04:25 UTC (rev 11168)
@@ -37,59 +37,12 @@
import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.listeners.RegistryUtil;
import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
import org.jboss.soa.esb.services.registry.RegistryException;
import org.jboss.soa.esb.testutils.FileUtil;
import org.jboss.soa.esb.testutils.HsqldbUtil;
import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
-import org.jboss.soa.esb.util.AbstractCommandVehicle;
-class CommandVehicle extends AbstractCommandVehicle
-{
- private static final long serialVersionUID = 1L;
-
- @Override
- public String getCommandValuesTag()
- {
- return "qwerty";
- }
-
- @Override
- public String getCommandOpcodeKey()
- {
- return "barfoo";
- }
- @Override
- public Operation operatorFromString(String value)
- {
- return Operation.valueOf(value);
- }
-
- public enum Operation
- {
- SomeOperation
- }
-
- public CommandVehicle()
- {
- this(CommandVehicle.Operation.SomeOperation);
- }
-
- public CommandVehicle(Enum command)
- {
- super(command);
- }
-
- public CommandVehicle(Message message)
- {
- super(message);
- }
-
- public Object getReturnCode()
- {
- return "ReturnCode";
- }
-}
-
public class InvokerUnitTest extends TestCase
{
@@ -192,11 +145,11 @@
{
setup();
- CommandVehicle command = new CommandVehicle();
+ Message message = MessageFactory.getInstance().getMessage();
try
{
- Invoker.invoke(command, null, null);
+ Invoker.invoke(message, null, null);
fail();
}
catch (RegistryException ex)
@@ -205,7 +158,7 @@
try
{
- Invoker.invoke(command, "foo", "bar");
+ Invoker.invoke(message, "foo", "bar");
fail();
}
catch (RegistryException ex)
@@ -230,7 +183,7 @@
try
{
- Invoker.invoke(command, "eprmanager", "qwerty");
+ Invoker.invoke(message, "eprmanager", "qwerty");
}
catch (Exception ex)
{
@@ -242,7 +195,7 @@
try
{
Invoker
- .invokeAndAwaitResponse(command, "eprmanager", "qwerty",
+ .invokeAndAwaitResponse(message, "eprmanager", "qwerty",
100);
}
catch (Exception ex)
Copied: labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/process_01.xml (from rev 11149, labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/processdefinition.xml)
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/process_01.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/process_01.xml 2007-04-20 19:04:25 UTC (rev 11168)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition
+ xmlns="urn:jbpm.org:jpdl-3.1"
+ name="simple">
+ <start-state name="start">
+ <transition name="to_state" to="first">
+
+ </transition>
+ </start-state>
+ <state name="first">
+ <transition name="to_end" to="end">
+
+ </transition>
+ </state>
+ <end-state name="end"></end-state>
+</process-definition>
\ No newline at end of file
Deleted: labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/processdefinition.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/processdefinition.xml 2007-04-20 18:46:16 UTC (rev 11167)
+++ labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/processdefinition.xml 2007-04-20 19:04:25 UTC (rev 11168)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<process-definition
- xmlns="urn:jbpm.org:jpdl-3.1"
- name="simple">
- <start-state name="start">
- <transition name="to_state" to="first">
-
- </transition>
- </start-state>
- <state name="first">
- <transition name="to_end" to="end">
-
- </transition>
- </state>
- <end-state name="end"></end-state>
-</process-definition>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/process_01.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/process_01.xml (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/process_01.xml 2007-04-20 19:04:25 UTC (rev 11168)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<process-definition
+ xmlns="urn:jbpm.org:jpdl-3.1"
+ name="simple">
+ <start-state name="start">
+ <transition name="to_state" to="first" />
+ </start-state>
+ <state name="first">
+ <transition name="to_end" to="end" />
+ </state>
+ <end-state name="end"></end-state>
+</process-definition>
\ No newline at end of file
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/process_01.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Deleted: labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/processdefinition.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/processdefinition.xml 2007-04-20 18:46:16 UTC (rev 11167)
+++ labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/processdefinition.xml 2007-04-20 19:04:25 UTC (rev 11168)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<process-definition
- xmlns="urn:jbpm.org:jpdl-3.1"
- name="simple">
- <start-state name="start">
- <transition name="to_state" to="first">
- <action name="action" class="quickstart.jbpm_simple1.JbpmActionHandler">
- <message>Going to the first state!</message>
- </action>
- </transition>
- </start-state>
- <state name="first">
- <transition name="to_end" to="end">
- <action name="action" class="quickstart.jbpm_simple1.JbpmActionHandler">
- <message>About to finish!</message>
- </action>
- </transition>
- </state>
- <end-state name="end"></end-state>
-</process-definition>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/quickstart/jbpm_simple1/test/TestCommandMessages.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/quickstart/jbpm_simple1/test/TestCommandMessages.java (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/quickstart/jbpm_simple1/test/TestCommandMessages.java 2007-04-20 19:04:25 UTC (rev 11168)
@@ -0,0 +1,208 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package quickstart.jbpm_simple1.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Environment;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.listeners.message.Invoker;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.services.jbpm.Constants;
+import org.jboss.soa.esb.services.jbpm.util.Helper;
+import org.jbpm.graph.exe.Token;
+
+import com.arjuna.common.util.propertyservice.PropertyManager;
+
+public class TestCommandMessages {
+
+ static Logger _logger = Logger.getLogger(TestCommandMessages.class);
+
+ private static final String TEST_SVC_CATEGORY ="categoryJbpmService";
+ private static final String TEST_SVC_NAME ="nameJbpmService";
+ private static final String TEST_PROCESS_NAME ="simple";
+
+ public static void main(String[] args) throws Exception
+ {
+ new TestCommandMessages().run();
+ }
+
+
+
+ public void run() throws Exception {
+
+ setupRegistry();
+
+ long instanceId=0 , tokenId=0;
+ Exception excJbpm;
+ Constants.OpCode opCode = null;
+ Message request, response;
+
+ _logger.info("testFullProcessLifecycle() invoked");
+ try
+ {
+ request = Helper.responseTemplate();
+ Helper.setStringValue(request, Constants.COMMAND_CODE, "DONOTUSE_createSchema");;
+ response = invokeJbpm(request);
+
+ opCode = Constants.OpCode.DeployProcessDefinition;
+ request = Helper.responseTemplate();
+ Helper.setStringValue(request, Constants.COMMAND_CODE, opCode);
+ String xml = getProcessDefinitionXml("process_01.xml");
+ Helper.setStringValue(request, Constants.PROCESS_DEFINITION_XML, xml);
+
+ response = invokeJbpm(request);
+
+ _logger.info("Invoked : "+opCode.toString());
+ _logger.info("Return code = "+Helper.getStringValue(response,Constants.RETURN_CODE));
+ excJbpm = (Exception)Helper.getObjectValue(response,Constants.EXCEPTION);
+ if (null==excJbpm)
+ {
+ _logger.info("PrcDef name = "+Helper.getObjectValue(response,Constants.PROCESS_DEFINITION_NAME));
+ _logger.info("PrcDef vers = "+Helper.getObjectValue(response,Constants.PROCESS_DEFINITION_VERSION));
+ }
+ else
+ _logger.error("Problems in jbpm.CommandInterpreter",excJbpm);
+ _logger.info("_______________________________________________________________________");
+
+ assertTrue(Constants.RETCODE_OK.equals(Helper.getObjectValue(response, Constants.RETURN_CODE)));
+
+ opCode = Constants.OpCode.NewProcessInstanceCommand;
+ request = Helper.responseTemplate();
+ Helper.setStringValue(request, Constants.COMMAND_CODE, opCode);
+ Helper.setStringValue(request, Constants.PROCESS_DEFINITION_NAME, TEST_PROCESS_NAME);
+
+ response = invokeJbpm(request);
+
+ _logger.info("Invoked : "+opCode.toString());
+ _logger.info("Return code = "+Helper.getStringValue(response,Constants.RETURN_CODE));
+ excJbpm = (Exception)Helper.getObjectValue(response,Constants.EXCEPTION);
+ if (null==excJbpm)
+ {
+ instanceId = Helper.getLongValue(response,Constants.PROCESS_INSTANCE_ID);
+ tokenId = Helper.getLongValue(response,Constants.TOKEN_ID);
+ _logger.info("Process Id = "+instanceId);
+ _logger.info("Token Id = "+tokenId);
+ }
+ else
+ _logger.error("Problems in jbpm.CommandInterpreter",excJbpm);
+ _logger.info("_______________________________________________________________________");
+
+ assertTrue(Constants.RETCODE_OK.equals(Helper.getObjectValue(response, Constants.RETURN_CODE)));
+
+ boolean signalToken = true;
+ for (boolean continueLooping = true; continueLooping;)
+ {
+ opCode = Constants.OpCode.SignalCommand;
+ // for this test, alternatively signal: token - process - token ...
+
+ request = Helper.responseTemplate();
+ Helper.setStringValue(request, Constants.COMMAND_CODE, opCode);
+ if (signalToken)
+ Helper.setLongValue(request, Constants.TOKEN_ID, tokenId);
+ else
+ Helper.setLongValue(request, Constants.PROCESS_INSTANCE_ID, instanceId);
+ signalToken = ! signalToken;
+
+ response = invokeJbpm(request);
+
+ if (null!=response)
+ {
+ _logger.info("Invoked : "+opCode.toString());
+ _logger.info("Return code = "+Helper.getStringValue(response,Constants.RETURN_CODE));
+ excJbpm = (Exception)Helper.getObjectValue(response,Constants.EXCEPTION);
+ if (null==excJbpm)
+ {
+ instanceId = Helper.getLongValue(response,Constants.PROCESS_INSTANCE_ID);
+ tokenId = Helper.getLongValue(response,Constants.TOKEN_ID);
+ Token token = (Token)Helper.getObjectValue(response, Constants.JBPM_RETURN_OBJECT);
+ boolean hasEnded = token.hasEnded();
+ _logger.info("Has ended = "+ hasEnded);
+ _logger.info("Current State = "+token.getNode().getName());
+
+ continueLooping = ! hasEnded;
+ }
+ else
+ _logger.error("Problems in jbpm.CommandInterpreter",excJbpm);
+ }
+ else
+ _logger.info("Response was not received");
+ _logger.info("_______________________________________________________________________");
+
+ assertTrue(Constants.RETCODE_OK.equals(Helper.getObjectValue(response, Constants.RETURN_CODE)));
+ }
+
+ }
+ catch (Exception _ex)
+ {
+ _ex.printStackTrace();
+ assertTrue(false);
+ }
+
+ }
+
+ /**
+ * Invocation of this method should be unnecessary.
+ * Had to invoke it because I had trouble to have the properties loaded from jbossesb-properties.xml
+ * Once that is solved, you can get rid of the invocation to this method (up in the run() )
+ */
+ protected void setupRegistry() {
+ PropertyManager mgr = null;
+
+ mgr = ModulePropertyManager.getPropertyManager("registry");
+ mgr.setProperty(Environment.REGISTRY_IMPEMENTATION_CLASS,"org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl");
+ mgr.setProperty(Environment.REGISTRY_QUERY_MANAGER_URI,"jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire");
+ mgr.setProperty(Environment.REGISTRY_LIFECYCLE_MANAGER_URI,"jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish");
+ mgr.setProperty(Environment.REGISTRY_FACTORY_CLASS,"org.apache.ws.scout.registry.ConnectionFactoryImpl");
+ mgr.setProperty(Environment.REGISTRY_SCOUT_TRANSPORT_CLASS,"org.apache.ws.scout.transport.RMITransport");
+ mgr.setProperty(Environment.REGISTRY_USER,"jbossesb");
+ mgr.setProperty(Environment.REGISTRY_PASSWORD,"password");
+ System.setProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl");
+
+ mgr = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE) ;
+ mgr.setProperty(Environment.REGISTRY_FILE_HELPER_DIR, "/tmp") ;
+
+ }
+
+ protected Message invokeJbpm(Message request) throws Exception
+ {
+ return Invoker.invokeAndAwaitResponse(request,TEST_SVC_CATEGORY, TEST_SVC_NAME, 20000);
+ }
+
+
+ protected String getProcessDefinitionXml(String pFileName) throws Exception
+ {
+ InputStream in = this.getClass().getClassLoader().getResourceAsStream(pFileName);
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ byte[]ba = new byte[1000];
+ int iQ = -1;
+ while (-1<(iQ=in.read(ba)))
+ if (iQ>0) out.write(ba,0,iQ);
+ return out.toString();
+ }
+
+}
Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/jbpm_simple1/src/quickstart/jbpm_simple1/test/TestCommandMessages.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: labs/jbossesb/trunk/product/services/jbpm/build.xml
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/build.xml 2007-04-20 18:46:16 UTC (rev 11167)
+++ labs/jbossesb/trunk/product/services/jbpm/build.xml 2007-04-20 19:04:25 UTC (rev 11168)
@@ -28,13 +28,12 @@
<copy todir="build/jbpm.esb/META-INF">
<fileset dir="." includes="jboss-esb.xml" />
</copy>
+ <copy file="./server.hibernate.cfg.xml" tofile="build/jbpm.esb/hibernate.cfg.xml" />
+ <copy file="./server.jbpm.cfg.xml" tofile="build/jbpm.esb/jbpm.cfg.xml" />
<copy todir="build/jbpm.esb/" >
- <fileset dir="." includes="hibernate.cfg.xml,jbpm.cfg.xml"/>
- </copy>
- <copy todir="build/jbpm.esb/" >
- <fileset dir="lib/ext" includes="asm.jar,cglib-2.1_2jboss.jar
- commons-beanutils-1.6.1.jar,commons-digester-1.5.jar,
- dom4j-1.6.1.jar,hibernate3.jar,jbpm-3.1.3.jar,jbpm-identity-3.1.3.jar"/>
+ <fileset dir="lib/ext" includes="asm.jar,cglib.jar
+ commons-collections.jar,commons-logging.jar,
+ dom4j.jar,hibernate3.jar,jbpm-jpdl.jar,jbpm-identity.jar"/>
</copy>
</target>
Deleted: labs/jbossesb/trunk/product/services/jbpm/hibernate.cfg.xml
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/hibernate.cfg.xml 2007-04-20 18:46:16 UTC (rev 11167)
+++ labs/jbossesb/trunk/product/services/jbpm/hibernate.cfg.xml 2007-04-20 19:04:25 UTC (rev 11168)
@@ -1,179 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
- <!-- jdbc connection properties -->
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.url">jdbc:hsqldb:mem:.;sql.enforce_strict_size=true</property>
- <property name="hibernate.hbm2ddl.auto">create</property>
-<!--
- <property name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost/juddi</property>
--->
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
-<!--
- <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
- <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
- <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/JbpmDB</property>
- <property name="hibernate.connection.username">postgres</property>
- <property name="hibernate.connection.password"></property>
--->
-
-
- <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
-
- <!-- other hibernate properties
- <property name="hibernate.show_sql">true</property>
- <property name="hibernate.format_sql">true</property>
- <property name="hibernate.use_sql_comments">true</property>
- -->
-
- <!-- ############################################ -->
- <!-- # mapping files with external dependencies # -->
- <!-- ############################################ -->
-
- <!-- following mapping file has a dependendy on -->
- <!-- 'bsh-{version}.jar'. -->
- <!-- uncomment this if you don't have bsh on your -->
- <!-- classpath. you won't be able to use the -->
- <!-- script element in process definition files -->
- <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
-
- <!-- following mapping files have a dependendy on -->
- <!-- 'jbpm-identity-{version}.jar', mapping files -->
- <!-- of the pluggable jbpm identity component. -->
- <!-- comment out the following 3 lines if you don't-->
- <!-- want to use the default jBPM identity mgmgt -->
- <!-- component -->
- <mapping resource="org/jbpm/identity/User.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
- <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
-
- <!-- ###################### -->
- <!-- # jbpm mapping files # -->
- <!-- ###################### -->
-
- <!-- hql queries and type defs -->
- <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
-
- <!-- graph.def mapping files -->
- <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
- <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
-
- <!-- graph.node mapping files -->
- <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
- <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
-
- <!-- context.def mapping files -->
- <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
-
- <!-- taskmgmt.def mapping files -->
- <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
-
- <!-- module.def mapping files -->
- <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
-
- <!-- bytes mapping files -->
- <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
-
- <!-- file.def mapping files -->
- <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
-
- <!-- scheduler.def mapping files -->
- <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
- <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
-
- <!-- graph.exe mapping files -->
- <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
- <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
-
- <!-- module.exe mapping files -->
- <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
-
- <!-- context.exe mapping files -->
- <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
- <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
-
- <!-- msg.db mapping files -->
- <mapping resource="org/jbpm/msg/Message.hbm.xml"/>
- <mapping resource="org/jbpm/msg/db/TextMessage.hbm.xml"/>
- <mapping resource="org/jbpm/command/ExecuteActionCommand.hbm.xml"/>
- <mapping resource="org/jbpm/command/ExecuteNodeCommand.hbm.xml"/>
- <mapping resource="org/jbpm/command/SignalCommand.hbm.xml"/>
- <mapping resource="org/jbpm/command/TaskInstanceEndCommand.hbm.xml"/>
-
- <!-- taskmgmt.exe mapping files -->
- <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
-
- <!-- scheduler.exe mapping files -->
- <mapping resource="org/jbpm/scheduler/exe/Timer.hbm.xml"/>
-
- <!-- logging mapping files -->
- <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
- <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
- <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
-
- </session-factory>
-</hibernate-configuration>
Modified: labs/jbossesb/trunk/product/services/jbpm/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/jboss-esb.xml 2007-04-20 18:46:16 UTC (rev 11167)
+++ labs/jbossesb/trunk/product/services/jbpm/jboss-esb.xml 2007-04-20 19:04:25 UTC (rev 11168)
@@ -12,18 +12,7 @@
error-delete="true"
/>
</fs-bus>
- </fs-provider>
-
- <jms-provider name="JBossESB-JBM" connection-factory="ConnectionFactory">
-
- <jms-bus busid="toJbpmJmsChannel">
- <jms-message-filter
- dest-type="QUEUE"
- dest-name="queue/B"
- selector="type='toJbpm'"
- />
- </jms-bus>
- </jms-provider>
+ </fs-provider>
</providers>
<services>
@@ -32,12 +21,6 @@
name="nameJbpmService"
description="jBPM-ESB Service">
<listeners>
- <!--
- <jms-listener name="jmsToJbpmInterface"
- busidref="toJbpmJmsChannel"
- maxThreads="1"
- />
- -->
<fs-listener name="jbpmThroughFile"
busidref="jbpmFileChannel"
maxThreads="1"
Deleted: labs/jbossesb/trunk/product/services/jbpm/jbpm.cfg.xml
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/jbpm.cfg.xml 2007-04-20 18:46:16 UTC (rev 11167)
+++ labs/jbossesb/trunk/product/services/jbpm/jbpm.cfg.xml 2007-04-20 19:04:25 UTC (rev 11168)
@@ -1,9 +0,0 @@
-<jbpm-configuration>
-
- <!--
- The default configurations can be found in org/jbpm/default.jbpm.cfg.xml
- Those configurations can be overwritten by putting this file called
- jbpm.cfg.xml on the root of the classpath and put in the customized values.
- -->
-
-</jbpm-configuration>
Added: labs/jbossesb/trunk/product/services/jbpm/server.hibernate.cfg.xml
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/server.hibernate.cfg.xml (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/server.hibernate.cfg.xml 2007-04-20 19:04:25 UTC (rev 11168)
@@ -0,0 +1,189 @@
+<?xml version='1.0' encoding='utf-8'?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <!-- hibernate dialect -->
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+
+ <!-- JDBC connection properties (begin) -->
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
+ <!-- JDBC connection properties (end) -->
+
+ <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
+
+ <!-- DataSource properties (begin) ===
+ <property name="hibernate.connection.datasource">java:/JbpmDS</property>
+ ==== DataSource properties (end) -->
+
+ <!-- JTA transaction properties (begin) ===
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ ==== JTA transaction properties (end) -->
+
+ <!-- CMT transaction properties (begin) ===
+ <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
+ <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ ==== CMT transaction properties (end) -->
+
+ <!-- logging properties (begin) ===
+ <property name="hibernate.show_sql">true</property>
+ <property name="hibernate.format_sql">true</property>
+ <property name="hibernate.use_sql_comments">true</property>
+ ==== logging properties (end) -->
+
+ <!-- ############################################ -->
+ <!-- # mapping files with external dependencies # -->
+ <!-- ############################################ -->
+
+ <!-- following mapping file has a dependendy on -->
+ <!-- 'bsh-{version}.jar'. -->
+ <!-- uncomment this if you don't have bsh on your -->
+ <!-- classpath. you won't be able to use the -->
+ <!-- script element in process definition files -->
+ <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
+
+ <!-- following mapping files have a dependendy on -->
+ <!-- 'jbpm-identity.jar', mapping files -->
+ <!-- of the pluggable jbpm identity component. -->
+ <!-- Uncomment the following 3 lines if you -->
+ <!-- want to use the jBPM identity mgmgt -->
+ <!-- component. -->
+ <!-- identity mappings (begin) -->
+ <mapping resource="org/jbpm/identity/User.hbm.xml"/>
+ <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
+ <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
+ <!-- identity mappings (end) -->
+
+ <!-- following mapping files have a dependendy on -->
+ <!-- the JCR API -->
+ <!-- jcr mappings (begin) ===
+ <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
+ ==== jcr mappings (end) -->
+
+
+ <!-- ###################### -->
+ <!-- # jbpm mapping files # -->
+ <!-- ###################### -->
+
+ <!-- hql queries and type defs -->
+ <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
+
+ <!-- graph.def mapping files -->
+ <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
+ <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
+
+ <!-- graph.node mapping files -->
+ <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
+
+ <!-- context.def mapping files -->
+ <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
+
+ <!-- taskmgmt.def mapping files -->
+ <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
+
+ <!-- module.def mapping files -->
+ <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
+
+ <!-- bytes mapping files -->
+ <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
+
+ <!-- file.def mapping files -->
+ <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
+
+ <!-- scheduler.def mapping files -->
+ <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
+ <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
+
+ <!-- graph.exe mapping files -->
+ <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
+
+ <!-- module.exe mapping files -->
+ <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
+
+ <!-- context.exe mapping files -->
+ <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
+
+ <!-- job mapping files -->
+ <mapping resource="org/jbpm/job/Job.hbm.xml"/>
+ <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
+ <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
+ <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
+
+ <!-- taskmgmt.exe mapping files -->
+ <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
+
+ <!-- logging mapping files -->
+ <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
+ <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
+ <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
+ <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: labs/jbossesb/trunk/product/services/jbpm/server.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/services/jbpm/server.jbpm.cfg.xml
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/server.jbpm.cfg.xml (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/server.jbpm.cfg.xml 2007-04-20 19:04:25 UTC (rev 11168)
@@ -0,0 +1,9 @@
+<jbpm-configuration>
+
+ <!--
+ The default configurations can be found in org/jbpm/default.jbpm.cfg.xml
+ Those configurations can be overwritten by putting this file called
+ jbpm.cfg.xml on the root of the classpath and put in the customized values.
+ -->
+
+</jbpm-configuration>
Property changes on: labs/jbossesb/trunk/product/services/jbpm/server.jbpm.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreter.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreter.java 2007-04-20 18:46:16 UTC (rev 11167)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreter.java 2007-04-20 19:04:25 UTC (rev 11168)
@@ -125,40 +125,48 @@
return (null==replyTo)? output : defaultReply(output);
} //________________________________
+ private static final String DO_NOT_USE_CREATE_SCHEMA ="DONOTUSE_createSchema";
public Message process(Message message)
throws MalformedEPRException, CourierException, ActionProcessingException
{
Message response = null;
try
{
- Constants.OpCode opCode =Constants.OpCode
- .valueOf((String)message.getBody().get(Constants.COMMAND_CODE));
- if (opCode.equals(Constants.OpCode.DeployProcessDefinition))
+ String strCommand = (String)message.getBody().get(Constants.COMMAND_CODE);
+ Constants.OpCode opCode =(DO_NOT_USE_CREATE_SCHEMA.equals(strCommand))
+ ? null
+ : Constants.OpCode.valueOf(strCommand);
+ if (DO_NOT_USE_CREATE_SCHEMA.equals(strCommand))
+ response = createSchema(message);
+ else if (Constants.OpCode.DeployProcessDefinition.equals(opCode))
response = deployProcessDefinition(message);
- if (opCode.equals(Constants.OpCode.CancelProcessInstanceCommand))
+ else if (Constants.OpCode.DeployProcessDefinition.equals(opCode))
+ response = deployProcessDefinition(message);
+ else if (Constants.OpCode.CancelProcessInstanceCommand.equals(opCode))
response = cancelProcessInstance(message);
- if (opCode.equals(Constants.OpCode.CancelTokenCommand))
+ else if (Constants.OpCode.CancelTokenCommand.equals(opCode))
response = cancelToken(message);
- if (opCode.equals(Constants.OpCode.CancelWorkOnTaskCommand))
+ else if (Constants.OpCode.CancelWorkOnTaskCommand.equals(opCode))
response = cancelWorkOnTask(message);
- if (opCode.equals(Constants.OpCode.GetProcessInstanceCommand))
+ else if (Constants.OpCode.GetProcessInstanceCommand.equals(opCode))
response = getProcessInstance(message);
- if (opCode.equals(Constants.OpCode.GetTaskInstanceCommand))
+ else if (Constants.OpCode.GetTaskInstanceCommand.equals(opCode))
response = getTaskInstance(message);
- if (opCode.equals(Constants.OpCode.GetTaskListCommand))
+ else if (Constants.OpCode.GetTaskListCommand.equals(opCode))
response = getTaskList(message);
- if (opCode.equals(Constants.OpCode.NewProcessInstanceCommand))
+ else if (Constants.OpCode.NewProcessInstanceCommand.equals(opCode))
response = newProcessInstance(message, false);
- if (opCode.equals(Constants.OpCode.SignalCommand))
+ else if (Constants.OpCode.SignalCommand.equals(opCode))
response = signal(message);
- if (opCode.equals(Constants.OpCode.StartProcessInstanceCommand))
+ else if (Constants.OpCode.StartProcessInstanceCommand.equals(opCode))
response = newProcessInstance(message, true);
- if (opCode.equals(Constants.OpCode.StartWorkOnTaskCommand))
+ else if (Constants.OpCode.StartWorkOnTaskCommand.equals(opCode))
response = startWorkOnTask(message);
- if (opCode.equals(Constants.OpCode.TaskInstanceEndCommand))
+ else if (Constants.OpCode.TaskInstanceEndCommand.equals(opCode))
response = taskInstanceEnd(message);
- if (opCode.equals(Constants.OpCode.VariablesCommand))
+ else if (Constants.OpCode.VariablesCommand.equals(opCode))
response = variables(message);
+
if (null==response)
{
// this should NEVER happen
@@ -197,6 +205,15 @@
} //________________________________
/**
+ * Do NOT NOT NOT use the following command - only for debug purposess
+ */
+ private static Boolean s_schemaAlreadyCreated = false;
+ private Message createSchema(Message request) throws Exception
+ {
+ return doTheJob(new CreateSchemaCommand());
+ } //________________________________
+
+ /**
* Until there is an appropriate Command for this in the jBPM api, use the local implementation
* @param request Message - containing either a process definition, or it's XML representation
* @return
@@ -563,4 +580,21 @@
}
}
+ private static class CreateSchemaCommand implements Command
+ {
+ private static final long serialVersionUID = 1L;
+ public Object execute(JbpmContext jbpmCtx) throws Exception
+ {
+ if (! s_schemaAlreadyCreated)
+ synchronized (s_oSynch)
+ {
+ if (! s_schemaAlreadyCreated)
+ {
+ jbpmCtx.getJbpmConfiguration().createSchema();
+ s_schemaAlreadyCreated = true;
+ }
+ }
+ return null;
+ }
+ }
}
Modified: labs/jbossesb/trunk/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreterUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreterUnitTest.java 2007-04-20 18:46:16 UTC (rev 11167)
+++ labs/jbossesb/trunk/product/services/jbpm/src/test/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreterUnitTest.java 2007-04-20 19:04:25 UTC (rev 11168)
@@ -78,7 +78,16 @@
public static void runBeforeAllTests()
{
_logger.info("@BeforeClass invoked");
-// initializeJbpmForTest();
+ try
+ {
+ copyHibernateCfgToRootCP();
+ JbpmConfiguration.getInstance().createSchema();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ assertTrue(false);
+ }
}
@@ -102,24 +111,9 @@
assertTrue(true);
}
- private static void initializeJbpmForTest()
- {
- try
- {
- copyHibernateCfgToRootCP();
- JbpmConfiguration.getInstance().createSchema();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- assertTrue(false);
- }
- }
-
-// @Test
+ @Test
public void testFullProcessLifecycle()
{
- initializeJbpmForTest();
long instanceId=0 , tokenId=0;
Exception excJbpm;
Constants.OpCode opCode = null;
@@ -266,34 +260,4 @@
return _interp.process(request);
}
-
- //TODO Once the test is able to locate hibernate.cfg.xml in the path
- // get rid of what follows, and change invokeJbpm so it uses jbpmStraight()
-// protected CommandVehicle jbpmViaService(CommandVehicle vhc) throws Exception
-// {
-// if (! _registrySet)
-// setupRegistry();
-// Message response = Invoker.invokeAndAwaitResponse
-// (vhc, "categoryJbpmService","nameJbpmService" , 20000);
-// return (null==response)?null:new CommandVehicle(response);
-// } //_______________________________
-
-// private static boolean _registrySet = false;
-// protected static void setupRegistry()
-// {
-// _registrySet = true;
-// PropertyManager mgr = null;
-// mgr = ModulePropertyManager.getPropertyManager("registry");
-// mgr.setProperty(Environment.REGISTRY_IMPEMENTATION_CLASS,"org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl");
-// mgr.setProperty(Environment.REGISTRY_QUERY_MANAGER_URI,"jnp://localhost:1099/InquiryService?org.apache.juddi.registry.rmi.Inquiry#inquire");
-// mgr.setProperty(Environment.REGISTRY_LIFECYCLE_MANAGER_URI,"jnp://localhost:1099/PublishService?org.apache.juddi.registry.rmi.Publish#publish");
-// mgr.setProperty(Environment.REGISTRY_FACTORY_CLASS,"org.apache.ws.scout.registry.ConnectionFactoryImpl");
-// mgr.setProperty(Environment.REGISTRY_SCOUT_TRANSPORT_CLASS,"org.apache.ws.scout.transport.RMITransport");
-// mgr.setProperty(Environment.REGISTRY_USER,"jbossesb");
-// mgr.setProperty(Environment.REGISTRY_PASSWORD,"password");
-// System.setProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl");
-// mgr = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE) ;
-// mgr.setProperty(Environment.REGISTRY_FILE_HELPER_DIR, System.getProperty("java.io.tmpdir","/tmp")) ;
-// }
-
}
\ No newline at end of file
More information about the jboss-svn-commits
mailing list