Skip to content
Browse files

- updating installer

  • Loading branch information...
1 parent 98a55b7 commit 6cd238bd8f78072e86f9be833fac07b0c7247827 @krisv krisv committed
View
21 jbpm-distribution/pom.xml
@@ -129,7 +129,7 @@
<artifactId>jbpm-bam</artifactId>
<classifier>sources</classifier>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-human-task-core</artifactId>
</dependency>
@@ -164,7 +164,7 @@
<groupId>org.jbpm</groupId>
<artifactId>jbpm-human-task-jms</artifactId>
<classifier>sources</classifier>
- </dependency>
+ </dependency-->
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-workitems</artifactId>
@@ -239,8 +239,12 @@
</dependency>
<dependency>
<groupId>org.jbpm</groupId>
- <artifactId>jbpm-human-task-war</artifactId>
- <type>war</type>
+ <artifactId>jbpm-runtime-manager</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-runtime-manager</artifactId>
+ <classifier>sources</classifier>
</dependency>
<!-- The old assembly also included this optional dependency -->
@@ -260,6 +264,10 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ </dependency>
<!-- Javadocs and documentation -->
<dependency>
@@ -282,10 +290,5 @@
<artifactId>junit</artifactId>
<scope>provided</scope>
</dependency>
- <dependency><!-- Workaround, maybe for http://jira.codehaus.org/browse/MJAVADOC-340 -->
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <scope>provided</scope>
- </dependency>
</dependencies>
</project>
View
8 jbpm-distribution/src/main/assembly/pre-bin.xml
@@ -13,10 +13,10 @@
<include>org.jbpm:jbpm-persistence-jpa</include>
<include>org.jbpm:jbpm-bpmn2</include>
<include>org.jbpm:jbpm-bam</include>
- <include>org.jbpm:jbpm-human-task-core</include>
+ <!-- include>org.jbpm:jbpm-human-task-core</include>
<include>org.jbpm:jbpm-human-task-mina</include>
<include>org.jbpm:jbpm-human-task-hornetq</include>
- <include>org.jbpm:jbpm-human-task-jms</include>
+ <include>org.jbpm:jbpm-human-task-jms</include-->
<include>org.jbpm:jbpm-workitems</include>
<include>org.jbpm:droolsjbpm-knowledge-services</include>
<include>org.jbpm:executor-services</include>
@@ -39,10 +39,10 @@
<exclude>org.jbpm:jbpm-persistence-jpa</exclude>
<exclude>org.jbpm:jbpm-bpmn2</exclude>
<exclude>org.jbpm:jbpm-bam</exclude>
- <exclude>org.jbpm:jbpm-human-task-core</exclude>
+ <!-- exclude>org.jbpm:jbpm-human-task-core</exclude>
<exclude>org.jbpm:jbpm-human-task-mina</exclude>
<exclude>org.jbpm:jbpm-human-task-hornetq</exclude>
- <exclude>org.jbpm:jbpm-human-task-jms</exclude>
+ <exclude>org.jbpm:jbpm-human-task-jms</exclude-->
<exclude>org.jbpm:jbpm-workitems</exclude>
<exclude>org.jbpm:droolsjbpm-knowledge-services</exclude>
<exclude>org.jbpm:executor-services</exclude>
View
2 jbpm-examples/.classpath
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
- <classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="JBPM/jbpm"/>
+ <classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
View
1 jbpm-examples/pom.xml
@@ -76,7 +76,6 @@
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-test</artifactId>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.subethamail</groupId>
View
8 jbpm-installer/build.properties
@@ -27,7 +27,7 @@ jBPM.console.url=https://hudson.jboss.org/hudson/job/jbpm-console-ng/lastSuccess
# droolsjbpm.eclipse.version=6.0.0-SNAPSHOT
# droolsjbpm.eclipse.url=https://hudson.jboss.org/hudson/job/droolsjbpm-tools/lastSuccessfulBuild/artifact/drools-eclipse/org.drools.updatesite/target/site_assembly.zip
droolsjbpm.eclipse.version=6.0.0-SNAPSHOT
-droolsjbpm.eclipse.url=https://hudson.jboss.org/hudson/job/droolsjbpm-tools/lastSuccessfulBuild/artifact/drools-eclipse/org.drools.updatesite/target/site_assembly.zip
+droolsjbpm.eclipse.url=https://hudson.jboss.org/hudson/job/droolsjbpm-tools/lastSuccessfulBuild/artifact/drools-eclipse/org.drools.updatesite/target/org.drools.updatesite-6.0.0-SNAPSHOT.zip
# the version of Drools Guvnor you want to use
# and the associated URL you want to get the dependencies from
@@ -69,10 +69,8 @@ jboss.clean.repository=true
# will be used to deploy the Eclipse plugin to
eclipse.home=./eclipse
-# defines whether you want the BAM component (for reporting) to be downloaded or not
-# if you do not download the BAM component, reporting in the jbpm-console will not work
-# put this property to false if you do not want to download BAM component
-jBPM.BAM.download=false
+dashboard.version=6.0.0-SNAPSHOT
+dashboard.url=https://hudson.jboss.org/hudson/job/dashboard-builder/lastSuccessfulBuild/artifact/modules/dashboard-jbpm/target/dashboard-jbpm-6.0.0-SNAPSHOT.war
# data base related properties
db.driver.jar=${install.home}/db/driver/${db.driver.jar.name}
View
27 jbpm-installer/build.xml
@@ -229,19 +229,34 @@
<get src="${designer.url}" dest="${install.home}/lib/jbpm-designer-${designer.version}.war" />
</target>
+ <!-- Download Dashboard -->
+ <target name="download.dashboard.check">
+ <echo message="Checking Dashboard download ..." />
+ <condition property="dashboard.not.available">
+ <not>
+ <available file="${install.home}/lib/dashboard-jbpm-${dashboard.version}.war" />
+ </not>
+ </condition>
+ </target>
+ <target name="download.dashboard" depends="download.dashboard.check" if="dashboard.not.available">
+ <echo message="Getting Dashboard ..." />
+ <mkdir dir="${install.home}/lib"/>
+ <get src="${dashboard.url}" dest="${install.home}/lib/dashboard-jbpm-${dashboard.version}.war" />
+ </target>
+
<!-- Download jBPM and Drools Eclipse plugins -->
<target name="download.droolsjbpm.eclipse.check">
<echo message="Checking jBPM and Drools Eclipse download ..." />
<condition property="droolsjbpm.eclipse.not.available">
<not>
- <available file="${install.home}/lib/org.drools.updatesite-${droolsjbpm.eclipse.version}-assembly.zip" />
+ <available file="${install.home}/lib/org.drools.updatesite-${droolsjbpm.eclipse.version}.zip" />
</not>
</condition>
</target>
<target name="download.droolsjbpm.eclipse" depends="download.droolsjbpm.eclipse.check" if="droolsjbpm.eclipse.not.available">
<echo message="Getting jBPM and Drools Eclipse ..." />
<mkdir dir="${install.home}/lib"/>
- <get src="${droolsjbpm.eclipse.url}" dest="${install.home}/lib/org.drools.updatesite-${droolsjbpm.eclipse.version}-assembly.zip" />
+ <get src="${droolsjbpm.eclipse.url}" dest="${install.home}/lib/org.drools.updatesite-${droolsjbpm.eclipse.version}.zip" />
</target>
<!-- Download jBPM gwt-console -->
@@ -351,9 +366,9 @@
</copy>
</target>
- <!-- Install BAM -->
- <target name="install.bam.into.jboss">
- <copy file="${install.home}/lib/polymita-bam-app-jboss-as7.0.war"
+ <!-- Install Dashboard -->
+ <target name="install.dashboard.into.jboss" depends="download.dashboard">
+ <copy file="${install.home}/lib/dashboard-jbpm-${dashboard.version}.war"
tofile="${jboss.server.deploy.dir}/bam-app.war"
overwrite="true" />
</target>
@@ -389,7 +404,7 @@
<target name="install.droolsjbpm-eclipse.into.eclipse" depends="download.droolsjbpm.eclipse">
<!-- install plugins -->
<mkdir dir="${eclipse.home}/droolsjbpm-update-site"/>
- <unzip src="${install.home}/lib/org.drools.updatesite-${droolsjbpm.eclipse.version}-assembly.zip" dest="${eclipse.home}/droolsjbpm-update-site" />
+ <unzip src="${install.home}/lib/org.drools.updatesite-${droolsjbpm.eclipse.version}.zip" dest="${eclipse.home}/droolsjbpm-update-site" />
<copy todir="${eclipse.home}/features" overwrite="true">
<fileset dir="${eclipse.home}/droolsjbpm-update-site/features"/>
</copy>
View
74 jbpm-installer/db/jbpm-persistence-JPA2.xml
@@ -11,46 +11,56 @@
<mapping-file>META-INF/Taskorm.xml</mapping-file>
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
<mapping-file>META-INF/Executor-orm.xml</mapping-file>
-
- <class>org.jbpm.task.Attachment</class>
- <class>org.jbpm.task.Content</class>
- <class>org.jbpm.task.BooleanExpression</class>
- <class>org.jbpm.task.Comment</class>
- <class>org.jbpm.task.Deadline</class>
- <class>org.jbpm.task.Comment</class>
- <class>org.jbpm.task.Deadline</class>
- <class>org.jbpm.task.Delegation</class>
- <class>org.jbpm.task.Escalation</class>
- <class>org.jbpm.task.Group</class>
- <class>org.jbpm.task.I18NText</class>
- <class>org.jbpm.task.Notification</class>
- <class>org.jbpm.task.EmailNotification</class>
- <class>org.jbpm.task.EmailNotificationHeader</class>
- <class>org.jbpm.task.PeopleAssignments</class>
- <class>org.jbpm.task.Reassignment</class>
- <class>org.jbpm.task.Status</class>
- <class>org.jbpm.task.Task</class>
- <class>org.jbpm.task.TaskDef</class>
- <class>org.jbpm.task.TaskData</class>
- <class>org.jbpm.task.SubTasksStrategy</class>
- <class>org.jbpm.task.User</class>
+ <mapping-file>META-INF/Servicesorm.xml</mapping-file>
+
+ <class>org.jbpm.services.task.impl.model.AttachmentImpl</class>
+ <class>org.jbpm.services.task.impl.model.ContentImpl</class>
+ <class>org.jbpm.services.task.impl.model.BooleanExpressionImpl</class>
+ <class>org.jbpm.services.task.impl.model.CommentImpl</class>
+ <class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
+ <class>org.jbpm.services.task.impl.model.CommentImpl</class>
+ <class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
+ <class>org.jbpm.services.task.impl.model.DelegationImpl</class>
+ <class>org.jbpm.services.task.impl.model.EscalationImpl</class>
+ <class>org.jbpm.services.task.impl.model.GroupImpl</class>
+ <class>org.jbpm.services.task.impl.model.I18NTextImpl</class>
+ <class>org.jbpm.services.task.impl.model.NotificationImpl</class>
+ <class>org.jbpm.services.task.impl.model.EmailNotificationImpl</class>
+ <class>org.jbpm.services.task.impl.model.EmailNotificationHeaderImpl</class>
+ <class>org.jbpm.services.task.impl.model.PeopleAssignmentsImpl</class>
+ <class>org.jbpm.services.task.impl.model.ReassignmentImpl</class>
+ <class>org.kie.internal.task.api.model.Status</class>
+ <class>org.jbpm.services.task.impl.model.TaskImpl</class>
+ <class>org.jbpm.services.task.impl.model.TaskDefImpl</class>
+ <class>org.jbpm.services.task.impl.model.TaskDataImpl</class>
+ <class>org.kie.internal.task.api.model.SubTasksStrategy</class>
+ <class>org.jbpm.services.task.impl.model.UserImpl</class>
+ <class>org.jbpm.executor.entities.ErrorInfo</class>
+ <class>org.jbpm.executor.entities.RequestInfo</class>
+
+ <!--BAM for task service -->
+ <class>org.jbpm.services.task.impl.model.BAMTaskSummaryImpl</class>
+
<class>org.droolsjbpm.services.impl.model.ProcessDesc</class>
- <class>org.droolsjbpm.services.impl.model.ProcessInstanceDesc</class>
- <class>org.droolsjbpm.services.impl.model.NodeInstanceDesc</class>
- <class>org.droolsjbpm.services.impl.model.VariableStateDesc</class>
<class>org.droolsjbpm.services.impl.model.ProcessInputDesc</class>
<class>org.droolsjbpm.services.impl.model.RuleNotificationInstanceDesc</class>
- <class>org.droolsjbpm.services.impl.model.BAMProcessSummary</class>
- <class>org.droolsjbpm.services.impl.model.BAMTaskSummary</class>
-
+
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
- <class>org.jbpm.executor.entities.ErrorInfo</class>
- <class>org.jbpm.executor.entities.RequestInfo</class>
<class>org.jbpm.persistence.correlation.CorrelationKeyInfo</class>
<class>org.jbpm.persistence.correlation.CorrelationPropertyInfo</class>
-
+
+ <!-- bam -->
+ <class>org.jbpm.process.audit.ProcessInstanceLog</class>
+ <class>org.jbpm.process.audit.NodeInstanceLog</class>
+ <class>org.jbpm.process.audit.VariableInstanceLog</class>
+
+ <!-- domain -->
+ <class>org.droolsjbpm.services.domain.entities.Domain</class>
+ <class>org.droolsjbpm.services.domain.entities.Organization</class>
+ <class>org.droolsjbpm.services.domain.entities.RuntimeId</class>
+
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
View
1 jbpm-installer/sample/evaluation/.classpath
@@ -4,5 +4,6 @@
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="JBPM/jbpm"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="bin"/>
</classpath>
View
119 jbpm-installer/sample/evaluation/src/main/java/com/sample/ProcessTest.java
@@ -1,72 +1,77 @@
package com.sample;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-import org.jbpm.process.workitem.wsht.LocalHTWorkItemHandler;
-import org.jbpm.task.identity.DefaultUserGroupCallbackImpl;
-import org.jbpm.task.identity.UserGroupCallbackManager;
-import org.jbpm.task.service.TaskService;
-import org.jbpm.task.service.local.LocalTaskService;
-import org.jbpm.task.utils.OnErrorAction;
-import org.jbpm.test.JBPMHelper;
-import org.kie.KieBase;
-import org.kie.SystemEventListenerFactory;
-import org.kie.api.builder.KnowledgeBuilder;
-import org.kie.api.builder.KnowledgeBuilderFactory;
-import org.kie.api.io.ResourceFactory;
-import org.kie.api.io.ResourceType;
-import org.kie.api.logger.KnowledgeRuntimeLogger;
-import org.kie.api.logger.KnowledgeRuntimeLoggerFactory;
-import org.kie.api.runtime.StatefulKnowledgeSession;
+import org.jbpm.test.JbpmJUnitTestCase;
+import org.junit.Test;
+import org.kie.api.KieServices;
+import org.kie.api.logger.KieRuntimeLogger;
+import org.kie.api.runtime.KieSession;
+import org.kie.api.runtime.process.ProcessInstance;
+import org.kie.internal.task.api.TaskService;
+import org.kie.internal.task.api.model.TaskSummary;
/**
- * This is a sample file to launch a process.
+ * This is a sample test of the evaluation process.
*/
-public class ProcessTest {
+public class ProcessTest extends JbpmJUnitTestCase {
- public static final void main(String[] args) {
- try {
- // load up the knowledge base
- KieBase kbase = readKnowledgeBase();
- StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
- KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(ksession, "test", 1000);
- // start a new process instance
- Map<String, Object> params = new HashMap<String, Object>();
- params.put("employee", "krisv");
- params.put("reason", "Yearly performance evaluation");
+ @Test
+ public void testEvaluationProcess() {
+ KieSession ksession = createKnowledgeSession("Evaluation.bpmn");
+ KieRuntimeLogger log = KieServices.Factory.get().getLoggers().newThreadedFileLogger(ksession, "test", 1000);
+ TaskService taskService = getTaskService();
+
+ // start a new process instance
+ Map<String, Object> params = new HashMap<String, Object>();
+ params.put("employee", "krisv");
+ params.put("reason", "Yearly performance evaluation");
+ ProcessInstance processInstance =
ksession.startProcess("com.sample.evaluation", params);
- System.out.println("Process started ...");
- logger.close();
- } catch (Throwable t) {
- t.printStackTrace();
- }
+ System.out.println("Process started ...");
+
+ // complete Self Evaluation
+ List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner("krisv", "en-UK");
+ assertEquals(1, tasks.size());
+ TaskSummary task = tasks.get(0);
+ System.out.println("'krisv' completing task " + task.getName() + ": " + task.getDescription());
+ taskService.start(task.getId(), "krisv");
+ Map<String, Object> results = new HashMap<String, Object>();
+ results.put("performance", "exceeding");
+ taskService.complete(task.getId(), "krisv", results);
+
+ // john from HR
+ tasks = taskService.getTasksAssignedAsPotentialOwner("john", "en-UK");
+ assertEquals(1, tasks.size());
+ task = tasks.get(0);
+ System.out.println("'john' completing task " + task.getName() + ": " + task.getDescription());
+ taskService.claim(task.getId(), "john");
+ taskService.start(task.getId(), "john");
+ results = new HashMap<String, Object>();
+ results.put("performance", "acceptable");
+ taskService.complete(task.getId(), "john", results);
+
+ // mary from PM
+ tasks = taskService.getTasksAssignedAsPotentialOwner("mary", "en-UK");
+ assertEquals(1, tasks.size());
+ task = tasks.get(0);
+ System.out.println("'mary' completing task " + task.getName() + ": " + task.getDescription());
+ taskService.claim(task.getId(), "mary");
+ taskService.start(task.getId(), "mary");
+ results = new HashMap<String, Object>();
+ results.put("performance", "outstanding");
+ taskService.complete(task.getId(), "mary", results);
+
+ assertProcessInstanceCompleted(processInstance.getId(), ksession);
+ System.out.println("Process instance completed");
+ log.close();
}
- private static KieBase readKnowledgeBase() throws Exception {
- KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
- kbuilder.add(ResourceFactory.newClassPathResource("Evaluation.bpmn"), ResourceType.BPMN2);
- return kbuilder.newKnowledgeBase();
- }
-
- private static StatefulKnowledgeSession createKnowledgeSession(KieBase kbase) {
- StatefulKnowledgeSession ksession = (StatefulKnowledgeSession) kbase.newKieSession();
- UserGroupCallbackManager.getInstance().setCallback(
- new DefaultUserGroupCallbackImpl("classpath:/usergroups.properties"));
- JBPMHelper.setupDataSource();
- JBPMHelper.startH2Server();
- EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");
- TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
- LocalTaskService localTaskService = new LocalTaskService(taskService);
- LocalHTWorkItemHandler humanTaskHandler = new LocalHTWorkItemHandler(
- localTaskService, ksession, OnErrorAction.RETHROW);
- humanTaskHandler.connect();
- ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);
- return ksession;
+ public ProcessTest() {
+ super(true);
+ setPersistence(true);
}
-
}
View
1 jbpm-services/jbpm-human-task-services/pom.xml
@@ -45,7 +45,6 @@
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
View
5 jbpm-test/pom.xml
@@ -49,7 +49,6 @@
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-runtime-manager</artifactId>
- <version>6.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opensymphony.quartz</groupId>
@@ -111,6 +110,10 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ </dependency>
</dependencies>
<build>

0 comments on commit 6cd238b

Please sign in to comment.
Something went wrong with that request. Please try again.