Author: KrisVerlaenen
Date: 2011-02-02 23:42:05 -0500 (Wed, 02 Feb 2011)
New Revision: 28950
Added:
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/resources/org/jboss/tools/jbpm/wizard/project/sample.bpmn.template
Modified:
trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/antlr-runtime.jar
trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/drools-api.jar
trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/drools-compiler.jar
trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/drools-core.jar
trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/jbpm-bam.jar
trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/jbpm-bpmn2.jar
trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/jbpm-flow-builder.jar
trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/jbpm-flow.jar
trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/mvel2.jar
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/java/org/jboss/tools/jbpm/wizard/project/NewJBPMProjectWizard.java
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/resources/org/jboss/tools/jbpm/wizard/project/ProcessLauncherSample.java.template
Log:
Update to jBPM 5.0.0
Modified: trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/antlr-runtime.jar
===================================================================
(Binary files differ)
Modified: trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/drools-api.jar
===================================================================
(Binary files differ)
Modified: trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/drools-compiler.jar
===================================================================
(Binary files differ)
Modified: trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/drools-core.jar
===================================================================
(Binary files differ)
Modified: trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/jbpm-bam.jar
===================================================================
(Binary files differ)
Modified: trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/jbpm-bpmn2.jar
===================================================================
(Binary files differ)
Modified: trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/jbpm-flow-builder.jar
===================================================================
(Binary files differ)
Modified: trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/jbpm-flow.jar
===================================================================
(Binary files differ)
Modified: trunk/bpmn/plugins/org.jboss.tools.jbpm/lib/mvel2.jar
===================================================================
(Binary files differ)
Modified:
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/java/org/jboss/tools/jbpm/wizard/project/NewJBPMProjectWizard.java
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/java/org/jboss/tools/jbpm/wizard/project/NewJBPMProjectWizard.java 2011-02-03
03:25:40 UTC (rev 28949)
+++
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/java/org/jboss/tools/jbpm/wizard/project/NewJBPMProjectWizard.java 2011-02-03
04:42:05 UTC (rev 28950)
@@ -300,23 +300,23 @@
* Create the sample process file.
*/
private void createProcess(IJavaProject project, IProgressMonitor monitor) throws
CoreException {
- String fileName =
"org/jboss/tools/jbpm/wizard/project/sample.bpmn2.template";
+ String fileName =
"org/jboss/tools/jbpm/wizard/project/sample.bpmn.template";
IFolder folder = project.getProject().getFolder("src/main/resources");
- IFile file = folder.getFile("sample.bpmn2");
+ IFile file = folder.getFile("sample.bpmn");
InputStream inputstream =
getClass().getClassLoader().getResourceAsStream(fileName);
if (!file.exists()) {
file.create(inputstream, true, monitor);
} else {
file.setContents(inputstream, true, false, monitor);
}
- fileName = "org/jboss/tools/jbpm/wizard/project/sample.prd.template";
- file = folder.getFile("sample.prd");
- inputstream = getClass().getClassLoader().getResourceAsStream(fileName);
- if (!file.exists()) {
- file.create(inputstream, true, monitor);
- } else {
- file.setContents(inputstream, true, false, monitor);
- }
+// fileName = "org/jboss/tools/jbpm/wizard/project/sample.prd.template";
+// file = folder.getFile("sample.prd");
+// inputstream = getClass().getClassLoader().getResourceAsStream(fileName);
+// if (!file.exists()) {
+// file.create(inputstream, true, monitor);
+// } else {
+// file.setContents(inputstream, true, false, monitor);
+// }
}
/**
Modified:
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/resources/org/jboss/tools/jbpm/wizard/project/ProcessLauncherSample.java.template
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/resources/org/jboss/tools/jbpm/wizard/project/ProcessLauncherSample.java.template 2011-02-03
03:25:40 UTC (rev 28949)
+++
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/resources/org/jboss/tools/jbpm/wizard/project/ProcessLauncherSample.java.template 2011-02-03
04:42:05 UTC (rev 28950)
@@ -1,26 +1,13 @@
package com.sample;
-import java.util.Properties;
-
import org.drools.KnowledgeBase;
-import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
-import org.drools.compiler.BPMN2ProcessFactory;
-import org.drools.compiler.ProcessBuilderFactory;
-import org.drools.impl.EnvironmentFactory;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLogger;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
-import org.drools.marshalling.impl.ProcessMarshallerFactory;
-import org.drools.runtime.KnowledgeSessionConfiguration;
import org.drools.runtime.StatefulKnowledgeSession;
-import org.drools.runtime.process.ProcessRuntimeFactory;
-import org.jbpm.bpmn2.BPMN2ProcessProviderImpl;
-import org.jbpm.marshalling.impl.ProcessMarshallerFactoryServiceImpl;
-import org.jbpm.process.builder.ProcessBuilderFactoryServiceImpl;
-import org.jbpm.process.instance.ProcessRuntimeFactoryServiceImpl;
/**
* This is a sample file to launch a process.
@@ -31,7 +18,7 @@
try {
// load up the knowledge base
KnowledgeBase kbase = readKnowledgeBase();
- StatefulKnowledgeSession ksession = createSession(kbase);
+ StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession,
"test");
// start a new process instance
ksession.startProcess("com.sample.bpmn.hello");
@@ -42,20 +29,9 @@
}
private static KnowledgeBase readKnowledgeBase() throws Exception {
- ProcessBuilderFactory.setProcessBuilderFactoryService(new
ProcessBuilderFactoryServiceImpl());
- ProcessMarshallerFactory.setProcessMarshallerFactoryService(new
ProcessMarshallerFactoryServiceImpl());
- ProcessRuntimeFactory.setProcessRuntimeFactoryService(new
ProcessRuntimeFactoryServiceImpl());
- BPMN2ProcessFactory.setBPMN2ProcessProvider(new BPMN2ProcessProviderImpl());
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
- kbuilder.add(ResourceFactory.newClassPathResource("sample.bpmn2"),
ResourceType.BPMN2);
+ kbuilder.add(ResourceFactory.newClassPathResource("sample.bpmn"),
ResourceType.BPMN2);
return kbuilder.newKnowledgeBase();
}
- private static StatefulKnowledgeSession createSession(KnowledgeBase kbase) {
- Properties properties = new Properties();
- properties.put("drools.processInstanceManagerFactory",
"org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory");
- properties.put("drools.processSignalManagerFactory",
"org.jbpm.process.instance.event.DefaultSignalManagerFactory");
- KnowledgeSessionConfiguration config =
KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
- return kbase.newStatefulKnowledgeSession(config, EnvironmentFactory.newEnvironment());
- }
}
\ No newline at end of file
Added:
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/resources/org/jboss/tools/jbpm/wizard/project/sample.bpmn.template
===================================================================
---
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/resources/org/jboss/tools/jbpm/wizard/project/sample.bpmn.template
(rev 0)
+++
trunk/bpmn/plugins/org.jboss.tools.jbpm/src/main/resources/org/jboss/tools/jbpm/wizard/project/sample.bpmn.template 2011-02-03
04:42:05 UTC (rev 28950)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions id="Definition"
+
targetNamespace="http://www.jboss.org/drools"
+
typeLanguage="http://www.java.com/javaTypes"
+
expressionLanguage="http://www.mvel.org/2.0"
+
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL
BPMN20.xsd"
+
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
+
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
+
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
+
xmlns:tns="http://www.jboss.org/drools">
+
+ <process processType="Private" isExecutable="true"
id="com.sample.bpmn.hello" name="Hello World" >
+
+ <!-- nodes -->
+ <scriptTask id="_2" name="Hello" >
+ <script>System.out.println("Hello World");</script>
+ </scriptTask>
+ <startEvent id="_1" name="StartProcess" />
+ <endEvent id="_3" name="EndProcess" >
+ <terminateEventDefinition/>
+ </endEvent>
+
+ <!-- connections -->
+ <sequenceFlow id="_1-_2" sourceRef="_1"
targetRef="_2" />
+ <sequenceFlow id="_2-_3" sourceRef="_2"
targetRef="_3" />
+
+ </process>
+
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="com.sample.bpmn.hello" >
+ <bpmndi:BPMNShape bpmnElement="_2" >
+ <dc:Bounds x="96" y="16" width="80"
height="48" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape bpmnElement="_1" >
+ <dc:Bounds x="16" y="16" width="48"
height="48" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape bpmnElement="_3" >
+ <dc:Bounds x="206" y="17" width="48"
height="48" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge bpmnElement="_1-_2" >
+ <di:waypoint x="40" y="40" />
+ <di:waypoint x="136" y="40" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge bpmnElement="_2-_3" >
+ <di:waypoint x="136" y="40" />
+ <di:waypoint x="230" y="41" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+
+</definitions>
\ No newline at end of file