[jbpm-commits] JBoss JBPM SVN: r3057 - in jbpm3/trunk/modules/integration/api/src: test and 9 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Nov 24 09:46:27 EST 2008


Author: thomas.diesler at jboss.com
Date: 2008-11-24 09:46:27 -0500 (Mon, 24 Nov 2008)
New Revision: 3057

Added:
   jbpm3/trunk/modules/integration/api/src/test/
   jbpm3/trunk/modules/integration/api/src/test/java/
   jbpm3/trunk/modules/integration/api/src/test/java/org/
   jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/
   jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/
   jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/
   jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/
   jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/DialectHandlerTest.java
   jbpm3/trunk/modules/integration/api/src/test/resources/
   jbpm3/trunk/modules/integration/api/src/test/resources/integration/
   jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/
   jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/simple-process.xml
Modified:
   jbpm3/trunk/modules/integration/api/src/
Log:
Add DialectHandlerTest


Property changes on: jbpm3/trunk/modules/integration/api/src
___________________________________________________________________
Name: svn:ignore
   - test
cts

   + cts


Added: jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/DialectHandlerTest.java
===================================================================
--- jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/DialectHandlerTest.java	                        (rev 0)
+++ jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/DialectHandlerTest.java	2008-11-24 14:46:27 UTC (rev 3057)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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 org.jbpm.test.integration.jpdl;
+
+// $Id$
+
+import java.net.URL;
+
+import org.jbpm.api.client.Configuration;
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.client.Token;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.Process.ProcessStatus;
+import org.jbpm.api.service.ProcessDefinitionService;
+import org.jbpm.api.test.APITestCase;
+
+/**
+ * Test simple jPDL process deployment
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 24-Nov-2008
+ */
+public class DialectHandlerTest extends APITestCase
+{
+  public void testSimple() throws Exception
+  {
+    URL pdXML = getResourceURL("integration/jpdl/simple-process.xml");
+    
+    ProcessEngine engine = Configuration.getProcessEngine();
+    ProcessDefinitionService pdService = engine.getService(ProcessDefinitionService.class);
+    
+    ProcessDefinition procDef = pdService.parseProcessDefinition(pdXML);
+    assertNotNull("ProcDef not null", procDef);
+    
+    Process proc = procDef.newInstance();
+    Token token = proc.startProcess();
+    assertEquals("Node name", "a", token.getCurrentNode().getName());
+    
+    token.signal();
+    assertEquals("Node name", "b", token.getCurrentNode().getName());
+    
+    token.signal();
+    assertEquals("Node name", "c", token.getCurrentNode().getName());
+    
+    token.signal();
+    assertEquals("Node name", "end", token.getCurrentNode().getName());
+    assertEquals(ProcessStatus.Completed, proc.getProcessStatus());
+  }
+}


Property changes on: jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/DialectHandlerTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/simple-process.xml
===================================================================
--- jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/simple-process.xml	                        (rev 0)
+++ jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/simple-process.xml	2008-11-24 14:46:27 UTC (rev 3057)
@@ -0,0 +1,16 @@
+<process-definition name="simpleProcess" xmlns="urn:jbpm.org:jpdl-3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd">
+  <start-state name='start'>
+    <transition to='a' />
+  </start-state>
+  <state name='a'>
+    <transition to='b' />
+  </state>
+  <state name='b'>
+    <transition to='c' />
+  </state>
+  <state name='c'>
+    <transition to='end' />
+  </state>
+  <end-state name='end' />
+</process-definition>


Property changes on: jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/simple-process.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbpm-commits mailing list