[jbpm-commits] JBoss JBPM SVN: r5967 - in jbpm4/trunk/modules: devguide/src/main/docbook/en/images and 7 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Dec 16 06:10:09 EST 2009
Author: jbarrez
Date: 2009-12-16 06:10:08 -0500 (Wed, 16 Dec 2009)
New Revision: 5967
Added:
jbpm4/trunk/modules/devguide/src/main/docbook/en/images/bpmn2.none.start.end.event.png
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/bpmn/event/
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/bpmn/event/nonestartend/
jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/bpmn/event/nonestartend/NoneStartEndEventTest.java
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/bpmn/event/
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/bpmn/event/nonestartend/
jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/bpmn/event/nonestartend/none_start_end_event.bpmn.xml
Modified:
jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Bpmn2.xml
Log:
JBPM-2668: BPMN 2.0 none start/end event
Modified: jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java
===================================================================
--- jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java 2009-12-16 03:38:49 UTC (rev 5966)
+++ jbpm4/trunk/modules/bpmn/src/main/java/org/jbpm/bpmn/flownodes/BpmnActivity.java 2009-12-16 11:10:08 UTC (rev 5967)
@@ -50,7 +50,7 @@
protected static final boolean CONDITIONS_CHECKED = true;
protected static final boolean CONDITIONS_IGNORED = !CONDITIONS_CHECKED;
- protected List<ActivityResource> activvityResources = new ArrayList<ActivityResource>();
+ protected List<ActivityResource> activityResources = new ArrayList<ActivityResource>();
/**
* In BPMN multiple outgoing sequence flows behave like a fork.
@@ -120,7 +120,7 @@
}
public void addActivityResource(ActivityResource activityResource) {
- this.activvityResources.add(activityResource);
+ this.activityResources.add(activityResource);
}
}
\ No newline at end of file
Added: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/bpmn2.none.start.end.event.png
===================================================================
(Binary files differ)
Property changes on: jbpm4/trunk/modules/devguide/src/main/docbook/en/images/bpmn2.none.start.end.event.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Bpmn2.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Bpmn2.xml 2009-12-16 03:38:49 UTC (rev 5966)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch03-Bpmn2.xml 2009-12-16 11:10:08 UTC (rev 5967)
@@ -53,12 +53,25 @@
The goal of this effort is to build a native BPMN2 runtime engine (or
better said implementing 'BPMN2 exectuable') leveraging the Process
Virtual Machine (PVM).
- </para>
- <para>
Do note that the primary focus of this release is native executability,
not the graphical notation - but we recognize its importance for
further releases.
</para>
+
+ <para>
+ <emphasis role="bold">
+ One of the goals of the BPMN2 implementation is to have an experience and usage which
+ is comparable to the that of JPDL. User who are already familiar with jBPM will find that
+ <itemizedlist>
+ <listitem>the configuration mechanism remains unchanged</listitem>
+ <listitem>the API is the same of very similar to the existing one</listitem>
+ <listitem>testing BPMN2 process still can be done with regular Java testing frameworks</listitem>
+ <listitem>the database schema remains unchanged</listitem>
+ </itemizedlist>
+ </emphasis>
+ So in general, our main goal is to keep everything that was good about jBPM, and enhance
+ it with a standards based process language.
+ </para>
</section>
@@ -135,7 +148,7 @@
<section id="Bpmn2Constructs" >
- <title>Bpmn 2.0 constructs</title>
+ <title>Bpmn 2.0 execution</title>
<para>
The BPMN2 specification defines a very rich language for modeling and
@@ -164,6 +177,122 @@
used in specific and/or rare cases, or their semantics are difficult to understand.</listitem>
</itemizedlist>
</para>
+
+ <section id="bpmn2Config">
+
+ <title>Configuration</title>
+
+ <para>
+ Enabling BPMN 2.0 in your application is extremely simple: just add the following line
+ to the <emphasis role="bold">jbpm.cfg.xml</emphasis> file.
+ <programlisting>
+<import resource="jbpm.bpmn.cfg.xml" />
+ </programlisting>
+ This import will enable BPMN 2.0 process deployment by installing a BPMN 2.0 deployer
+ in the Process Engine. Do note that a Process Engine can cope with both JPDL and BPMN 2.0
+ processes. This means that in your application, some processes can be JPDL and others
+ can be BPMN 2.0.
+ </para>
+
+ <para>
+ <emphasis role="bold">Process definitions are distinguished by the process engine
+ based on the extension of the definition file. For BPMN 2.0, use the *.bpmn.xml extension
+ (where JPDL is having the *.jpdl.xml extension).</emphasis>
+ </para>
+
+ </section>
+
+ <section id="basicConstructs">
+
+ <title>Basic constructs</title>
+
+ <section id="basicConstructsEvents">
+
+ <title>Events</title>
+
+ <para>
+ Together with activitites and gateways, events are used in practically every business process.
+ Events allow process modelers to describe business processes in a very natural way, such as
+ <emphasis role="italic">'This process starts when I receive a customer order'</emphasis>,
+ <emphasis role="italic">'If the task is not finished in 2 days, terminate the process'</emphasis>
+ or <emphasis role="italic">'When I receive a cancel e-mail when the process is running,
+ handle the e-mail using this sub-process'</emphasis>. Notice that typical businesses
+ always work in a very event-driven way. People are not hard-coded sequential creatures,
+ but they tend to react on things that happen in their environment (ie. events).
+ In the BPMN specification, a great number of event types are described, to cover the
+ range of possible things that might occur in context of a business.
+ </para>
+
+ <section id="noneStartEvent">
+
+ <title>None start event</title>
+
+ <para>
+ A start event indicates the start of process (or a subprocess). Graphically, it is visualized
+ as a circle with (possibly) a small icon inside. The icon specifies the actual type of event
+ that will trigger the process instance creation.
+ </para>
+
+ <para>
+ The 'none start event' is drawn as a circle without an icon inside, which means that the
+ trigger is unknown or unspecified. The start activity of JPDL basically has the same
+ semantics. Process instances whose process definition has a 'none start event' are
+ created using the typical API calls on the <emphasis role="bold">executionService</emphasis>.
+ </para>
+
+ </section>
+
+ <section id="noneEndEvent">
+
+ <title>None end event</title>
+
+ <para>
+ An end event indicates the end of an execution path in a process instance. Graphically,
+ it is visualized as a circle with a thick border with (possibly) a small icon inside.
+ The icon specifies the type of signal that is thrown when the end is reached.
+ </para>
+
+ <para>
+ The 'none end event' is drawn as a circle with thick border with no icon inside,
+ which means that no signal is thrown when the execution reaches the event.
+ The end activity in JPDL has the same semantics as the none end event.
+ </para>
+
+ <para>
+ The following example shows a process with only a none start and end event:
+ <mediaobject><imageobject><imagedata align="center" fileref="images/bpmn2.none.start.end.event.png"/></imageobject></mediaobject>
+ </para>
+
+ <para>
+ The corresponding executable XML for this process looks like this (omitting the
+ <emphasis role="italic">definitions</emphasis> root element for clarity)
+ <programlisting>
+ <process id="noneStartEndEvent" name="BPMN2 Example none start and end event">
+
+ <startEvent id="start" />
+
+ <sequenceFlow id="flow1" name="fromStartToEnd"
+ sourceRef="start" targetRef="end" />
+
+ <endEvent id="end" name="End" />
+
+ </process>
+ </programlisting>
+ </para>
+
+ <para>
+ A process instances can now be created by calling the
+ <emphasis role="bold">startProcessInstanceXXX</emphasis> operations.
+ <programlisting>
+ProcessInstance processInstance = executionService.startProcessInstanceByKey("noneStartEndEvent");
+ </programlisting>
+ </para>
+
+ </section>
+
+ </section>
+
+ </section>
</section>
Added: jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/bpmn/event/nonestartend/NoneStartEndEventTest.java
===================================================================
--- jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/bpmn/event/nonestartend/NoneStartEndEventTest.java (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/java/org/jbpm/examples/bpmn/event/nonestartend/NoneStartEndEventTest.java 2009-12-16 11:10:08 UTC (rev 5967)
@@ -0,0 +1,31 @@
+package org.jbpm.examples.bpmn.event.nonestartend;
+
+import org.jbpm.api.NewDeployment;
+import org.jbpm.api.ProcessInstance;
+import org.jbpm.api.history.HistoryProcessInstance;
+import org.jbpm.test.JbpmTestCase;
+
+/**
+ *
+ * @author Joram Barrez
+ */
+public class NoneStartEndEventTest extends JbpmTestCase {
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ NewDeployment deployment = repositoryService.createDeployment();
+ deployment.addResourceFromClasspath("org/jbpm/examples/bpmn/event/nonestartend/none_start_end_event.bpmn.xml");
+ registerDeployment(deployment.deploy());
+ }
+
+ public void testProcessStartToEnd() {
+
+ ProcessInstance processInstance = executionService.startProcessInstanceByKey("noneStartEndEvent");
+ assertProcessInstanceEnded(processInstance);
+
+ HistoryProcessInstance hip = historyService.createHistoryProcessInstanceQuery().uniqueResult();
+ assertNotNull(hip);
+ }
+
+}
Added: jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/bpmn/event/nonestartend/none_start_end_event.bpmn.xml
===================================================================
--- jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/bpmn/event/nonestartend/none_start_end_event.bpmn.xml (rev 0)
+++ jbpm4/trunk/modules/examples/src/test/resources/org/jbpm/examples/bpmn/event/nonestartend/none_start_end_event.bpmn.xml 2009-12-16 11:10:08 UTC (rev 5967)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://schema.omg.org/spec/BPMN/2.0 ../../../../../../../../../../bpmn/src/main/resources/BPMN20.xsd"
+ xmlns="http://schema.omg.org/spec/BPMN/2.0"
+ typeLanguage="http://www.w3.org/2001/XMLSchema"
+ expressionLanguage="http://www.w3.org/1999/XPath"
+ targetNamespace="http://jbpm.org/example/bpmn2/none_start_end_event"
+ xmlns:jbpm="http://jbpm.org/bpmn2">
+
+ <process id="noneStartEndEvent" name="BPMN2 Example none start and end event">
+
+ <startEvent id="start" />
+
+ <sequenceFlow id="flow1" name="fromStartToEnd"
+ sourceRef="start" targetRef="end" />
+
+ <endEvent id="end" name="End" />
+
+ </process>
+
+</definitions>
More information about the jbpm-commits
mailing list