[jbpm-commits] JBoss JBPM SVN: r5159 - in jbpm4/trunk/modules: devguide/src/main/docbook/en/modules and 2 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Jun 29 11:24:28 EDT 2009
Author: tom.baeyens at jboss.com
Date: 2009-06-29 11:24:27 -0400 (Mon, 29 Jun 2009)
New Revision: 5159
Added:
jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch13-JBossIntegration.xml
Removed:
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch10-JBossIntegration.xml
Modified:
jbpm4/trunk/modules/devguide/src/main/docbook/en/master.xml
jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch02-Installation.xml
jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch08-Scripting.xml
Log:
JBPM-2350 moving jboss integration (incl business archive deployer) to devguide. also added variables userguide docs.
Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/master.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/master.xml 2009-06-29 15:13:18 UTC (rev 5158)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/master.xml 2009-06-29 15:24:27 UTC (rev 5159)
@@ -13,6 +13,7 @@
<!ENTITY ch10-JobExecutor SYSTEM "modules/ch10-JobExecutor.xml">
<!ENTITY ch11-SoftwareLogging SYSTEM "modules/ch11-SoftwareLogging.xml">
<!ENTITY ch12-History SYSTEM "modules/ch12-History.xml">
+ <!ENTITY ch13-JBossIntegration SYSTEM "modules/ch13-JBossIntegration.xml">
]>
<book lang="en">
@@ -35,5 +36,6 @@
&ch10-JobExecutor;
&ch11-SoftwareLogging;
&ch12-History;
+ &ch13-JBossIntegration;
</book>
\ No newline at end of file
Copied: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch13-JBossIntegration.xml (from rev 5134, jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch10-JBossIntegration.xml)
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch13-JBossIntegration.xml (rev 0)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch13-JBossIntegration.xml 2009-06-29 15:24:27 UTC (rev 5159)
@@ -0,0 +1,140 @@
+<chapter id="identity">
+ <title>JBoss Integration</title>
+
+ <para>
+ jBPM provides integration with JBoss 4.2.x and JBoss 5.0.0.GA.
+ As part of the <link linkend="runningtheinstaller">installation</link>, the ProcessEngine and a deployer for jBPM archives
+ will be installed as a JBoss service.
+ </para>
+
+ <para>
+ After a successful installation you should see that the ProcessEngine
+ has been started and bound to JNDI:
+ </para>
+
+ <programlisting>
+ [...]
+ 14:12:09,301 INFO [JBPMService] jBPM 4 - Integration JBoss 4
+ 14:12:09,301 INFO [JBPMService] 4.0.0.Beta1
+ 14:12:09,301 INFO [JBPMService] ProcessEngine bound to: java:/ProcessEngine
+ </programlisting>
+
+ <section>
+ <title>Packaging process archives</title>
+ <para>
+ When jBPM is deployed on a JBoss instance, process deployments are treated like
+ any other deployment artifact (i.e. *.war, *.ear) and processed by the JBPMDeployer.
+ In order to deploy a process archive simply create a *.jpdl archive (zip file) that contains
+ the process definition (*.jpdl.xml) and all required resources to execute the process (i.e. classes, property files):
+ </para>
+ <programlisting>
+ Bonanova:Desktop hbraun$ jar -tf OrderProcess.jpdl
+
+ META-INF/MANIFEST.MF
+ OrderProcess.jpdl.xml
+ org/mycompany/order/*.class
+ </programlisting>
+ </section>
+
+ <section>
+ <title>Deploying processes archives to a JBoss instance</title>
+ <para>
+ In order to deploy a process archive simply copy it to $JBOSS_HOME/server/<config>/deploy:
+ </para>
+
+ <programlisting>
+ (1) cp OrderProcess.jpdl $JBOSS_HOME/server/default/deploy
+
+ (2) less $JBOSS_HOME/server/default/log
+ [...]
+ 2009-04-08 14:12:21,947 INFO [org.jbpm.integration.jboss4.JBPMDeployer]
+ Deploy file:/Users/hbraun/dev/prj/jboss/tags/JBoss_4_2_2_GA
+ /build/output/jboss-4.2.2.GA/server/default/deploy/OrderProcess.jpdl
+ </programlisting>
+
+ <para>
+ In order to remove a process simply remove the process archive from the deploy directory.
+ </para>
+ </section>
+
+ <section>
+ <title>Process deployments and versioning</title>
+ <para>
+ TBD: A prelimenary explanation cn be found <ulink url="http://relative-order.blogspot.com/2009/03/rfc-process-deployment-use-cases.html">here</ulink>
+ </para>
+ </section>
+
+ <section>
+ <title>ProcessEngine and J2EE/JEE programming models</title>
+ <para>
+ As described above the ProcessEngine will be installed as JBoss service and bound to JNDI.
+ This means that any EE component (i.e. servlet, ejb) can access it doing a JNDI lookup:
+ </para>
+
+ <programlisting>
+ private ProcessEngine processEngine;
+ [...]
+
+ try
+ {
+ InitialContext ctx = new InitialContext();
+ this.processEngine = (ProcessEngine)ctx.lookup("java:/ProcessEngine");
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to lookup process engine");
+ }
+ </programlisting>
+
+ <para>
+ Once you obtained an instance of the ProcessEngine you can invoke on it
+ as described in <link linkend="services">chapter services</link>
+ </para>
+
+ <programlisting>
+ UserTransaction tx = (UserTransaction)ctx.lookup("UserTransaction"); (1)
+ Environment env = ((EnvironmentFactory)processEngine).openEnvironment();
+
+ try
+ {
+
+ ExecutionService execService = (ExecutionService)
+ this.processEngine.get(ExecutionService.class);
+
+ // begin transaction
+ tx.begin();
+
+ // invoke on process engine
+ executionService.signalExecutionById("ICL.82436");
+
+ // commit transaction
+ tx.commit();
+
+ }
+ catch (Exception e)
+ {
+ if(tx!=null)
+ {
+ try
+ {
+ tx.rollback();
+ }
+ catch (SystemException e1) {}
+ }
+
+ throw new RuntimeException("...", e);
+
+ }
+ finally
+ {
+ env.close();
+ }
+ </programlisting>
+
+ <para>
+ (1) Wrapping the call in a UserTransaction is not necessary if the invocation comes a
+ CMT component, i.e. an EJB.
+ </para>
+ </section>
+
+</chapter>
Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml 2009-06-29 15:13:18 UTC (rev 5158)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml 2009-06-29 15:24:27 UTC (rev 5159)
@@ -10,7 +10,6 @@
<!ENTITY ch07-Variables SYSTEM "modules/ch07-Variables.xml">
<!ENTITY ch08-Scripting SYSTEM "modules/ch08-Scripting.xml">
<!ENTITY ch09-Identity SYSTEM "modules/ch09-Identity.xml">
- <!ENTITY ch10-JBossIntegration SYSTEM "modules/ch10-JBossIntegration.xml">
<!ENTITY ch11-Emails SYSTEM "modules/ch11-Emails.xml">
]>
@@ -31,7 +30,6 @@
&ch07-Variables;
&ch08-Scripting;
&ch09-Identity;
- &ch10-JBossIntegration;
&ch11-Emails;
</book>
\ No newline at end of file
Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch02-Installation.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch02-Installation.xml 2009-06-29 15:13:18 UTC (rev 5158)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch02-Installation.xml 2009-06-29 15:24:27 UTC (rev 5159)
@@ -137,6 +137,9 @@
installing jBPM into JBoss 5. Navigate to that directory and run <literal>ant -p</literal>
for more details.
</para>
+ <para>In JBoss, the <literal>ProcessEngine</literal> can be obtained from JNDI
+ with <literal>new InitialContext().lookup("java:/ProcessEngine")</literal>
+ </para>
</section>
<section id="database">
Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch08-Scripting.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch08-Scripting.xml 2009-06-29 15:13:18 UTC (rev 5158)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch08-Scripting.xml 2009-06-29 15:24:27 UTC (rev 5159)
@@ -1,18 +1,15 @@
<chapter id="scripting">
<title>Scripting</title>
- <para>Scripting in jBPM is based on JSR 223: Scripting for the JavaTM Platform.
- Scripting engines can be configured like this:
+ <para>Only jUEL is configured as the scripting language. jUEL is
+ an implementation of the Unified Expression Language. For detailed description
+ of how to use UEL, please refer to
+ <ulink url="http://java.sun.com/javaee/5/docs/tutorial/doc/bnahq.html">
+ the JEE 5 Tutorial, section Unified Expression Language</ulink>
</para>
- <programlisting><script-manager default-expression-language="juel"
- default-script-language="juel"
- read-contexts="execution, environment, process-engine"
- write-context="">
- <script-language name="juel" factory="com.sun.script.juel.JuelScriptEngineFactory" />
-</script-manager></programlisting>
- <para>A jPDL process definition can contain scripts and expressions. All
- of the configured scripting engines can be used in each situation. But
- scripts and expressions each have their own default.
+
+ <para>To configure other scripting languages then jUEL, please
+ refer to the developer's guide (non supported).
</para>
</chapter>
Deleted: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch10-JBossIntegration.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch10-JBossIntegration.xml 2009-06-29 15:13:18 UTC (rev 5158)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch10-JBossIntegration.xml 2009-06-29 15:24:27 UTC (rev 5159)
@@ -1,140 +0,0 @@
-<chapter id="identity">
- <title>JBoss Integration</title>
-
- <para>
- jBPM provides integration with JBoss 4.2.x and JBoss 5.0.0.GA.
- As part of the <link linkend="runningtheinstaller">installation</link>, the ProcessEngine and a deployer for jBPM archives
- will be installed as a JBoss service.
- </para>
-
- <para>
- After a successful installation you should see that the ProcessEngine
- has been started and bound to JNDI:
- </para>
-
- <programlisting>
- [...]
- 14:12:09,301 INFO [JBPMService] jBPM 4 - Integration JBoss 4
- 14:12:09,301 INFO [JBPMService] 4.0.0.Beta1
- 14:12:09,301 INFO [JBPMService] ProcessEngine bound to: java:/ProcessEngine
- </programlisting>
-
- <section>
- <title>Packaging process archives</title>
- <para>
- When jBPM is deployed on a JBoss instance, process deployments are treated like
- any other deployment artifact (i.e. *.war, *.ear) and processed by the JBPMDeployer.
- In order to deploy a process archive simply create a *.jpdl archive (zip file) that contains
- the process definition (*.jpdl.xml) and all required resources to execute the process (i.e. classes, property files):
- </para>
- <programlisting>
- Bonanova:Desktop hbraun$ jar -tf OrderProcess.jpdl
-
- META-INF/MANIFEST.MF
- OrderProcess.jpdl.xml
- org/mycompany/order/*.class
- </programlisting>
- </section>
-
- <section>
- <title>Deploying processes archives to a JBoss instance</title>
- <para>
- In order to deploy a process archive simply copy it to $JBOSS_HOME/server/<config>/deploy:
- </para>
-
- <programlisting>
- (1) cp OrderProcess.jpdl $JBOSS_HOME/server/default/deploy
-
- (2) less $JBOSS_HOME/server/default/log
- [...]
- 2009-04-08 14:12:21,947 INFO [org.jbpm.integration.jboss4.JBPMDeployer]
- Deploy file:/Users/hbraun/dev/prj/jboss/tags/JBoss_4_2_2_GA
- /build/output/jboss-4.2.2.GA/server/default/deploy/OrderProcess.jpdl
- </programlisting>
-
- <para>
- In order to remove a process simply remove the process archive from the deploy directory.
- </para>
- </section>
-
- <section>
- <title>Process deployments and versioning</title>
- <para>
- TBD: A prelimenary explanation cn be found <ulink url="http://relative-order.blogspot.com/2009/03/rfc-process-deployment-use-cases.html">here</ulink>
- </para>
- </section>
-
- <section>
- <title>ProcessEngine and J2EE/JEE programming models</title>
- <para>
- As described above the ProcessEngine will be installed as JBoss service and bound to JNDI.
- This means that any EE component (i.e. servlet, ejb) can access it doing a JNDI lookup:
- </para>
-
- <programlisting>
- private ProcessEngine processEngine;
- [...]
-
- try
- {
- InitialContext ctx = new InitialContext();
- this.processEngine = (ProcessEngine)ctx.lookup("java:/ProcessEngine");
- }
- catch (Exception e)
- {
- throw new RuntimeException("Failed to lookup process engine");
- }
- </programlisting>
-
- <para>
- Once you obtained an instance of the ProcessEngine you can invoke on it
- as described in <link linkend="services">chapter services</link>
- </para>
-
- <programlisting>
- UserTransaction tx = (UserTransaction)ctx.lookup("UserTransaction"); (1)
- Environment env = ((EnvironmentFactory)processEngine).openEnvironment();
-
- try
- {
-
- ExecutionService execService = (ExecutionService)
- this.processEngine.get(ExecutionService.class);
-
- // begin transaction
- tx.begin();
-
- // invoke on process engine
- executionService.signalExecutionById("ICL.82436");
-
- // commit transaction
- tx.commit();
-
- }
- catch (Exception e)
- {
- if(tx!=null)
- {
- try
- {
- tx.rollback();
- }
- catch (SystemException e1) {}
- }
-
- throw new RuntimeException("...", e);
-
- }
- finally
- {
- env.close();
- }
- </programlisting>
-
- <para>
- (1) Wrapping the call in a UserTransaction is not necessary if the invocation comes a
- CMT component, i.e. an EJB.
- </para>
- </section>
-
-</chapter>
More information about the jbpm-commits
mailing list