[jbpm-commits] JBoss JBPM SVN: r5192 - in jbpm4/trunk/modules: api/src/main/resources and 14 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Jul 2 12:38:22 EDT 2009
Author: tom.baeyens at jboss.com
Date: 2009-07-02 12:38:22 -0400 (Thu, 02 Jul 2009)
New Revision: 5192
Added:
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/process/DescriptionTest.java
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinition.java
jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd
jbpm4/trunk/modules/examples/pom.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/mail/inline/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/assignee/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/candidates/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/notification/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/reminder/process.jpdl.xml
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/variables/process.jpdl.xml
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlBinding.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlSchemaTest.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/email/impl/MailProducerImpl.java
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch06-Jpdl.xml
Log:
JBPM-2378 JBPM-2352 fixed xsd stuff
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinition.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinition.java 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/ProcessDefinition.java 2009-07-02 16:38:22 UTC (rev 5192)
@@ -55,4 +55,7 @@
/** the name of the resource in the deployment which contains the image
* file for this process */
String getImageResourceName();
+
+ /** description of the process definition */
+ String getDescription();
}
Modified: jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd
===================================================================
--- jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/api/src/main/resources/jpdl-4.0.xsd 2009-07-02 16:38:22 UTC (rev 5192)
@@ -29,7 +29,8 @@
is the top level element in a jPDL process file.</documentation></annotation>
<complexType>
<sequence minOccurs="0" maxOccurs="unbounded">
- <element ref="tns:swimlane" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="description" minOccurs="0" maxOccurs="unbounded" type="string" />
+ <element ref="tns:swimlane" minOccurs="0" maxOccurs="unbounded" />
<element ref="tns:on" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
<group ref="tns:activityGroup" minOccurs="0" maxOccurs="unbounded" />
@@ -79,6 +80,10 @@
<element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
</sequence>
<attributeGroup ref="tns:activityAttributes" />
+ <attribute name="form" type="string">
+ <annotation><documentation>the resource name of the form in the
+ deployment.</documentation></annotation>
+ </attribute>
</complexType>
</element>
@@ -305,6 +310,23 @@
</complexType>
</element>
+ <!-- ~~~ MAIL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="mail">
+ <annotation><documentation>Sends an email
+ </documentation></annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:mailType">
+ <sequence>
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
<!-- ~~~ JAVA ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<element name="java">
<annotation><documentation>Invokes a method on a java object.
@@ -325,6 +347,24 @@
</complexType>
</element>
+ <!-- ~~~ CUSTOM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <element name="custom">
+ <annotation><documentation>Uses a user defined, custom implementation of
+ ActivityBehaviour
+ </documentation></annotation>
+ <complexType>
+ <complexContent>
+ <extension base="tns:wireObjectType">
+ <sequence>
+ <element ref="tns:on" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="tns:transition" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
+ <attributeGroup ref="tns:activityAttributes" />
+ </extension>
+ </complexContent>
+ </complexType>
+ </element>
+
<!-- ~~~ TASK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<element name="task">
<annotation><documentation>Creates a task in the task component.
@@ -333,6 +373,18 @@
<sequence>
<element name="assignment-handler" minOccurs="0" type="tns:wireObjectType" />
<element ref="tns:on" minOccurs="0" maxOccurs="unbounded"/>
+ <element name="notification" minOccurs="0">
+ <complexType>
+ <attribute name="continue" type="tns:continueType" default="sync" />
+ </complexType>
+ </element>
+ <element name="reminder" minOccurs="0">
+ <complexType>
+ <attribute name="duedate" type="string" />
+ <attribute name="repeat" type="string" />
+ <attribute name="continue" type="tns:continueType" default="sync" />
+ </complexType>
+ </element>
<element ref="tns:timer" minOccurs="0" maxOccurs="unbounded"/>
<element name="transition" minOccurs="0" maxOccurs="unbounded">
<complexType>
@@ -349,6 +401,11 @@
<attributeGroup ref="tns:activityAttributes" />
<attributeGroup ref="tns:assignmentAttributes"/>
<attribute name="swimlane" type="string" />
+ <attribute name="form" type="string">
+ <annotation><documentation>the resource name of the form in the
+ deployment.</documentation></annotation>
+ </attribute>
+ <attribute name="duedate" type="string" />
<attribute name="on-transition" default="cancel">
<simpleType>
<restriction base="string">
@@ -417,7 +474,6 @@
</element>
<!-- ~~~ group ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
- <!--
<element name="group">
<annotation><documentation>Scope enclosing a number of activities.
</documentation></annotation>
@@ -433,7 +489,6 @@
<attributeGroup ref="tns:activityAttributes" />
</complexType>
</element>
- -->
</choice>
</group>
@@ -916,18 +971,22 @@
<annotation><documentation>Graphical information used by process designer tool.
</documentation></annotation>
</attribute>
- <attribute name="async">
- <annotation><documentation>Graphical information used by process designer tool.
+ <attribute name="continue" default="sync" type="tns:continueType">
+ <annotation><documentation>To specify async continuations.
+ sync is the default.
</documentation></annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="true" />
- <enumeration value="exclusive" />
- </restriction>
- </simpleType>
</attribute>
</attributeGroup>
+ <simpleType name="continueType">
+ <restriction base="string">
+ <enumeration value="async" />
+ <enumeration value="sync" />
+ <enumeration value="exclusive" />
+ </restriction>
+ </simpleType>
+
+
<attributeGroup name="assignmentAttributes">
<annotation><documentation>the assignment attributes will be used in
tasks and swimlanes to specify to whom these respectively are assigned.
@@ -1066,73 +1125,58 @@
<element name="sql" type="tns:qlType" />
<element name="java" type="tns:javaType" />
<element name="script" type="tns:scriptType" />
+ <element name="mail" type="tns:mailType" />
</choice>
</group>
- <complexType name="emailType">
+ <complexType name="mailType">
<sequence>
- <element name="property">
- <annotation><documentation>Template property value</documentation></annotation>
+ <element name="from" type="tns:mailRecipientType" minOccurs="0" />
+ <element name="to" type="tns:mailRecipientType" minOccurs="0" />
+ <element name="cc" type="tns:mailRecipientType" minOccurs="0" />
+ <element name="bcc" type="tns:mailRecipientType" minOccurs="0" />
+ <element name="subject" type="string" minOccurs="0" />
+ <element name="text" type="string" minOccurs="0" />
+ <element name="html" type="string" minOccurs="0" />
+ <element name="attachments" minOccurs="0" >
<complexType>
- <attribute name="name" type="string" />
- <attribute name="value" type="string" />
+ <sequence>
+ <element name="attachment" maxOccurs="unbounded">
+ <complexType>
+ <attribute name="url" type="string">
+ <annotation><documentation>URL reference to the attachment</documentation></annotation>
+ </attribute>
+ <attribute name="resource" type="string">
+ <annotation><documentation>Name of the attachment resource on the classpath</documentation></annotation>
+ </attribute>
+ <attribute name="file" type="string">
+ <annotation><documentation>File reference to the attachment</documentation></annotation>
+ </attribute>
+ </complexType>
+ </element>
+ </sequence>
</complexType>
</element>
</sequence>
- <attribute name="to" type="string" />
- <attribute name="type" type="string">
+ <attribute name="template" type="string">
<annotation><documentation>Reference to the email template</documentation></annotation>
</attribute>
</complexType>
- <complexType name="taskType" >
- <!--
- <sequence>
- <element name="reminder">
- <complexType>
- <attribute name="duedate" type="string" use="required" />
- <attribute name="repeat" type="string" />
- </complexType>
- </element>
- </sequence>
- -->
- <attributeGroup ref="tns:assignmentAttributes" />
- <attribute name="form" type="string">
+ <complexType name="mailRecipientType">
+ <attribute name="addresses" type="string">
+ <annotation><documentation>list of email address separated by ',' (comma) ';' (semicolon) '|' or whitespace</documentation></annotation>
</attribute>
- <attribute name="swimlane" type="string">
+ <attribute name="users" type="string">
+ <annotation><documentation>list of user ids that are resolved to the email address against configured identity component.
+ user ids should be separated by ',' (comma) ';' (semicolon) '|' or whitespace</documentation></annotation>
</attribute>
- <attribute name="description" type="string" />
- <attribute name="duedate" type="string" />
- <attribute name="notify" type="boolean" default="false"/>
- <!--
- <attribute name="subtasksync">
- <simpleType>
- <union>
- <simpleType>
- <restriction base="string">
- <enumeration value="last">
- <annotation><documentation>When the last subtask completes,
- this task is completed.</documentation></annotation>
- </enumeration>
- <enumeration value="first">
- <annotation><documentation>When the first subtask completes,
- this task is completed.</documentation></annotation>
- </enumeration>
- </restriction>
- </simpleType>
- <simpleType>
- <restriction base="int">
- <annotation><documentation>The number of subtasks that
- have to complete before this task is considered
- completed.</documentation></annotation>
- </restriction>
- </simpleType>
- </union>
- </simpleType>
+ <attribute name="groups" type="string">
+ <annotation><documentation>list of group ids that are resolved to the email address against configured identity component.
+ group ids should be separated by ',' (comma) ';' (semicolon) '|' or whitespace</documentation></annotation>
</attribute>
- -->
</complexType>
-
+
<simpleType name="booleanValueType">
<restriction base="string">
<enumeration value="true" />
Modified: jbpm4/trunk/modules/examples/pom.xml
===================================================================
--- jbpm4/trunk/modules/examples/pom.xml 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/examples/pom.xml 2009-07-02 16:38:22 UTC (rev 5192)
@@ -75,7 +75,6 @@
</dependencies>
<profiles>
-
<!-- -Ddatabase= -->
<profile>
<id>standalone.tests</id>
@@ -131,7 +130,6 @@
<name>jboss.bind.address</name>
</property>
</activation>
-
<dependencies>
<dependency>
<groupId>org.jbpm.jbpm4</groupId>
@@ -151,11 +149,8 @@
<scope>test</scope>
</dependency>
</dependencies>
-
-
<build>
<plugins>
-
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
@@ -177,14 +172,6 @@
</execution>
</executions>
</plugin>
-
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <failIfNoTests>false</failIfNoTests>
- <trimStackTrace>false</trimStackTrace>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/mail/inline/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/mail/inline/process.jpdl.xml 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/mail/inline/process.jpdl.xml 2009-07-02 16:38:22 UTC (rev 5192)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<process name="InlineMail">
+<process name="InlineMail" xmlns="http://jbpm.org/4.0/jpdl">
<start g="20,25,80,40">
<transition to="send rectify note" />
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/assignee/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/assignee/process.jpdl.xml 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/assignee/process.jpdl.xml 2009-07-02 16:38:22 UTC (rev 5192)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<process name="TaskAssignee">
+<process name="TaskAssignee" xmlns="http://jbpm.org/4.0/jpdl">
<start g="20,20,48,48">
<transition to="review" />
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/candidates/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/candidates/process.jpdl.xml 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/candidates/process.jpdl.xml 2009-07-02 16:38:22 UTC (rev 5192)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<process name="TaskCandidates">
+<process name="TaskCandidates" xmlns="http://jbpm.org/4.0/jpdl">
<start g="20,20,48,48">
<transition to="review" />
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/notification/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/notification/process.jpdl.xml 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/notification/process.jpdl.xml 2009-07-02 16:38:22 UTC (rev 5192)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<process name="TaskNotification">
+<process name="TaskNotification" xmlns="http://jbpm.org/4.0/jpdl">
<start g="20,20,48,48">
<transition to="review"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/reminder/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/reminder/process.jpdl.xml 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/reminder/process.jpdl.xml 2009-07-02 16:38:22 UTC (rev 5192)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<process name="TaskReminder">
+<process name="TaskReminder" xmlns="http://jbpm.org/4.0/jpdl">
<start g="20,20,48,48">
<transition to="review"/>
Modified: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/variables/process.jpdl.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/variables/process.jpdl.xml 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/task/variables/process.jpdl.xml 2009-07-02 16:38:22 UTC (rev 5192)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<process name="TaskVariables">
+<process name="TaskVariables" xmlns="http://jbpm.org/4.0/jpdl">
<start g="20,20,48,48">
<transition to="review" />
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlBinding.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlBinding.java 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/JpdlBinding.java 2009-07-02 16:38:22 UTC (rev 5192)
@@ -45,7 +45,7 @@
protected static final WireParser wireParser = JpdlParser.wireParser;
public JpdlBinding(String tagName) {
- super(tagName, "http://jbpm.org/4.0/jpdl", null);
+ super(tagName, JpdlParser.JPDL_NAMESPACE, null);
}
public void parseName(Element element, ActivityImpl activity, Parse parse) {
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/xml/JpdlParser.java 2009-07-02 16:38:22 UTC (rev 5192)
@@ -83,7 +83,9 @@
public class JpdlParser extends Parser {
private static final Log log = Log.getLog(JpdlParser.class.getName());
-
+
+ public static final String JPDL_NAMESPACE = "http://jbpm.org/4.0/jpdl";
+
public static final WireParser wireParser = WireParser.getInstance();
// array elements are mutable, even when final
@@ -254,6 +256,12 @@
activityBinding.parseName(nestedElement, activity, parse);
parseTransitions(nestedElement, activity, parse);
+ Element descriptionElement = XmlUtil.element(documentElement, "description");
+ if (descriptionElement!=null) {
+ String description = XmlUtil.getContentText(descriptionElement);
+ activity.setDescription(description);
+ }
+
String continuationText = XmlUtil.attribute(nestedElement, "continue");
if (continuationText!=null) {
if ("async".equals(continuationText)) {
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlSchemaTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlSchemaTest.java 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlSchemaTest.java 2009-07-02 16:38:22 UTC (rev 5192)
@@ -24,6 +24,7 @@
import java.util.List;
import org.jbpm.api.Problem;
+import org.jbpm.jpdl.internal.xml.JpdlParser;
/**
@@ -34,7 +35,7 @@
public void testSimplestValidProcess() {
List<Problem> problems = jpdlParser.createParse()
.setString(
- "<jpdl:process xmlns:jpdl='http://jbpm.org/4.0/jpdl' " +
+ "<jpdl:process xmlns:jpdl='"+JpdlParser.JPDL_NAMESPACE+"' " +
" name='p' >" +
" <jpdl:start name='n' />" +
"</jpdl:process>"
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/test/xml/JpdlXmlTest.java 2009-07-02 16:38:22 UTC (rev 5192)
@@ -43,11 +43,6 @@
}
public void testInvalidXml() {
- if (true) {
- System.out.println("FIXME: unavailable schema resource: jpdl-4.0.xsd");
- return;
- }
-
List<Problem> problems = new JpdlParser()
.createParse()
.setResource("org/jbpm/test/xml/invalid.jpdl.xml")
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/email/impl/MailProducerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/email/impl/MailProducerImpl.java 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/email/impl/MailProducerImpl.java 2009-07-02 16:38:22 UTC (rev 5192)
@@ -52,7 +52,6 @@
import org.jbpm.pvm.internal.email.spi.MailProducer;
import org.jbpm.pvm.internal.env.Environment;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.script.ScriptManager;
/**
@@ -146,7 +145,7 @@
}
private String[] tokenizeActors(String recipients, Execution execution) {
- String[] actors = evaluateExpression(recipients, execution).split("[,|\\s]+");
+ String[] actors = evaluateExpression(recipients, execution).split("[,;|\\s]+");
if (actors.length == 0) throw new JbpmException("recipient list is empty: " + recipients);
return actors;
}
Added: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/process/DescriptionTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/process/DescriptionTest.java (rev 0)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/process/DescriptionTest.java 2009-07-02 16:38:22 UTC (rev 5192)
@@ -0,0 +1,67 @@
+/*
+ * 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.process;
+
+import org.jbpm.api.ProcessDefinition;
+import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.jbpm.test.JbpmTestCase;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class DescriptionTest extends JbpmTestCase {
+
+ public void testProcessDefinitionDescription() {
+ deployJpdlXmlString(
+ "<process name='make print' xmlns='"+JpdlParser.JPDL_NAMESPACE+"' >" +
+ " <description>This process makes a print</description>" +
+ " <start />" +
+ "</process>"
+ );
+
+ ProcessDefinition processDefinition = repositoryService
+ .createProcessDefinitionQuery()
+ .processDefinitionName("make print")
+ .uniqueResult();
+
+ assertEquals("This process makes a print", processDefinition.getDescription());
+ }
+
+// activity's are not yet available through the api
+//
+// public void testActivityDescription() {
+// deployJpdlXmlString(
+// "<process name='make print' xmlns='"+JpdlParser.JPDL_NAMESPACE+"' >" +
+// " <start>" +
+// " <description>This process is started when the user clicks a button</description>" +
+// " </start>" +
+// "</process>"
+// );
+//
+// ProcessDefinition processDefinition = repositoryService
+// .createProcessDefinitionQuery()
+// .processDefinitionName("make print")
+// .uniqueResult();
+//
+// }
+}
Property changes on: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/process/DescriptionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch06-Jpdl.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch06-Jpdl.xml 2009-07-02 13:46:33 UTC (rev 5191)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch06-Jpdl.xml 2009-07-02 16:38:22 UTC (rev 5192)
@@ -2256,15 +2256,6 @@
configuration file. If absent, the template must be specified
inline using the child elements.</entry>
</row>
- <row>
- <entry>template</entry>
- <entry>string</entry>
- <entry></entry>
- <entry>no</entry>
- <entry>Reference to a <literal>mail-template</literal> element in the
- configuration file. If absent, the template must be specified
- inline using the nested elements.</entry>
- </row>
</tbody>
</tgroup>
</table>
More information about the jbpm-commits
mailing list