Author: spagop
Date: 2008-10-09 17:25:44 -0400 (Thu, 09 Oct 2008)
New Revision: 566
Added:
trunk/extensions/dna-sequencer-jbpm-jpdl/
trunk/extensions/dna-sequencer-jbpm-jpdl/pom.xml
trunk/extensions/dna-sequencer-jbpm-jpdl/src/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3EndStateMetadata.java
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3Metadata.java
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3StartStateMetadata.java
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3TransitionMetadata.java
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/java/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/java/org/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/java/org/jboss/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/java/org/jboss/dna/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/java/org/jboss/dna/sequencer/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/java/org/jboss/dna/sequencer/jpdl3/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/java/org/jboss/dna/sequencer/jpdl3/JPDL3MetadataTest.java
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/resources/
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/resources/processdefinition.xml
Log:
first snapshot for the jbpm-jpdl3 sequencer module
Added: trunk/extensions/dna-sequencer-jbpm-jpdl/pom.xml
===================================================================
--- trunk/extensions/dna-sequencer-jbpm-jpdl/pom.xml (rev 0)
+++ trunk/extensions/dna-sequencer-jbpm-jpdl/pom.xml 2008-10-09 21:25:44 UTC (rev 566)
@@ -0,0 +1,139 @@
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna</artifactId>
+ <version>0.3-SNAPSHOT</version>
+ <relativePath>../..</relativePath>
+ </parent>
+ <groupId>org.jboss.dna.sequencer.jpdl</groupId>
+ <artifactId>dna-sequencer-jbpm-jpdl</artifactId>
+ <packaging>jar</packaging>
+ <version>0.3-SNAPSHOT</version>
+ <name>JBoss DNA jBPM jPDL Sequencer</name>
+ <description>
+ JBoss DNA Sequencer that processes jPDL XML document
+ </description>
+ <
url>http://labs.jboss.org/dna</url>
+ <properties>
+ <dna-version>0.3-SNAPSHOT</dna-version>
+ </properties>
+ <!--
+ Define the dependencies. Note that all version and scopes default to those
+ defined in the dependencyManagement section of the parent pom.
+ -->
+ <dependencies>
+ <!--
+ Common
+ -->
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-graph</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-common</artifactId>
+ <version>${dna-version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-graph</artifactId>
+ <version>${dna-version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-integration-tests</artifactId>
+ <version>0.2-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <!--
+ jBPM jPDL
+ -->
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <version>3.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <!--
+ Testing (note the scope)
+ -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-library</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ </dependency>
+ <!--
+ Logging (require SLF4J API for compiling, but use Log4J and its SLF4J binding for
testing)
+ -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <!--
+ Java Concurrency in Practice annotations
+ -->
+ <dependency>
+ <groupId>net.jcip</groupId>
+ <artifactId>jcip-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <!--
+ Apache Jackrabbit (JCR Implementation)
+ -->
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-core</artifactId>
+ </dependency>
+ </dependencies>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Added:
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3EndStateMetadata.java
===================================================================
---
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3EndStateMetadata.java
(rev 0)
+++
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3EndStateMetadata.java 2008-10-09
21:25:44 UTC (rev 566)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jboss.dna.sequencer.jpdl3;
+
+/**
+ * @author Serge Pagop (serge.pagop(a)googlemail.com)
+ */
+public class JPDL3EndStateMetadata {
+ private String name;
+
+ /**
+ * @return the endName
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param endName the endName to set
+ */
+ public void setName( String endName ) {
+ this.name = endName;
+ }
+}
Added:
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3Metadata.java
===================================================================
---
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3Metadata.java
(rev 0)
+++
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3Metadata.java 2008-10-09
21:25:44 UTC (rev 566)
@@ -0,0 +1,147 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jboss.dna.sequencer.jpdl3;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import org.jbpm.graph.def.Node;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.def.Transition;
+import org.jbpm.graph.node.EndState;
+import org.jbpm.graph.node.StartState;
+
+/**
+ * The jBPM Process definition language meta data.
+ *
+ * @author Serge Pagop
+ */
+public class JPDL3Metadata {
+ private String pdName;
+ private JPDL3StartStateMetadata jPDL3StartStateMetadata;
+ private JPDL3EndStateMetadata jPDL3EndStateMetadata;
+
+
+ private JPDL3Metadata() {
+ // prevent construction
+ }
+
+ /**
+ * Create an instance of {@link JPDL3Metadata} with all data of a specific jpdl xml
document.
+ *
+ * @param stream - the {@link InputStream}, that represents a stream of jpdl.
+ * @return a object of {@link JPDL3Metadata}.
+ */
+ @SuppressWarnings( {"unchecked", "cast"} )
+ public static JPDL3Metadata instance( InputStream stream ) {
+ ProcessDefinition processDefinition =
ProcessDefinition.parseXmlInputStream(stream);
+ if (processDefinition != null) {
+ JPDL3Metadata jplMetadata = new JPDL3Metadata();
+ if (processDefinition.getName() != null) {
+ jplMetadata.setPdName(processDefinition.getName());
+ }
+ List<Node> nodes = (List<Node>)processDefinition.getNodes();
+ for (Node node : nodes) {
+ if (node instanceof StartState) {
+ StartState startState = (StartState)node;
+ JPDL3StartStateMetadata jPDL3StartStateMetadata = new
JPDL3StartStateMetadata();
+ if (startState.getName() != null) {
+ jPDL3StartStateMetadata.setName(startState.getName());
+ }
+ List<JPDL3TransitionMetadata> transitions = new
ArrayList<JPDL3TransitionMetadata>();
+ for (Transition transition :
(List<Transition>)startState.getLeavingTransitions()) {
+ JPDL3TransitionMetadata jPDL3TransitionMetadata = new
JPDL3TransitionMetadata();
+ if (transition.getName() != null) {
+ jPDL3TransitionMetadata.setName(transition.getName());
+ }
+ Node toNode = transition.getTo();
+ if (toNode != null) {
+ jPDL3TransitionMetadata.setTo(toNode.getName());
+ }
+ transitions.add(jPDL3TransitionMetadata);
+ }
+ jPDL3StartStateMetadata.setTransitions(transitions);
+ jplMetadata.setStartStateMetadata(jPDL3StartStateMetadata);
+ }
+
+ if (node instanceof EndState) {
+ EndState endState = (EndState)node;
+ JPDL3EndStateMetadata jPDL3EndStateMetadata = new
JPDL3EndStateMetadata();
+ if (endState.getName() != null) {
+ jPDL3EndStateMetadata.setName(endState.getName());
+ }
+ jplMetadata.setEndStateMetadata(jPDL3EndStateMetadata);
+ }
+ }
+ return jplMetadata;
+ }
+ return null;
+ }
+
+ /**
+ * Get the name of process definition.
+ *
+ * @return the name of the process definition.
+ */
+ public String getPdName() {
+ return pdName;
+ }
+
+ /**
+ * Set the name of process definition.
+ *
+ * @param pdName - the name of process definition.
+ */
+ public void setPdName( String pdName ) {
+ this.pdName = pdName;
+ }
+
+ /**
+ * @return the jPDL3StartStateMetadata.
+ */
+ public JPDL3StartStateMetadata getStartStateMetadata() {
+ return jPDL3StartStateMetadata;
+ }
+
+ /**
+ *
+ * @return the jPDL3EndStateMetadata.
+ */
+ public JPDL3EndStateMetadata getEndStateMetadata() {
+ return jPDL3EndStateMetadata;
+ }
+
+
+ /**
+ * @param jPDL3StartStateMetadata the jPDL3StartStateMetadata to set
+ */
+ public void setStartStateMetadata( JPDL3StartStateMetadata jPDL3StartStateMetadata )
{
+ this.jPDL3StartStateMetadata = jPDL3StartStateMetadata;
+ }
+
+ /**
+ * @param jPDL3EndStateMetadata the jPDL3EndStateMetadata to set
+ */
+ public void setEndStateMetadata( JPDL3EndStateMetadata jPDL3EndStateMetadata ) {
+ this.jPDL3EndStateMetadata = jPDL3EndStateMetadata;
+ }
+}
Added:
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3StartStateMetadata.java
===================================================================
---
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3StartStateMetadata.java
(rev 0)
+++
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3StartStateMetadata.java 2008-10-09
21:25:44 UTC (rev 566)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jboss.dna.sequencer.jpdl3;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Serge Pagop
+ */
+public class JPDL3StartStateMetadata {
+ private String name;
+ private List<JPDL3TransitionMetadata> transitions = new
ArrayList<JPDL3TransitionMetadata>();
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName( String name ) {
+ this.name = name;
+ }
+
+ /**
+ * @return the transitions
+ */
+ public List<JPDL3TransitionMetadata> getTransitions() {
+ return transitions;
+ }
+
+ /**
+ * @param transitions the transitions to set
+ */
+ public void setTransitions( List<JPDL3TransitionMetadata> transitions ) {
+ this.transitions = transitions;
+ }
+}
Added:
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3TransitionMetadata.java
===================================================================
---
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3TransitionMetadata.java
(rev 0)
+++
trunk/extensions/dna-sequencer-jbpm-jpdl/src/main/java/org/jboss/dna/sequencer/jpdl3/JPDL3TransitionMetadata.java 2008-10-09
21:25:44 UTC (rev 566)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jboss.dna.sequencer.jpdl3;
+
+/**
+ * @author Serge Pagop (serge.pagop(a)googlemail.com)
+ */
+public class JPDL3TransitionMetadata {
+
+ private String name;
+ private String to;
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName( String name ) {
+ this.name = name;
+ }
+
+ /**
+ * @return the to
+ */
+ public String getTo() {
+ return to;
+ }
+
+ /**
+ * @param to the to to set
+ */
+ public void setTo( String to ) {
+ this.to = to;
+ }
+
+}
Added:
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/java/org/jboss/dna/sequencer/jpdl3/JPDL3MetadataTest.java
===================================================================
---
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/java/org/jboss/dna/sequencer/jpdl3/JPDL3MetadataTest.java
(rev 0)
+++
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/java/org/jboss/dna/sequencer/jpdl3/JPDL3MetadataTest.java 2008-10-09
21:25:44 UTC (rev 566)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jboss.dna.sequencer.jpdl3;
+
+import java.io.InputStream;
+import java.util.List;
+import static org.junit.Assert.*;
+import org.jboss.dna.sequencer.jpdl3.JPDL3EndStateMetadata;
+import org.jboss.dna.sequencer.jpdl3.JPDL3Metadata;
+import org.jboss.dna.sequencer.jpdl3.JPDL3StartStateMetadata;
+import org.jboss.dna.sequencer.jpdl3.JPDL3TransitionMetadata;
+import org.jbpm.util.ClassLoaderUtil;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @author Serge Pagop
+ */
+public class JPDL3MetadataTest {
+ JPDL3Metadata metadata;
+
+ @Before
+ public void beforeEach() {
+ metadata = createJPDLMetadata();
+ }
+
+ @After
+ public void afterEach() {
+
+ }
+
+ @Test
+ public void shouldHaveName() {
+ assertEquals("Pd-Name", metadata.getPdName());
+ }
+
+ @Test
+ public void shouldHaveStartState() {
+ JPDL3StartStateMetadata jPDL3StartStateMetadata =
metadata.getStartStateMetadata();
+ assertNotNull(jPDL3StartStateMetadata);
+ assertEquals("S0", jPDL3StartStateMetadata.getName());
+ //Transitions
+ List<JPDL3TransitionMetadata> transitions =
jPDL3StartStateMetadata.getTransitions();
+ for (JPDL3TransitionMetadata jPDL3TransitionMetadata : transitions) {
+ assertEquals("Tr01_S01", jPDL3TransitionMetadata.getName());
+ assertEquals("Phase01", jPDL3TransitionMetadata.getTo());
+ }
+ }
+
+ @Test
+ public void shouldHaveEndState() {
+ JPDL3EndStateMetadata jPDL3EndStateMetadata = metadata.getEndStateMetadata();
+ assertNotNull(jPDL3EndStateMetadata);
+ assertEquals("S1", jPDL3EndStateMetadata.getName());
+ }
+
+ public static JPDL3Metadata createJPDLMetadata() {
+ InputStream stream =
ClassLoaderUtil.getStream("processdefinition.xml");
+ JPDL3Metadata metadata = JPDL3Metadata.instance(stream);
+ assertNotNull(metadata);
+ return metadata;
+ }
+}
Added: trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/resources/processdefinition.xml
===================================================================
--- trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/resources/processdefinition.xml
(rev 0)
+++
trunk/extensions/dna-sequencer-jbpm-jpdl/src/test/resources/processdefinition.xml 2008-10-09
21:25:44 UTC (rev 566)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<process-definition xmlns="urn:jbpm.org:jpdl-3.2"
+ name="Pd-Name">
+
+ <!-- Process roles -->
+ <swimlane name="SL1">
+ <assignment class="com.sample.assigned.Task1Handler" />
+ </swimlane>
+ <swimlane name="SL2">
+ <assignment class="com.sample.assigned.Task2Handler" />
+ </swimlane>
+
+ <start-state name="S0">
+ <transition name="Tr01_S01" to="Phase01" />
+ </start-state>
+
+ <task-node name="Phase01">
+ <task name="Task01_Phase01" swimlane="SL1"/>
+ <transition name="Tr01_Phase01" to="Phase02" />
+ </task-node>
+
+ <task-node name="Phase02">
+ <task name="Task01_Phase02" swimlane="SL2"/>
+ <transition name="Tr01_Phase02" to="Phase03" />
+ </task-node>
+
+ <task-node name="Phase03">
+ <task name="Task_01_Phase03">
+ <assignment class="com.sample.assigned.Task3Handler" />
+ </task>
+ <transition name="Tr01_Phase03" to="Phase04" />
+ </task-node>
+
+ <task-node name="Phase04">
+ <task name="Task_01_Phase04">
+ <assignment class="com.sample.assigned.Task4Hanlder" />
+ </task>
+ <transition name="Tr01_Phase04" to="S1" />
+ </task-node>
+
+ <end-state name="S1" />
+
+</process-definition>
\ No newline at end of file