[jbpm-commits] JBoss JBPM SVN: r3200 - in jbpm4/trunk/modules: pvm/src/main/java/org/jbpm/pvm/internal/cmd and 8 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Dec 4 06:41:48 EST 2008


Author: tom.baeyens at jboss.com
Date: 2008-12-04 06:41:47 -0500 (Thu, 04 Dec 2008)
New Revision: 3200

Added:
   jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Gpd.xml
Modified:
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ExecutionServiceImpl.java
   jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
   jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example02/PersistentExecutionModeTest.java
   jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/StateTest.java
   jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/svc/ExecutionServiceTest.java
   jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml
   jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml
   jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch02-Installation.xml
   jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Services.xml
   jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml
Log:
started organising execution service tests

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/ExecutionService.java	2008-12-04 11:41:47 UTC (rev 3200)
@@ -21,7 +21,6 @@
  */
 package org.jbpm;
 
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -88,29 +87,29 @@
 
   
   /** provides an external trigger to an execution. */
-  Execution signalExecution(String executionId);
+  Execution signalExecutionById(String executionId);
   
   /** provides a named external trigger to an execution. */
-  Execution signalExecution(String executionId, String signalName);
+  Execution signalExecutionById(String executionId, String signalName);
    
   /** provides a named external trigger to an execution with parameters. */
-  Execution signalExecution(String executionId, String signalName, Map<String, Object> parameters);
+  Execution signalExecutionById(String executionId, String signalName, Map<String, Object> parameters);
 
   /** provides a external trigger to an execution with parameters. */
-  Execution signalExecution(String executionId, Map<String, Object> parameters);
+  Execution signalExecutionById(String executionId, Map<String, Object> parameters);
   
   
   /** provides a named external trigger to an execution. */
-  Execution signalExecutionByKey(String processDefinitionName, String executionKey);
+  Execution signalExecutionByKey(String processDefinitionKey, String executionKey);
   
   /** provides a named external trigger to an execution. */
-  Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName);
+  Execution signalExecutionByKey(String processDefinitionKey, String executionKey, String signalName);
   
   /** provides a named external trigger to an execution with parameters. */
-  Execution signalExecutionByKey(String processDefinitionName, String executionKey, Map<String, Object> parameters);
+  Execution signalExecutionByKey(String processDefinitionKey, String executionKey, Map<String, Object> parameters);
 
   /** provides a named external trigger to an execution with parameters. */
-  Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName, Map<String, Object> parameters);
+  Execution signalExecutionByKey(String processDefinitionKey, String executionKey, String signalName, Map<String, Object> parameters);
 
   /** search for executions with criteria */
   ExecutionQuery createExecutionQuery();
@@ -130,6 +129,6 @@
   /** retrieves a map of variables */ 
   Map<String, Object> getVariables(String executionId, Set<String> variableNames);
 
-  /* delete a process instance */
+  /** delete a process instance */
   void deleteProcessInstance(String processInstanceId);
 }

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java	2008-12-04 11:41:47 UTC (rev 3200)
@@ -28,7 +28,6 @@
 import org.jbpm.client.ClientExecution;
 import org.jbpm.cmd.Command;
 import org.jbpm.env.Environment;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
 import org.jbpm.session.PvmDbSession;
 
 /**
@@ -38,60 +37,26 @@
   
   private static final long serialVersionUID = 1L;
 
-  protected Long executionDbid;
   protected String executionId;
-  protected String processDefinitionName;
-  protected String executionKey;
   protected String signalName;
   protected Map<String, Object> parameters;
 
-  // TODO REMOVE
-  public SignalCmd(long executionDbid, String signalName, Map<String, Object> parameters) {
-    this.executionDbid = executionDbid;
-    this.signalName = signalName;
-    this.parameters = parameters;
-  }
-
-  // TODO REMOVE
-  public SignalCmd(String processDefinitionName, String executionKey, String signalName, Map<String, Object> parameters) {
-    if (processDefinitionName==null) {
-      throw new JbpmException("processDefinitionName is null");
+  public SignalCmd(String executionId, String signalName, Map<String, Object> parameters) {
+    if (executionId==null) {
+      throw new JbpmException("executionId is null");
     }
-    if (executionKey==null) {
-      throw new JbpmException("executionKey is null");
-    }
-    this.executionKey = executionKey;
+    this.executionId = executionId;
     this.signalName = signalName;
     this.parameters = parameters;
   }
 
-  public SignalCmd(String executionKey, String signalName, Map<String, Object> parameters) {
-    if (executionKey==null) {
-      throw new JbpmException("executionKey is null");
-    }
-    this.executionKey = executionKey;
-    this.signalName = signalName;
-    this.parameters = parameters;
-  }
-
-  public SignalCmd(String executionId) {
-    // TODO Auto-generated constructor stub
-  }
-
   public Execution execute(Environment environment) throws Exception {
     ClientExecution execution = null;
     
     PvmDbSession pvmDbSession = environment.get(PvmDbSession.class);
-    if (executionDbid!=null) {
-      execution = pvmDbSession.get(ExecutionImpl.class, executionDbid);
-      if (execution==null) {
-        throw new JbpmException("execution "+executionDbid+" does not exist");
-      }
-    } else {
-      execution = pvmDbSession.findExecutionById(executionKey);
-      if (execution==null) {
-        throw new JbpmException("execution "+executionKey+" does not exist");
-      }
+    execution = pvmDbSession.findExecutionById(executionId);
+    if (execution==null) {
+      throw new JbpmException("execution "+executionId+" does not exist");
     }
     
     execution.signal(signalName, parameters);

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ExecutionServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ExecutionServiceImpl.java	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/ExecutionServiceImpl.java	2008-12-04 11:41:47 UTC (rev 3200)
@@ -62,6 +62,7 @@
     return commandService.execute(new StartExecutionCmd(processDefinitionId, variables, executionKey));
   }
 
+
   
   public Execution startExecutionByKey(String processDefinitionKey) {
     return commandService.execute(new StartExecutionInLatestCmd(processDefinitionKey, null, null));
@@ -80,55 +81,42 @@
   }
 
   
-  public Execution signalExecution(String executionId) {
+  
+  public Execution signalExecutionById(String executionId) {
     return commandService.execute(new SignalCmd(executionId, null, null));
   }
 
-  public Execution signalExecution(String executionId, String signalName) {
+  public Execution signalExecutionById(String executionId, String signalName) {
     return commandService.execute(new SignalCmd(executionId, signalName, null));
   }
 
-  public Execution signalExecution(String executionId, String signalName, Map<String, Object> parameters) {
+  public Execution signalExecutionById(String executionId, String signalName, Map<String, Object> parameters) {
     return commandService.execute(new SignalCmd(executionId, signalName, parameters));
   }
 
-  public Execution signalExecution(String executionId, Map<String, Object> parameters) {
+  public Execution signalExecutionById(String executionId, Map<String, Object> parameters) {
     return commandService.execute(new SignalCmd(executionId, null, parameters));
   }
 
-  
-  public Execution signalExecution(long executionDbid) {
-    return commandService.execute(new SignalCmd(executionDbid, null, null));
-  }
 
-  public Execution signalExecution(long executionDbid, String signalName) {
-    return commandService.execute(new SignalCmd(executionDbid, signalName, null));
+  public Execution signalExecutionByKey(String processDefinitionKey, String executionKey) {
+    return signalExecutionById(processDefinitionKey+"/"+executionKey, null, null);
   }
 
-  public Execution signalExecution(long executionDbid, String signalName, Map<String, Object> parameters) {
-    return commandService.execute(new SignalCmd(executionDbid, signalName, parameters));
+  public Execution signalExecutionByKey(String processDefinitionKey, String executionKey, String signalName) {
+    return signalExecutionById(processDefinitionKey+"/"+executionKey, signalName, null);
   }
 
-  public Execution signalExecution(long executionDbid, Map<String, Object> parameters) {
-    return commandService.execute(new SignalCmd(executionDbid, null, parameters));
+  public Execution signalExecutionByKey(String processDefinitionKey, String executionKey, String signalName, Map<String, Object> parameters) {
+    return signalExecutionById(processDefinitionKey+"/"+executionKey, signalName, parameters);
   }
 
-  public Execution signalExecutionByKey(String processDefinitionName, String executionKey) {
-    return commandService.execute(new SignalCmd(processDefinitionName, executionKey, null, null));
+  public Execution signalExecutionByKey(String processDefinitionKey, String executionKey, Map<String, Object> parameters) {
+    return signalExecutionById(processDefinitionKey+"/"+executionKey, null, parameters);
   }
 
-  public Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName) {
-    return commandService.execute(new SignalCmd(processDefinitionName, executionKey, signalName, null));
-  }
 
-  public Execution signalExecutionByKey(String processDefinitionName, String executionKey, String signalName, Map<String, Object> parameters) {
-    return commandService.execute(new SignalCmd(processDefinitionName, executionKey, signalName, parameters));
-  }
-
-  public Execution signalExecutionByKey(String processDefinitionName, String executionKey, Map<String, Object> parameters) {
-    return commandService.execute(new SignalCmd(processDefinitionName, executionKey, null, parameters));
-  }
-
+ 
   public Execution findExecution(String processDefinitionName, String key) {
     return commandService.execute(new FindExecutionCmd(processDefinitionName, key));
   }

Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java	2008-12-04 11:41:47 UTC (rev 3200)
@@ -96,7 +96,7 @@
     Execution execution = processInstance;
     assertEquals("request", execution.getNodeName());
     // first node is a wait state with no timer
-    execution = getExecutionService().signalExecution(execution.getId());
+    execution = getExecutionService().signalExecutionById(execution.getId());
     assertEquals("decide", execution.getNodeName());
 
     assertTrue(execution instanceof OpenExecution);
@@ -177,7 +177,7 @@
 
     // signal child execution
     Execution child = ((OpenExecution)execution).getExecutions().iterator().next();
-    execution = getExecutionService().signalExecution(child.getId());
+    execution = getExecutionService().signalExecutionById(child.getId());
     assertEquals(Execution.STATE_ENDED, execution.getState());
 
     // check that the subExecution was deleted

Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example02/PersistentExecutionModeTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example02/PersistentExecutionModeTest.java	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/example02/PersistentExecutionModeTest.java	2008-12-04 11:41:47 UTC (rev 3200)
@@ -67,6 +67,6 @@
     
     assertEquals("loan:1/request7836", execution.getId());
     
-    executionService.signalExecution("loan:1/request7836", "approve");
+    executionService.signalExecutionById("loan:1/request7836", "approve");
   }
 }

Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/samples/ex02/BasicProcessPersistenceTest.java	2008-12-04 11:41:47 UTC (rev 3200)
@@ -64,11 +64,11 @@
 
     assertEquals("a", execution.getNodeName());
 
-    execution = executionService.signalExecution("basic:1/one");
+    execution = executionService.signalExecutionById("basic:1/one");
 
     assertEquals("b", execution.getNodeName());
 
-    execution = executionService.signalExecution("basic:1/one");
+    execution = executionService.signalExecutionById("basic:1/one");
 
     assertEquals("e", execution.getNodeName());
   }

Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/StateTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/StateTest.java	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/StateTest.java	2008-12-04 11:41:47 UTC (rev 3200)
@@ -50,10 +50,10 @@
     assertEquals("b", execution.getNodeName());
 
     String executionId = execution.getId();
-    execution = executionService.signalExecution(executionId);
+    execution = executionService.signalExecutionById(executionId);
     assertEquals("c", execution.getNodeName());
 
-    execution = executionService.signalExecution(executionId);
+    execution = executionService.signalExecutionById(executionId);
     assertEquals("d", execution.getNodeName());
     assertTrue(execution.isEnded());
   }
@@ -77,15 +77,15 @@
 
     Execution execution = executionService.startExecutionByKey("p", "one");
     assertEquals("ed", execution.getNodeName());
-    execution = executionService.signalExecution("p/one", "left");
+    execution = executionService.signalExecutionById("p/one", "left");
     assertEquals("b", execution.getNodeName());
 
     executionService.startExecutionById("p:1", "two");
-    execution = executionService.signalExecution("p/two", "middle");
+    execution = executionService.signalExecutionById("p/two", "middle");
     assertEquals("c", execution.getNodeName());
 
     executionService.startExecutionById("p:1", "three");
-    execution = executionService.signalExecution("p/three", "right");
+    execution = executionService.signalExecutionById("p/three", "right");
     assertEquals("d", execution.getNodeName());
   }
 
@@ -108,7 +108,7 @@
 
     executionService.startExecutionByKey("p", "one");
     try {
-      executionService.signalExecution("p/one", "left");
+      executionService.signalExecutionById("p/one", "left");
     } catch (JbpmException e) {
       assertTextPresent("no matching transition or event for default signal in state(a)", e.getMessage());
     }
@@ -132,7 +132,7 @@
     );
 
     executionService.startExecutionByKey("p", "one");
-    Execution execution = executionService.signalExecution("p/one", "up");
+    Execution execution = executionService.signalExecutionById("p/one", "up");
     assertEquals("a", execution.getNodeName());
   }
 
@@ -147,7 +147,7 @@
     );
 
     executionService.startExecutionByKey("p", "one");
-    Execution execution = executionService.signalExecution("p/one");
+    Execution execution = executionService.signalExecutionById("p/one");
     assertEquals("a", execution.getNodeName());
   }
 }

Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/svc/ExecutionServiceTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/svc/ExecutionServiceTest.java	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/svc/ExecutionServiceTest.java	2008-12-04 11:41:47 UTC (rev 3200)
@@ -21,6 +21,12 @@
  */
 package org.jbpm.test.svc;
 
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jbpm.Execution;
 import org.jbpm.test.DbTestCase;
 
 
@@ -28,10 +34,197 @@
  * @author Tom Baeyens
  */
 public class ExecutionServiceTest extends DbTestCase {
+  
+  // start new process instance ///////////////////////////////////////////////
 
-  public void testDummy() {
+  public void testStartNewProcessInstance() {
+    deployJpdlXmlString(
+      "<process name='Insurance claim' key='ICL'>" +
+      "  <start>" +
+      "    <flow to='a' />" +
+      "  </start>" +
+      "  <state name='a' />" +
+      "</process>"
+    );
+
+    Execution execution = executionService.startExecutionByKey("ICL");
+
+    assertNotNull(execution);
+    assertEquals("a", execution.getNodeName());
   }
 
+  public void testAutoSwitchToNewVersion() {
+    deployJpdlXmlString(
+      "<process name='Insurance claim' key='ICL'>" +
+      "  <start>" +
+      "    <flow to='a' />" +
+      "  </start>" +
+      "  <state name='a' />" +
+      "</process>"
+    );
+
+    Execution execution = executionService.startExecutionByKey("ICL");
+
+    assertNotNull(execution);
+    assertEquals("a", execution.getNodeName());
+
+    deployJpdlXmlString(
+      "<process name='Insurance claim' key='ICL'>" +
+      "  <start>" +
+      "    <flow to='b' />" +
+      "  </start>" +
+      "  <state name='b' />" +
+      "</process>"
+    );
+
+    execution = executionService.startExecutionByKey("ICL");
+
+    assertNotNull(execution);
+    assertEquals("b", execution.getNodeName());
+  }
+
+  public void testStartNewProcessInstanceWithAKey() {
+    deployJpdlXmlString(
+      "<process name='Insurance claim' key='ICL'>" +
+      "  <start>" +
+      "    <flow to='a' />" +
+      "  </start>" +
+      "  <state name='a' />" +
+      "</process>"
+    );
+
+    Execution execution = executionService.startExecutionByKey("ICL", "one");
+
+    assertNotNull(execution);
+    assertEquals("ICL/one", execution.getId());
+  }
+
+  public void testStartNewProcessInstanceWithVariables() {
+    deployJpdlXmlString(
+      "<process name='Insurance claim' key='ICL'>" +
+      "  <start>" +
+      "    <flow to='a' />" +
+      "  </start>" +
+      "  <state name='a' />" +
+      "</process>"
+    );
+    
+    Map<String,Object> variables = new HashMap<String,Object>();
+    variables.put("customer", "John Doe");
+    variables.put("type", "Accident");
+    variables.put("amount", new Float(763.74));
+
+    Execution execution = executionService.startExecutionByKey("ICL", variables);
+    
+    String executionId = execution.getId();
+
+    assertNotNull(execution);
+    
+    Map<String,Object> expectedVariables = new HashMap<String, Object>(variables); 
+    Set<String> expectedVariableNames = new HashSet<String>(expectedVariables.keySet());
+    Set<String> variableNames = new HashSet<String>(executionService.getVariableNames(executionId));
+    assertEquals(expectedVariableNames, variableNames);
+    
+    variables = executionService.getVariables(executionId, variableNames);
+    assertEquals(expectedVariables, variables);
+  }
+
+  // signal ///////////////////////////////////////////////////////////////////
+  
+  public void testSignalExecutionByKey() {
+    deployJpdlXmlString(
+      "<process name='Insurance claim' key='ICL'>" +
+      "  <start>" +
+      "    <flow to='a' />" +
+      "  </start>" +
+      "  <state name='a'>" +
+      "    <flow to='b' />" +
+      "  </state>" +
+      "  <state name='b'>" +
+      "    <flow to='c' />" +
+      "  </state>" +
+      "  <state name='c' />" +
+      "</process>"
+    );
+
+    Execution execution = executionService.startExecutionByKey("ICL", "82436");
+    
+    assertEquals("a", execution.getNodeName());
+    
+    execution = executionService.signalExecutionByKey("ICL", "82436");
+
+    assertEquals("b", execution.getNodeName());
+
+    execution = executionService.signalExecutionByKey("ICL", "82436");
+
+    assertEquals("c", execution.getNodeName());
+  }
+
+  public void testSignalExecutionById() {
+    deployJpdlXmlString(
+      "<process name='Insurance claim' key='ICL'>" +
+      "  <start>" +
+      "    <flow to='a' />" +
+      "  </start>" +
+      "  <state name='a'>" +
+      "    <flow to='b' />" +
+      "  </state>" +
+      "  <state name='b'>" +
+      "    <flow to='c' />" +
+      "  </state>" +
+      "  <state name='c' />" +
+      "</process>"
+    );
+
+    Execution execution = executionService.startExecutionByKey("ICL", "82436");
+    
+    assertEquals("a", execution.getNodeName());
+    
+    execution = executionService.signalExecutionById("ICL/82436");
+
+    assertEquals("b", execution.getNodeName());
+
+    execution = executionService.signalExecutionById("ICL/82436");
+
+    assertEquals("c", execution.getNodeName());
+  }
+
+  public void testSignalExecutionWithVariables() {
+    deployJpdlXmlString(
+      "<process name='Insurance claim' key='ICL'>" +
+      "  <start>" +
+      "    <flow to='a' />" +
+      "  </start>" +
+      "  <state name='a'>" +
+      "    <flow to='b' />" +
+      "  </state>" +
+      "  <state name='b' />" +
+      "</process>"
+    );
+
+    Execution execution = executionService.startExecutionByKey("ICL", "82436");
+
+    Map<String,Object> variables = new HashMap<String,Object>();
+    variables.put("customer", "John Doe");
+    variables.put("type", "Accident");
+    variables.put("amount", new Float(763.74));
+
+    execution = executionService.signalExecutionById("ICL/82436", variables);
+
+    assertNotNull(execution);
+    String executionId = execution.getId();
+    assertEquals("b", execution.getNodeName());
+    
+    Map<String,Object> expectedVariables = new HashMap<String, Object>(variables); 
+    Set<String> expectedVariableNames = new HashSet<String>(expectedVariables.keySet());
+    Set<String> variableNames = new HashSet<String>(executionService.getVariableNames(executionId));
+    assertEquals(expectedVariableNames, variableNames);
+    
+    variables = executionService.getVariables(executionId, variableNames);
+    assertEquals(expectedVariables, variables);
+  }
+
+  
  /*
   public void testDefaultSignalWithoutTransitions() {
     deployJpdlXmlString(

Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/master.xml	2008-12-04 11:41:47 UTC (rev 3200)
@@ -1,10 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!DOCTYPE book [
-  <!ENTITY ch01-Introduction                   SYSTEM "modules/ch01-Introduction.xml">
-  <!ENTITY ch02-Installation                   SYSTEM "modules/ch02-Installation.xml">
-  <!ENTITY ch03-Services                       SYSTEM "modules/ch03-Services.xml">
-  <!ENTITY ch04-Jpdl                           SYSTEM "modules/ch04-Jpdl.xml">
+  <!ENTITY ch01-Introduction       SYSTEM "modules/ch01-Introduction.xml">
+  <!ENTITY ch02-Installation       SYSTEM "modules/ch02-Installation.xml">
+  <!ENTITY ch03-Services           SYSTEM "modules/ch03-Services.xml">
+  <!ENTITY ch04-Jpdl               SYSTEM "modules/ch04-Jpdl.xml">
+  <!ENTITY ch05-Gpd                SYSTEM "modules/ch05-Gpd.xml">
 ]>
 
 <book lang="en">
@@ -19,5 +20,6 @@
   &ch02-Installation;
   &ch03-Services;
   &ch04-Jpdl;
+  &ch05-Gpd;
 
 </book>
\ No newline at end of file

Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch01-Introduction.xml	2008-12-04 11:41:47 UTC (rev 3200)
@@ -11,6 +11,13 @@
   </section>
 
   <section>
+    <title>Downloads</title>
+    <para>The distribution packages can be downloaded from sourceforge
+    </para>
+    <ulink url="http://sourceforge.net/project/showfiles.php?group_id=70542&amp;package_id=268068">http://sourceforge.net/project/showfiles.php?group_id=70542&amp;package_id=268068</ulink>
+  </section>
+
+  <section>
     <title>Sources</title>
     <para>The source code for this component can be found in the jBPM SVN repository:
     </para>
@@ -19,8 +26,9 @@
 
   <section>
     <title>JVM version</title>
-    <para>jBPM requires a JVM version 5 or higher.
+    <para>jBPM requires a JDK (standard java) version 5 or higher.
     </para>
+    <ulink url="http://java.sun.com/javase/downloads/index.jsp">http://java.sun.com/javase/downloads/index.jsp</ulink>
   </section>
 
   <section>
@@ -84,7 +92,7 @@
     this conceptually remains simple in the case where there is only one path 
     of execution.  The services API doesn't need to make a functional difference 
     between process instances and executions.  Therefore, the API has only 
-    Execution as a type to refer to both <literal>ProcessInstance</literal>s and 
+    one Execution type to refer to both <literal>ProcessInstance</literal>s and 
     <literal>Execution</literal>s. 
     </para>
   </section>

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	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch02-Installation.xml	2008-12-04 11:41:47 UTC (rev 3200)
@@ -35,4 +35,31 @@
     <para>TODO</para>
   </section>
 
+  <section id="eclipse">
+    <title>Eclipse</title>
+    <para>TODO</para>
+    <section>
+      <title>Graphical Process Designer (GPD)</title>
+      <para>TODO</para>
+    </section>
+    <section>
+      <title>In an existing eclipse</title>
+      <para>TODO</para>
+    </section>
+    <section>
+      <title>Let the installer download eclipse</title>
+      <para>TODO</para>
+    </section>
+    <section>
+      <title>Workspace</title>
+      <para>TODO: Koen, can we make an existing workspace 
+      part of the distro and then put some examples in there ?
+      Then users just have to point their eclipse to the 
+      workspace in our distro and they have the examples with 
+      the projects and classpaths ready to go.
+      We would have to put some workspace in our svn...
+      </para>
+    </section>
+  </section>
+
 </chapter>
\ No newline at end of file

Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Services.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Services.xml	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch03-Services.xml	2008-12-04 11:41:47 UTC (rev 3200)
@@ -44,8 +44,8 @@
 <emphasis role="bold">TaskService</emphasis> taskService = processEngine.getTaskService();</programlisting>
 
     <para>Process engine objects defined in the configuration can also be retrieved by 
-    type (<literal>processEngine.get(Class&lt;T&gt; T)</literal>) 
-    or by name (<literal>processEngine.get(String name)</literal>)</para>
+    type (<literal>processEngine.get(Class&lt;T&gt;)</literal>) 
+    or by name (<literal>processEngine.get(String)</literal>)</para>
 
   </section>
 
@@ -59,15 +59,21 @@
     <literal>ProcessService</literal> like this:
     </para>
     <programlisting>processService.createDeployment()
-    .setLanguage("jpdl")
     .addResource("order.jpdl.xml")
     .deploy();</programlisting>
     <para>Analogue to the <literal>addResource</literal> method above, the source of 
     the processes definitions XML can be picked up from a file, url, string, 
     input stream, zip or jar archive and a directory.
     </para>
+    <para>A deployment works with a set of named resources and can potentially contain 
+    multiple process descriptions and multiple other artifact types.  The jPDL deployer 
+    will recognise process files based on the <literal>.jpdl.xml</literal> 
+    extension automatically.  For files not adhering to that naming 
+    convention, the type can be set programmatically to <literal>jpdl</literal>
+    with method <literal>setFileType("my-jpdl-process.someotherextension", "jpdl")</literal>
+    </para>
     <para>During deployment, an <literal>id</literal> is assigned to the process 
-    definition.  The <literal>id</literal> will have format 
+    definitions.  The <literal>id</literal> will have format 
     <literal>{key}:{version}</literal>
     </para>
     <para>If <literal>key</literal> is not provided, it is generated automatically 
@@ -179,17 +185,12 @@
       the processes with key <literal>ICL</literal>.  Then a new 
       process instance is started in that latest process definition.
       </para>
-      <para>Analogue, method <literal>startExecutionByName</literal> will 
-      start a new execution in the latest version of the process definitions 
-      with the given name.
-      </para>
       <para>When a new version of the insurance claim process 
-      is deployed, all invocations of <literal>startExecutionByKey</literal> 
-      and <literal>startExecutionByName</literal>
+      is deployed, all invocations of <literal>startExecutionByKey</literal>
       will automatically switch to the newly deployed version.
       </para>
     </section>
-    
+
     <section id="specificprocessversion">
       <title>Specific process version</title>
       <para>If instead you want to start a new process instance in a very 
@@ -241,6 +242,21 @@
 
   <section id="singallingawaitingexecution">
     <title>Signalling a waiting execution</title>
+    <para>A process definition describes what must be done in terms of activities.
+    Each activity in a process is either to be performed by the process 
+    system or by an external participant.  When an activity is to be performed 
+    by an external participant, then the execution must wait until the 
+    external participant notifies the process system that the activity is 
+    completed.  So an execution is either executing or waiting on an external 
+    participant.  Typically, you'll see that the processes are mostly 
+    waiting for external participants.  Especially humans tend to be slow :-)
+    The time consumed by the process system between two wait states is 
+    typically very small.
+    </para>
+    <para>A <literal>state</literal> is the basic activity that represents 
+    something has to be done by an external participant and the execution 
+    must wait until a signal (aka external trigger) is given.
+    </para>
     <para>When an execution is in a wait state, it can be given an external trigger 
     with one of the signal methods.  The recommended way to reference an execution 
     is by using the process definition and execution key.  In the next code snippet,

Modified: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml	2008-12-04 11:02:42 UTC (rev 3199)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch04-Jpdl.xml	2008-12-04 11:41:47 UTC (rev 3200)
@@ -16,8 +16,23 @@
     
     <section id="start">
       <title><literal>start</literal></title>
-      <para></para>
+      <para>TODO</para>
     </section>
+
+    <section id="state">
+      <title><literal>state</literal></title>
+      <para>TODO</para>
+    </section>
+
+    <section id="exclusive">
+      <title><literal>exclusive</literal></title>
+      <para>TODO</para>
+    </section>
+
+    <section id="end">
+      <title><literal>end</literal></title>
+      <para>TODO</para>
+    </section>
   </section>
 
 </chapter>

Added: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Gpd.xml
===================================================================
--- jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Gpd.xml	                        (rev 0)
+++ jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Gpd.xml	2008-12-04 11:41:47 UTC (rev 3200)
@@ -0,0 +1,7 @@
+<chapter id="gpd">
+  <title>GPD</title>
+  
+  <para>This chapter will explain how to work with the Graphical Process Designer.
+  </para>
+  
+</chapter>


Property changes on: jbpm4/trunk/modules/userguide/src/main/docbook/en/modules/ch05-Gpd.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbpm-commits mailing list