Re: [rules-users] Updating project repositories
by Michael Anstis
I've asked a colleague to comment.
We do manipulate the pom for the UI but should retain original content that
is not modified by the Project Editor.
@Toni... What's your opinion?
Sent on the move
On 20 Mar 2014 18:03, "Joe White" <Joe.White(a)recondotech.com> wrote:
Also, that is the same configuration that is in my settings.xml for my
installed maven instance and the profile is active.
*From:* rules-users-bounces(a)lists.jboss.org [mailto:
rules-users-bounces(a)lists.jboss.org] *On Behalf Of *Joe White
*Sent:* Thursday, March 20, 2014 12:01 PM
*To:* Rules Users List
*Subject:* [rules-users] Updating project repositories
I have updated my repository configuration but when I build and deploy by
package two things happen:
- The jar only gets deployed to my local repo it doesn't go out to
the remote instance
- The pom doesn't contain the full repository configuration when
deployed. The <snapshot> and <releases> config are dropped
Am I missing a piece of config to get the jar pushed out to my remote repo?
*My repository config inside the WB:*
<repositories>
<repository>
<id>recondo-repo</id>
<name>papaafrepo001-releases</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>
http://papaafrepo001.recondo.vci:8081/artifactory/repo</url>
</repository>
</repositories>
*Repo config inside the deployed pom:*
<repositories>
<repository>
<id>recondo-repo</id>
<name>papaafrepo001-releases</name>
<url>http://papaafrepo001.recondo.vci:8081/artifactory/repo</url>
</repository>
</repositories>
Joe White
CIO Technology Enabled Services
303-974-2849 (Office)
720-232-9023 (Cell)
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
11 years, 9 months
Module in Nexus Never Found
by david.berkman
Creating a KieContainer with a ReleaseId to load a jar from a Nexus repo. The
ReleaseId has '-SNAPSHOT' coordinates. I know the jar exists in the repo,
that it can be accessed, and that it contains the appropriate .drl files,
because when I run my project from the command line, using the Maven exec
plugin...
mvn exec:java
...everything is fine, the jar is found and pulled, the artifacts appear in
the local .m2 repo, the rules get loaded, and I'm able to create and use a
KieSession. I can test the rules, and they work. All is well.
If I run my project in any other way, with the 'java ' command whilst
setting the classpath properly, using the Tanukisoft wrapper, etc. every bit
of code runs properly, all necessary jar files are available on the
classpath, but the KieScanner tells me it can't find the jar...
Caused by: java.lang.RuntimeException: Cannot find KieModule:
com.mycompany:mymodule:1.0-SNAPSHOT
at
org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86)
My home directory seems like it's set correctly and is available from
properties as 'user.home', I can see a resolver-status.properties file
created at the proper place in the user's .m2/repository, so something knows
where the repo is, and has access to it. The resolver-status.properties
contains only...
#NOTE: This is an internal implementation file, its format can be changed
without prior notice.
#Fri Mar 21 02:31:03 UTC 2014
maven-metadata-local.xml.lastUpdated=1395369063564
maven-metadata-central.xml.lastUpdated=1395369063955
maven-metadata-central.xml.error=
maven-metadata-local.xml.error=
No luck, unless I use mvn exec:java, and then everything is fine. However,
our normal distribution methodology is not going to allow me to via Maven
this way.
Anyone happen to know what I'm missing so this will work executing the
'java' command? Some jar maven loads during exec that I'm not including as a
dependency? Anything?
All help appreciated,
David
--
View this message in context: http://drools.46999.n3.nabble.com/Module-in-Nexus-Never-Found-tp4028861.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Sliding window "full" length question
by GrantWang
Hi, I found the following statements in Drools document:
"Sliding windows start to match immediately and defining a sliding window
does not imply that the rule has to wait for the sliding window to be "full"
in order to match. For instance, a rule that calculates the average of an
event property on a window:length(10) will start calculating the average
immediately, and it will start at 0 (zero) for no-events, and will update
the average as events arrive one by one."
Would someone please let me know how I can wait for the sliding windows to
be full to match? Our requirement is always use the average reading over at
least 60 seconds.
Thanks!
Grant
--
View this message in context: http://drools.46999.n3.nabble.com/Sliding-window-full-length-question-tp4...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Updating project repositories
by Joe White
I have updated my repository configuration but when I build and deploy by package two things happen:
- The jar only gets deployed to my local repo it doesn't go out to the remote instance
- The pom doesn't contain the full repository configuration when deployed. The <snapshot> and <releases> config are dropped
Am I missing a piece of config to get the jar pushed out to my remote repo?
My repository config inside the WB:
<repositories>
<repository>
<id>recondo-repo</id>
<name>papaafrepo001-releases</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://papaafrepo001.recondo.vci:8081/artifactory/repo</url>
</repository>
</repositories>
Repo config inside the deployed pom:
<repositories>
<repository>
<id>recondo-repo</id>
<name>papaafrepo001-releases</name>
<url>http://papaafrepo001.recondo.vci:8081/artifactory/repo</url>
</repository>
</repositories>
Joe White
CIO Technology Enabled Services
303-974-2849 (Office)
720-232-9023 (Cell)
11 years, 9 months
Programmatically load rules classloader NullPointerException
by GrantWang
Hello,
I was trying to build a kie module and programmatically load DRL rules at
runtime. But I found for any new event type I wanted to monitor, I had to
add "@rule(event)" when I 1st created the module. If I didn't, I would get
the following exception when I tried to updateToVersion. My java file is
also attached. Would some one please let me know what caused my problem? And
anyway to get around this problem? We really need to get the
programmatically loading rules working in our project. Thanks a lot.
PlayGround1.java
<http://drools.46999.n3.nabble.com/file/n4028783/PlayGround1.java>
Exception in thread "main" java.lang.NullPointerException
at
org.drools.core.common.ProjectClassLoader$InternalTypesClassLoader.defineClass(ProjectClassLoader.java:230)
at
org.drools.core.common.ProjectClassLoader.defineType(ProjectClassLoader.java:141)
at
org.drools.core.common.ProjectClassLoader.defineClass(ProjectClassLoader.java:152)
at
org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:191)
at com.some.app.PlayGround1.runRules(PlayGround1.java:72)
at com.some.app.PlayGround1.main(PlayGround1.java:34)
--
View this message in context: http://drools.46999.n3.nabble.com/Programmatically-load-rules-classloader...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 9 months
Multithreaded update of facts in Drools 5.5 - how to ensure that a nested value isn't null
by Per Sterner
Hello,
My question is:
How can I ensure that a nested property isn't null (in a multithreaded
environment)?
This is the rule:
rule "Drools Test3: Concurrency"
dialect "java"
when
$testObj : TestObject(
$ref : subObject,
$ref != null,
$ref.message != null
)
then
System.out.println("Received-04-A: " + $testObj);
end
I am getting the following exception if I try to modify the fact in
different threads.
java.lang.NullPointerException: null
at
ConditionEvaluator8d1e3555e8c34810957bbb1670f51176.evaluate(null:-1)
at
org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:200)
at
org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:157)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:154)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateModifyObject(SingleObjectSinkAdapter.java:68)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateModifyObject(SingleObjectSinkAdapter.java:68)
at
org.drools.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:314)
at
org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:265)
at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:483)
at
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:976)
at
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:949)
at
org.drools.impl.StatefulKnowledgeSessionImpl.update(StatefulKnowledgeSessionImpl.java:284)
[...]
There are two threads running which modify the same reference in a
testobject ("subObject"). They trigger a queued update of the fact.
One solution would be:
- insert the nested object in drools
- and modify the rule:
rule "Drools Test3: Concurrency 2"
dialect "java"
when
$subObj : TestObject(
message != null
)
$testObj : TestObject(
subObject == $subObj
)
then
System.out.println("Received-04-A: " + $testObj);
end
Can I achieve a thread safety differently?
Thanks and regards,
Per Sterner
11 years, 9 months
Confirm the usage of agenda-groups
by djb
Hi all,
Sorry if it seems like this is an old question, but it's hard finding a
simple unambiguous example. It's a stack, right? So I push them on
'backwards'.
I've got 5 groups of rules, and I want the groups to fire in the order I've
described the groups as, below.
I also don't want them to start firing as soon as a fact is inserted, which
is what seems to happen, according to my activation listener.
So, would I do this:
--------------
getAgendaGroup( "last group to fire" ).setFocus();
getAgendaGroup( "second last group to fire" ).setFocus();
getAgendaGroup( "middle group to fire" ).setFocus();
getAgendaGroup( "second group to fire" ).setFocus();
getAgendaGroup( "first group to fire" ).setFocus();
insert(facts)
fireAllRules()
--------------
?
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Confirm-the-usage-of-agenda-groups-tp40...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
Pojos not visible in Guided DT
by Joe White
In the workbench has anybody seen a case where you can create a decision table with the Wizard and it sees your classes. But the non- wizard decision table definition fails? I get this exception when creating a table without using the wizard and none of my objects show up in the dropdown for column definition. If I use the wizard and select my imports everything works as expected.
1. java.lang.NullPointerException: null
2. at org.drools.compiler.kie.builder.impl.KieBuilderSetImpl.registerInitialErrors(KieBuilderSetImpl.java:50) ~[drools-compiler-6.0.1.Final.jar:6.0.1.Final]
3. at org.drools.compiler.kie.builder.impl.KieBuilderSetImpl.<init>(KieBuilderSetImpl.java:42) ~[drools-compiler-.0.1.Final.jar:6.0.1.Final]
4. at org.drools.compiler.kie.builder.impl.KieBuilderImpl.createFileSet(KieBuilderImpl.java:703) ~[drools-compiler-6.0.1.Final.jar:6.0.1.Final]
5. at org.guvnor.common.services.builder.Builder.addResource(Builder.java:245) ~[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final] at org.guvnor.common.services.builder.Builder.updateResource(Builder.java:319) ~[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
6. at org.guvnor.common.services.builder.BuildServiceImpl.updatePackageReso
7. urce(BuildServiceImpl.java:192) ~[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
8. at org.guvnor.common.services.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.updatePackageResource(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java)
9. [guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
10. at org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder$4.run(ResourceChangeIncrementalBuilder.java:237)[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
11. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
12. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
13. at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
14. 2014-03-18 13:31:02,953 [pool-9-thread-8] ERROR null
15. org.guvnor.common.services.shared.exceptions.GenericPortableException: null
16. at org.guvnor.common.services.backend.exceptions.ExceptionUtilities.handleException(ExceptionUtilities.java:24) ~[guvnor-services-api-6.0.1.Final.jar:6.0.1.Final]
17. at org.guvnor.common.services.builder.BuildServiceImpl.updatePackageResource(BuildServiceImpl.java:200) ~[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
18. at org.guvnor.common.services.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.updatePackageResource(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java)~[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
19. at org.guvnor.common.services.builder.ResourceChangeIncrementalBuilder$4.run(ResourceChangeIncrementalBuilder.java:237) ~[guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final]
20. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
21. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
22. at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
11 years, 10 months