[jbpm-commits] JBoss JBPM SVN: r5959 - jbpm4/trunk/modules/devguide/src/main/docbook/en/modules.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Dec 15 05:55:41 EST 2009


Author: jbarrez
Date: 2009-12-15 05:55:41 -0500 (Tue, 15 Dec 2009)
New Revision: 5959

Modified:
   jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
Log:
Added doc for history-session-chain

Modified: jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
===================================================================
--- jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml	2009-12-15 09:41:08 UTC (rev 5958)
+++ jbpm4/trunk/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml	2009-12-15 10:55:41 UTC (rev 5959)
@@ -622,7 +622,7 @@
   <section id="rulesdeployer">
     <title>Rules deployer</title>
     <para>The rules deployer is a convenience integration between jBPM and 
-    <ulink url="http://drools.org">Drools</ulink>.  It creates a KownledgeBase based 
+    <ulink url="http://drools.org">Drools</ulink>.  It creates a KnowledgeBase based 
     on all .drl files that are included in a business archive deployment.
     That KnowledgeBase is then stored in the repository cache.  So one 
     KnowledgeBase is maintained in memory the process-engine-context.  Activities 
@@ -852,6 +852,42 @@
   </section>
   
   <section>
+  	<title>History session chain</title>
+  	<para>
+  	  The <emphasis role="bold">history session</emphasis>, which can be added to the 
+  	  <emphasis role="italic">transaction-context</emphasis> in the jBPM configuration will
+  	  add a default history event listener to the process engine. This default history session
+  	  will write the information in the history events to the history tables in the database.
+    </para>
+    <para>
+  	  The <emphasis role="bold">history session chain</emphasis> construct allows to define custom
+  	  history event listeners. These custom history sessions will be called when a history event
+  	  is fired. Multiple custom implementations are possible as follows:
+  	  <programlisting>
+&lt;transaction-context&gt;
+    &lt;history-session-chain&gt;
+      &lt;object class=&quot;org.jbpm.test.historysessionchain.MyProcessStartListener&quot; /&gt;
+      &lt;object class=&quot;org.jbpm.test.historysessionchain.MyProcessEndListener&quot; /&gt;
+    &lt;/history-session-chain&gt;
+  &lt;/transaction-context&gt;  	  
+  	  </programlisting>
+  	  The custom history sessions must be on the classpath when the jBPM configuration is parsed
+  	  and they must implement the <emphasis role="bold">HistorySession</emphasis> interface.
+  	  <programlisting>
+public class MyProcessStartListener implements HistorySession {
+  
+  public void process(HistoryEvent historyEvent) {
+    if (historyEvent instanceof ProcessInstanceCreate) {
+      ...
+    }
+  }
+
+}  	  
+  	  </programlisting>
+  	</para>
+  </section>
+  
+  <section>
     <title>Creating identity groups</title>
     <para>The identity service methods to create groups are based on 
     component generated ID's.



More information about the jbpm-commits mailing list