[jbpm-commits] JBoss JBPM SVN: r3910 - in jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal: execution and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Feb 18 02:32:16 EST 2009


Author: tom.baeyens at jboss.com
Date: 2009-02-18 02:32:15 -0500 (Wed, 18 Feb 2009)
New Revision: 3910

Added:
   jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/execution/
   jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/execution/PvmProcessExecutionTest.java
Log:
added PvmProcessExecutionTest

Added: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/execution/PvmProcessExecutionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/execution/PvmProcessExecutionTest.java	                        (rev 0)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/execution/PvmProcessExecutionTest.java	2009-02-18 07:32:15 UTC (rev 3910)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.execution;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.jbpm.Deployment;
+import org.jbpm.Execution;
+import org.jbpm.ExecutionService;
+import org.jbpm.ProcessService;
+import org.jbpm.client.ClientProcessDefinition;
+import org.jbpm.pvm.activities.AutomaticActivity;
+import org.jbpm.pvm.activities.WaitState;
+import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.cfg.JbpmConfiguration;
+import org.jbpm.pvm.internal.svc.DeploymentImpl;
+import org.jbpm.pvm.internal.svc.ProcessServiceImpl;
+import org.jbpm.pvm.test.EnvironmentFactoryTestCase;
+
+/**
+ * @author Tom Baeyens
+ */
+public class PvmProcessExecutionTest extends EnvironmentFactoryTestCase {
+
+  public void testDeploy() {
+    JbpmConfiguration environmentFactory = (JbpmConfiguration) getEnvironmentFactory();
+    ProcessService processService = environmentFactory.get(ProcessService.class);
+
+    ClientProcessDefinition processDefinition = ProcessDefinitionBuilder.startProcess("test")
+      .startActivity("start", WaitState.class)
+        .initial()
+        .flow("end", "end")
+      .endActivity()
+      .startActivity("end", AutomaticActivity.class)
+      .endActivity()
+    .endProcess();
+
+    Deployment deployment = new DeploymentImpl();
+    deployment.addObject("testProcesssss", processDefinition);
+
+    ((ProcessServiceImpl) processService).deploy(deployment);
+  }
+
+  public void testStartProcessInstance() {
+    JbpmConfiguration environmentFactory = (JbpmConfiguration) getEnvironmentFactory();
+    ExecutionService executionService = environmentFactory.get(ExecutionService.class);
+    Execution execution = executionService.startProcessInstanceById("test:1", "request17");
+  }
+
+  public void testResumeProcessInstance() {
+    JbpmConfiguration environmentFactory = (JbpmConfiguration) getEnvironmentFactory();
+    ExecutionService executionService = environmentFactory.get(ExecutionService.class);
+    Execution execution = executionService.signalExecutionById("test/request17", "end");
+  }
+
+}
\ No newline at end of file


Property changes on: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/execution/PvmProcessExecutionTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbpm-commits mailing list