Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

SWITCHYARD-1955: Move to Drools/jBPM modules #647

Merged
merged 1 commit into from

2 participants

@errantepiphany
Collaborator

SWITCHYARD-1955: Move to Drools/jBPM modules
https://issues.jboss.org/browse/SWITCHYARD-1955

@rcernich rcernich merged commit eaa4be1 into from
@errantepiphany errantepiphany deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 3, 2014
  1. @errantepiphany
This page is out of date. Refresh to see the latest.
View
78 bpm/pom.xml
@@ -37,6 +37,54 @@
</delimiters>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>extract-jbpm-orm</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-executor</artifactId>
+ <version>${version.org.jbpm}</version>
+ <type>jar</type>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-human-task-audit</artifactId>
+ <version>${version.org.jbpm}</version>
+ <type>jar</type>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jbpm</groupId>
+ <artifactId>${artifactId.jbpm-human-task-orm}</artifactId>
+ <version>${version.org.jbpm}</version>
+ <type>jar</type>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-kie-services</artifactId>
+ <version>${version.org.jbpm}</version>
+ <type>jar</type>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-persistence-jpa</artifactId>
+ <version>${version.org.jbpm}</version>
+ <type>jar</type>
+ </artifactItem>
+ </artifactItems>
+ <includes>META-INF/*orm.xml</includes>
+ <outputDirectory>${project.build.outputDirectory}</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<dependencies>
@@ -99,4 +147,34 @@
<artifactId>jbpm-workitems</artifactId>
</dependency>
</dependencies>
+ <profiles>
+ <profile>
+ <id>components-bpm-profile-product</id>
+ <activation>
+ <property>
+ <name>switchyard.product</name>
+ </property>
+ </activation>
+ <properties>
+ <artifactId.jbpm-human-task-orm>jbpm-human-task-core</artifactId.jbpm-human-task-orm>
+ </properties>
+ </profile>
+ <profile>
+ <id>components-bpm-profile-community</id>
+ <activation>
+ <property>
+ <name>!switchyard.product</name>
+ </property>
+ </activation>
+ <properties>
+ <artifactId.jbpm-human-task-orm>jbpm-human-task-jpa</artifactId.jbpm-human-task-orm>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-human-task-jpa</artifactId>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
</project>
View
8 common/knowledge/src/main/java/org/switchyard/component/common/knowledge/util/Listeners.java
@@ -25,7 +25,6 @@
import org.kie.api.event.rule.MatchCreatedEvent;
import org.kie.api.event.rule.RuleFlowGroupActivatedEvent;
import org.kie.api.event.rule.RuleRuntimeEventListener;
-import org.kie.api.event.rule.WorkingMemoryEventListener;
import org.kie.api.runtime.KieRuntime;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.StatelessKieSession;
@@ -40,7 +39,6 @@
*
* @author David Ward &lt;<a href="mailto:dward@jboss.org">dward@jboss.org</a>&gt; &copy; 2012 Red Hat Inc.
*/
-@SuppressWarnings("deprecation")
public final class Listeners {
private static final Logger LOG = Logger.getLogger(Listeners.class);
@@ -167,10 +165,10 @@ public static void registerListener(EventListener listener, KieRuntimeEventManag
if (listener instanceof RuleRuntimeEventListener) {
// current (kie)
manager.addEventListener((RuleRuntimeEventListener)listener);
- } else if (listener instanceof WorkingMemoryEventListener) {
- // deprecated (kie)
+ }/* else if (listener instanceof WorkingMemoryEventListener) {
+ // deprecated (kie 6.0) and now removed (kie 6.1)
manager.addEventListener((WorkingMemoryEventListener)listener);
- }/* else if (listener instanceof org.drools.core.event.WorkingMemoryEventListener) {
+ } else if (listener instanceof org.drools.core.event.WorkingMemoryEventListener) {
// legacy (drools)
org.drools.core.event.WorkingMemoryEventListener droolsListener = (org.drools.core.event.WorkingMemoryEventListener)listener;
if (manager instanceof StatelessKnowledgeSessionImpl) {
View
4 rules/src/test/java/org/switchyard/component/rules/config/model/DoStuffRules.java
@@ -13,7 +13,7 @@
*/
package org.switchyard.component.rules.config.model;
-import org.kie.api.event.rule.DebugWorkingMemoryEventListener;
+import org.kie.api.event.rule.DebugRuleRuntimeEventListener;
import org.switchyard.component.common.knowledge.LoggerType;
import org.switchyard.component.common.knowledge.annotation.Channel;
import org.switchyard.component.common.knowledge.annotation.Fault;
@@ -34,7 +34,7 @@
*/
@Rules(
channels=@Channel(name="theName", operation="theOperation", reference="theReference", value=RulesModelTests.TestChannel.class),
- listeners=@Listener(DebugWorkingMemoryEventListener.class),
+ listeners=@Listener(DebugRuleRuntimeEventListener.class),
loggers=@Logger(interval=2000, log="theLog", type=LoggerType.CONSOLE),
manifest=@Manifest(
//container=@Container(baseName="theBase", scan=true, scanInterval=1000, releaseId="theGroupId:theArtifactId:theVersion", sessionName="theSession"),
View
4 rules/src/test/java/org/switchyard/component/rules/config/model/RulesModelTests.java
@@ -27,7 +27,7 @@
import org.junit.Before;
import org.junit.Test;
import org.kie.api.builder.ReleaseId;
-import org.kie.api.event.rule.DebugWorkingMemoryEventListener;
+import org.kie.api.event.rule.DebugRuleRuntimeEventListener;
import org.kie.api.runtime.Channel;
import org.switchyard.common.io.pull.StringPuller;
import org.switchyard.common.io.resource.ResourceDetail;
@@ -130,7 +130,7 @@ private void doTestModel(SwitchYardModel switchyard, String xml, ClassLoader loa
Assert.assertEquals("theOperation", channel.getOperation());
Assert.assertEquals("theReference", channel.getReference());
ListenerModel listener = rules.getListeners().getListeners().get(0);
- Assert.assertEquals(DebugWorkingMemoryEventListener.class, listener.getClazz(loader));
+ Assert.assertEquals(DebugRuleRuntimeEventListener.class, listener.getClazz(loader));
LoggerModel logger = rules.getLoggers().getLoggers().get(0);
Assert.assertEquals(Integer.valueOf(2000), logger.getInterval());
Assert.assertEquals("theLog", logger.getLog());
View
2  rules/src/test/resources/org/switchyard/component/rules/config/model/RulesModelTests-Container.xml
@@ -20,7 +20,7 @@
<channel class="org.switchyard.component.rules.config.model.RulesModelTests$TestChannel" name="theName" operation="theOperation" reference="theReference"/>
</channels>
<listeners>
- <listener class="org.kie.api.event.rule.DebugWorkingMemoryEventListener"/>
+ <listener class="org.kie.api.event.rule.DebugRuleRuntimeEventListener"/>
</listeners>
<loggers>
<logger interval="2000" log="theLog" type="CONSOLE"/>
View
2  rules/src/test/resources/org/switchyard/component/rules/config/model/RulesModelTests-Resources.xml
@@ -20,7 +20,7 @@
<channel class="org.switchyard.component.rules.config.model.RulesModelTests$TestChannel" name="theName" operation="theOperation" reference="theReference"/>
</channels>
<listeners>
- <listener class="org.kie.api.event.rule.DebugWorkingMemoryEventListener"/>
+ <listener class="org.kie.api.event.rule.DebugRuleRuntimeEventListener"/>
</listeners>
<loggers>
<logger interval="2000" log="theLog" type="CONSOLE"/>
Something went wrong with that request. Please try again.