[jbpm-commits] JBoss JBPM SVN: r5264 - in jbpm4/branches/jbpm-4.0/modules: devguide/src/main/docbook/en/modules and 6 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Jul 9 04:22:14 EDT 2009


Author: tom.baeyens at jboss.com
Date: 2009-07-09 04:22:13 -0400 (Thu, 09 Jul 2009)
New Revision: 5264

Modified:
   jbpm4/branches/jbpm-4.0/modules/api/src/main/java/org/jbpm/api/ProcessEngine.java
   jbpm4/branches/jbpm-4.0/modules/api/src/main/java/org/jbpm/api/TaskService.java
   jbpm4/branches/jbpm-4.0/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
   jbpm4/branches/jbpm-4.0/modules/devguide/src/main/docbook/en/modules/ch03-MigrationFromJbpm3.xml
   jbpm4/branches/jbpm-4.0/modules/examples/src/test/java/org/jbpm/examples/subprocess/outcomevalue/SubProcessOutcomeValueTest.java
   jbpm4/branches/jbpm-4.0/modules/examples/src/test/java/org/jbpm/examples/subprocess/variables/SubProcessVariablesTest.java
   jbpm4/branches/jbpm-4.0/modules/pvm/src/main/java/org/jbpm/pvm/internal/cfg/JbpmConfiguration.java
   jbpm4/branches/jbpm-4.0/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java
   jbpm4/branches/jbpm-4.0/modules/test-db/src/test/java/org/jbpm/test/task/TaskVariablesTest.java
   jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml
   jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch02-Installation.xml
   jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch04-DeployingBusinessArchives.xml
   jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch06-Jpdl.xml
Log:
JBPM-2396 removed TaskService.setVariable and ProcessEngine.setSessionFactory plus other docs updates

Modified: jbpm4/branches/jbpm-4.0/modules/api/src/main/java/org/jbpm/api/ProcessEngine.java
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/api/src/main/java/org/jbpm/api/ProcessEngine.java	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/api/src/main/java/org/jbpm/api/ProcessEngine.java	2009-07-09 08:22:13 UTC (rev 5264)
@@ -62,7 +62,4 @@
 
   /** retrieve and object defined in the process engine by name */
   Object get(String name);
-  
-  /** programmatically provide a hibernate session factory */
-  void setSessionFactory(Object sessionFactory);
 }

Modified: jbpm4/branches/jbpm-4.0/modules/api/src/main/java/org/jbpm/api/TaskService.java
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/api/src/main/java/org/jbpm/api/TaskService.java	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/api/src/main/java/org/jbpm/api/TaskService.java	2009-07-09 08:22:13 UTC (rev 5264)
@@ -159,9 +159,6 @@
    * this will recursively delete all replies to this comment. */
   void deleteComment(String commentId);
 
-  /** creates or overwrites a variable value on the given task */
-  void setVariable(String taskId, String name, Object value);
-
   /** creates or overwrites the variable values on the given task */
   void setVariables(String taskId, Map<String, Object> variables);
 

Modified: jbpm4/branches/jbpm-4.0/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/devguide/src/main/docbook/en/modules/ch02-Incubation.xml	2009-07-09 08:22:13 UTC (rev 5264)
@@ -85,6 +85,9 @@
 
     <section id="businesscalendar">
       <title>Business calendar</title>
+      <para>Known limitation.  The business calendar is not yet configurable.
+      See also <ulink url="https://jira.jboss.org/jira/browse/JBPM-2334">JBPM-2334</ulink>
+      </para>
       <para>The default configuration will contain a reference to the file
         <literal>jbpm.business.calendar.xml</literal>.  That contains a 
         configuration of business hours in the following format: 

Modified: jbpm4/branches/jbpm-4.0/modules/devguide/src/main/docbook/en/modules/ch03-MigrationFromJbpm3.xml
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/devguide/src/main/docbook/en/modules/ch03-MigrationFromJbpm3.xml	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/devguide/src/main/docbook/en/modules/ch03-MigrationFromJbpm3.xml	2009-07-09 08:22:13 UTC (rev 5264)
@@ -26,11 +26,15 @@
     <title>Known limitations</title>
     <para>As part of creating a clear separation between basic and advanced usage, the API 
     has been completely revisited.  Basic usage is covered with the public API.  The same API 
-    is available in all the supported environments.
+    is available in all the supported environments.  Package names in jBPM 4 are strictly 
+    separated from package names in jBPM 3.
     </para>
     <para>Instead of providing a full DB migration, we opted for a strategy to 
     allow for jBPM 3 and jBPM 4 instances to run concurrently next to each 
-    other.  One of the main reasons is that any QA for a data migration of the
+    other. The table prefix is changed from <literal>JBPM_</literal> to <literal>JBPM4_</literal>.  
+    There is no migration tool to convert jBPM 3 runtime database contents 
+    to jBPM 4.  We're not sure if we'll be able to build such a tool in one of the
+    next version.  One of the main reasons is that any QA for a data migration of the
     DB contents would be impossible for the project team to achieve.  
     </para>
     <para>Furthermore, there are some features that are not yet available 
@@ -45,8 +49,8 @@
       <listitem>Identity expression to calculate the assignee of a task</listitem>
       <listitem>Task form variable-to-parameter conversions</listitem>
     </itemizedlist>
-  </section>  
-
+  </section>
+  
   <section id="processconversiontool">
     <title>Process conversion tool</title>  
     <para>In many cases, a lot of work has been put in the design of JPDL3 process
@@ -158,7 +162,10 @@
            <entry>Execution</entry>
            <entry>The root execution is now the same object as the 
            process instance.  (In jBPM 3, the ProcessInstance had 
-           a pointer to the root token)
+           a pointer to the root token).  Also, unlike in jBPM 3, executions in jBPM 4 might 
+           get inactivated, create a child execution and let the child execution continue, even 
+           when logically this represents only one single path of execution.  This happens in 
+           scope activities (or composite activities) that have timers or variables declared.
            </entry>
          </row>
          <row>

Modified: jbpm4/branches/jbpm-4.0/modules/examples/src/test/java/org/jbpm/examples/subprocess/outcomevalue/SubProcessOutcomeValueTest.java
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/examples/src/test/java/org/jbpm/examples/subprocess/outcomevalue/SubProcessOutcomeValueTest.java	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/examples/src/test/java/org/jbpm/examples/subprocess/outcomevalue/SubProcessOutcomeValueTest.java	2009-07-09 08:22:13 UTC (rev 5264)
@@ -21,8 +21,11 @@
  */
 package org.jbpm.examples.subprocess.outcomevalue;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
+import org.apache.commons.collections.map.HashedMap;
 import org.jbpm.api.ProcessInstance;
 import org.jbpm.api.task.Task;
 import org.jbpm.test.JbpmTestCase;
@@ -65,7 +68,9 @@
     Task task = taskList.get(0);
     
     // the result variable is set in the task
-    taskService.setVariable(task.getId(), "result", "ok");
+    Map<String, Object> variables = new HashMap<String, Object>();
+    variables.put("result", "ok");
+    taskService.setVariables(task.getId(), variables);
     
     // the task in the sub process instance is completed 
     taskService.completeTask(task.getId());
@@ -85,7 +90,9 @@
     Task task = taskList.get(0);
     
     // the result variable is set in the task
-    taskService.setVariable(task.getId(), "result", "nok");
+    Map<String, Object> variables = new HashMap<String, Object>();
+    variables.put("result", "nok");
+    taskService.setVariables(task.getId(), variables);
     
     // the task in the sub process instance is completed 
     taskService.completeTask(task.getId());
@@ -105,7 +112,9 @@
     Task task = taskList.get(0);
     
     // the result variable is set in the task
-    taskService.setVariable(task.getId(), "result", "reject");
+    Map<String, Object> variables = new HashMap<String, Object>();
+    variables.put("result", "reject");
+    taskService.setVariables(task.getId(), variables);
     
     // the task in the sub process instance is completed 
     taskService.completeTask(task.getId());

Modified: jbpm4/branches/jbpm-4.0/modules/examples/src/test/java/org/jbpm/examples/subprocess/variables/SubProcessVariablesTest.java
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/examples/src/test/java/org/jbpm/examples/subprocess/variables/SubProcessVariablesTest.java	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/examples/src/test/java/org/jbpm/examples/subprocess/variables/SubProcessVariablesTest.java	2009-07-09 08:22:13 UTC (rev 5264)
@@ -75,7 +75,9 @@
     assertEquals("This document describes how we can make more money...", document);
     
     // the result variable is set in the task
-    taskService.setVariable(task.getId(), "result", "accept");
+    variables = new HashMap<String, Object>();
+    variables.put("result", "accept");
+    taskService.setVariables(task.getId(), variables);
     
     // the task in the sub process instance is completed 
     taskService.completeTask(task.getId());

Modified: jbpm4/branches/jbpm-4.0/modules/pvm/src/main/java/org/jbpm/pvm/internal/cfg/JbpmConfiguration.java
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/pvm/src/main/java/org/jbpm/pvm/internal/cfg/JbpmConfiguration.java	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/pvm/src/main/java/org/jbpm/pvm/internal/cfg/JbpmConfiguration.java	2009-07-09 08:22:13 UTC (rev 5264)
@@ -125,7 +125,7 @@
   public void setSessionFactory(Object sessionFactory) {
     processEngineWireContext
         .getWireDefinition()
-        .addDescriptor(new ProvidedObjectDescriptor(sessionFactory));
+        .addDescriptor(new ProvidedObjectDescriptor(sessionFactory, true));
   }
 
   public Configuration setInputStream(InputStream inputStream) {

Modified: jbpm4/branches/jbpm-4.0/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/TaskServiceImpl.java	2009-07-09 08:22:13 UTC (rev 5264)
@@ -180,12 +180,6 @@
     return commandService.execute(new GetTaskVariablesCmd(taskDbid, variableNames));
   }
 
-  public void setVariable(String taskDbid, String name, Object value) {
-    SetTaskVariablesCmd cmd = new SetTaskVariablesCmd(taskDbid);
-    cmd.addVariable(name, value);
-    commandService.execute(cmd);
-  }
-
   public void setVariables(String taskDbid, Map<String, Object> variables) {
     SetTaskVariablesCmd cmd = new SetTaskVariablesCmd(taskDbid);
     cmd.setVariables(variables);

Modified: jbpm4/branches/jbpm-4.0/modules/test-db/src/test/java/org/jbpm/test/task/TaskVariablesTest.java
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/test-db/src/test/java/org/jbpm/test/task/TaskVariablesTest.java	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/test-db/src/test/java/org/jbpm/test/task/TaskVariablesTest.java	2009-07-09 08:22:13 UTC (rev 5264)
@@ -21,6 +21,9 @@
  */
 package org.jbpm.test.task;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.jbpm.api.task.Task;
 import org.jbpm.test.JbpmTestCase;
 
@@ -35,8 +38,11 @@
     task.setName("clean da house");
     String taskId = taskService.saveTask(task);
     
-    taskService.setVariable(taskId, "text", "hello");
-    taskService.setVariable(taskId, "number", new Integer(5));
+    Map<String, Object> variables = new HashMap<String, Object>();
+    variables.put("text", "hello");
+    variables.put("number", new Integer(5));
+
+    taskService.setVariables(taskId, variables);
     
     assertEquals("hello", taskService.getVariable(taskId, "text"));
     assertEquals(new Integer(5), taskService.getVariable(taskId, "number"));

Modified: jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml	2009-07-09 08:22:13 UTC (rev 5264)
@@ -51,27 +51,9 @@
 
   <section>
     <title>Migration from jBPM 3</title>
-    <para>Migration from jBPM 3 to jBPM 4 is not supported.  
+    <para>Migration from jBPM 3 to jBPM 4 is not supported. Check out the developers 
+    guide for more information about migration.
     </para>
-    <para>jBPM 3 and jBPM 4 can be deployed on the same JVM and
-    on the same database.  Packages are stricktly separated and database 
-    table prefix is changed from <literal>JBPM_</literal> to <literal>JBPM4_</literal> 
-    </para>
-    <itemizedlist>
-      <listitem><emphasis role="bold">jPDL process files</emphasis>: A process file 
-      conversion tool is in the works.  It will be shipped with the distribution 
-      in one of the following releases.
-      </listitem>
-      <listitem><emphasis role="bold">API</emphasis>: The jBPM API has completely 
-      changed.  Where jBPM 3 exposed the internal object model and didn't have 
-      a session facade API, the supported API of jBPM 4 are the services, which are 
-      in fact session facades that can be used in any environment that we support.
-      </listitem>
-      <listitem><emphasis role="bold">Database</emphasis>: The jBPM database also 
-      has drastically changed between version 3 and 4.  There is no migration tool 
-      to convert jBPM 3 runtime database contents to jBPM 4. 
-      </listitem>
-    </itemizedlist>
   </section>
 
 </chapter>

Modified: jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch02-Installation.xml
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch02-Installation.xml	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch02-Installation.xml	2009-07-09 08:22:13 UTC (rev 5264)
@@ -165,8 +165,7 @@
 
   <section id="tomcat">
     <title>Tomcat</title>
-    <para>TODO: this will contain a description of how to use the 
-    installer to install jbpm on tomcat</para>
+    <para>ETA for Tomcat is 4.1: <ulink url="https://jira.jboss.org/jira/browse/JBPM-2397">See JBPM-2397</ulink></para>
   </section>
 
   <section id="configurationfiles">

Modified: jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch04-DeployingBusinessArchives.xml
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch04-DeployingBusinessArchives.xml	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch04-DeployingBusinessArchives.xml	2009-07-09 08:22:13 UTC (rev 5264)
@@ -144,6 +144,12 @@
     <para>In case of the examples, an examples.jar file is created with 
     all the classes and it is put in the <literal>lib</literal> directory of the JBoss 
     server configuration.</para>
+    <para>If you want process classloading so that user defined classes can be deployed 
+    in and loaded from the business archive, vote for it in 
+    <ulink url="https://jira.jboss.org/jira/browse/JBPM-2200">JIRA issue JBPM-2200</ulink>.
+    We'll prioritize this depending on the number of votes and on the use cases that 
+    you can add as a comment in which you explain why you need it.
+    </para>
   </section>
 
 </chapter>

Modified: jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch06-Jpdl.xml
===================================================================
--- jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch06-Jpdl.xml	2009-07-09 04:31:00 UTC (rev 5263)
+++ jbpm4/branches/jbpm-4.0/modules/userguide/src/main/docbook/en/modules/ch06-Jpdl.xml	2009-07-09 08:22:13 UTC (rev 5264)
@@ -1579,7 +1579,9 @@
         <para>Then we set a variable on the task.  This is typically done through a form.  But 
         here we'll show how it is done programmatically.
         </para>
-        <programlisting>taskService.setVariable(task.getDbid(), &quot;result&quot;, &quot;accept&quot;);</programlisting>
+        <programlisting>Map&lt;String, Object&gt; variables = new HashMap&lt;String, Object&gt;();
+variables.put(&quot;result&quot;, &quot;accept&quot;);
+taskService.setVariables(task.getDbid(), variables);</programlisting>
         <para>Completing this task, will cause the sub process instance to end.
         </para>
         <programlisting>taskService.completeTask(task.getDbid());</programlisting>
@@ -1654,9 +1656,10 @@
         <para>Then the <literal>result</literal> variable is set and 
         the task is completed.
         </para>
-        <programlisting>taskService.setVariable(task.getDbid(), &quot;result&quot;, &quot;ok&quot;);
-taskService.completeTask(task.getDbid());
-        </programlisting>
+        <programlisting>Map&lt;String, Object&gt; variables = new HashMap&lt;String, Object&gt;();
+variables.put(quot;resultquot;, quot;okquot;);
+taskService.setVariables(task.getId(), variables);
+taskService.completeTask(task.getDbid());</programlisting>
         <para>In this scenario, the <literal>ok</literal> transition is taken in 
         the parent process out of the sub-process review activity.  The example 
         test case also shows other scenarios. 




More information about the jbpm-commits mailing list