No variable subsittution in templates under UNIX
by David Green
I have some template driven rules code that runs fine on my PC. When I move
the code to a workstation, the templates generated do not have the templates
parameters replaced with the text of the corresponding variables. While
this seems like it could be a JAR issue, no exceptions are reported. Might
there be a property I need to set? Below is an example of my results on the
workstation. Thanks!
rule "rules for reject 0"
lock-on-active
when
$m : MyReject(
in (
then
end
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/No-variable-subsittut...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Dynamic attribute in Guvnor
by bbarani
Hi,
We have a scenario as below,
Here is what we want to achieve. Let’s say we want to have following rule:
When AssetType = DSTR Then Decision = Granted.
I can have AssetType as static class or attribute in the model. But this may
limit our ability to handle new information. Let’s say now I have rule to
restrict access to a specific metadata asset like:
When AssetID = 8-XXX-1234 and Group<>’HR’ then Decision = Denied.
If we don’t have AssetID, then no one can define that rule until we change
the code. What we really want is if Drools can do something like this:
When DynamicAttribute(“AssetID”) = 8-xxx-1234and Group<>’HR’ then Decision =
Denied.
Any one has implemented anything similar to this before??
Thanks,
BB
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Dynamic-attribute-in-...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Decision Tree input?
by Wilson O Ojwang
All,
Is there something in the works to support Decision Tree Inputs in
addition to Decision Table?
Regards
Wilson
14 years, 5 months
Re: [rules-users] Uploading models to Guvnor
by Zhuk, Yefim
>"Unable to validate package configuration"
This message after uploading a jar file in Guvnor often means that the classes in the jar depend on some library that is not included.
It's hard to say precisely without the jar, but check this possibility (check imports)
I'd recommend to upload a jar with just one-two classes with no extra dependences.
Hope this helps,
Jeff
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Sunday, July 25, 2010 7:43 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 44, Issue 109
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Uploading models to Guvnor (james corrigan)
2. Re: RuleAgents and containers (Pavel Tavoda)
3. Re: Uploading models to Guvnor (Esteban Aliverti)
4. Re: Uploading models to Guvnor (james corrigan)
----------------------------------------------------------------------
Message: 1
Date: Sun, 25 Jul 2010 20:37:23 +0100
From: james corrigan <jamescorrig(a)gmail.com>
Subject: Re: [rules-users] Uploading models to Guvnor
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<AANLkTik8gtw+UddxUpyqJvsMpWSks+32bxnAWpC16or1(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Mark, Esteban,
I recreated the jar and it does contain class files with no manifest file.
It has four classes: Temperature, Room, ServerGUI and Fan - i have included
it. The four appear in Imported types of the package main menu but i still
get the same error when i try to save and validate configuration.
Kind regards,
James.
2010/7/24 Mark Proctor <mproctor(a)codehaus.org>
> normally this means someone uploaded a .jar of .java files, not .class. You
> need to compile the .java files in the .jar.
>
> Mark
>
> On 24/07/2010 22:56, Esteban Aliverti wrote:
>
> Could you please post your jar here?
>
> El jul 24, 2010 4:24 p.m., "james corrigan" <jamescorrig(a)gmail.com>
> escribi?:
>
> Hi All,
> I am having severe amount of trouble trying to get started in Guvnor, i
> cannot load any jar files at all - i can upload them but not use them when i
> try write a guided rule it tells me that no models are loaded even though
> Guvnor is telling me its there.
> I create a new package, then upload my jar file, then i add a category and
> try to save but get the following
> error:
>
> "Unable to validate package configuration (eg, DSLs, models) for
> [Drols]. Suggestion completions may not operate correctly for graphical
> editors for this package."
>
> I am running out of time plus patience trying to get this to work, i have
> been following the book: JBoss Drools Business Rules, and the online
> documentation but to no avail.
>
> Any help is much appreciated.
>
> Kind regards,
> James.
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> _______________________________________________
> rules-users mailing listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
14 years, 5 months
Drools Flow - users authentication.
by tom ska
Hello,
I want to try Drools Flow software (Eclipse plugin works). I have installed
Guvnor. Then I have installed console (two wars). I type
http://localhost:8080/gwt-console/app.html in my web browser. Then I get a
dialog, and I have to authenticate. But I don't know default Username and
Password. As far as I know, I have to create a XML file, and manually create
a user and his pass... Am I right? I use Drools Flow Console v.2.1.
Please help me, and do it slowly and like for no-IT person ;)
Thanks, tom.
14 years, 5 months
Persistence with Drools 5.0.1 (was Persistence with Drools 5.1.0.M2)
by Rory Farrell
Hi, I was trying to get persistence working in Drools 5.1.0.M2 but ran
into some issues:
http://drools-java-rules-engine.46999.n3.nabble.com/Persistence-with-Droo...
I decided to try with 5.0.1 to see if I had any better luck. I ran into
the same problem:
java.lang.NullPointerException
at
org.drools.persistence.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:85)
Line 85 is:
workItemInfo = em.find(WorkItemInfo.class, id);
The JPAWorkItemManager tries to retrieve the EntityManager from the
environment:
EntityManager em = (EntityManager)
this.workingMemory.getEnvironment().get( EnvironmentName.ENTITY_MANAGER );
and the EntityManager is not in the environment.
The EntityManagerFactory is in the environment and I see where the
SingleSessionCommandService class uses the factory to instantiate an
EntityManager, but it never gets put in the environment for the
JPAWorkItemManager to retrieve it.
I was using the UIWorkItemHandler from the example applications. I
wrote a dummy WorkItemHandler to replace the UIWorkItemHandler:
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
Map<String, Object> results = new HashMap<String, Object>();
System.out.println("Before complete work item");
ksession.getWorkItemManager().completeWorkItem(workItem.getId(),
results);
System.out.println("After complete work item");
}
This fixed the NullPointerException but the role flow process was not
detecting that the work item had been completed. I debugged into the
completeWorkItem code and I found that JPAWorkItemManager class called
the ProcessInstance.signalEvent method with "workItemCompleted" but the
WorkflowProcessInstanceImpl.signalEvent method found no eventListeners
for that type.
I can see the eventListeners for "workItemCompleted" and for
"workItemAborted" when I do a ksession.update but the eventListeners are
not there when my WorkItemHandler is called.
This only happens when the flow is resumed from an Event Wait flow by
updating a FactHandle. If the flow goes directly to the Human Task node
then the workItem is completed correctly.
I attached a screenshot of the rule flow. If there are no missing
certification when the process is started then the Human Task is
completed successfully. If there are missing certifications and then
the constraint is satisfied by updating a FactHandle then the workItem
is not completed correctly and the flow does not proceed to sending the
email.
This all works correctly if I don't try to persist the rule flow.
Hopefully someone can provide some insight as to what is going on here.
Regards,
Rory
14 years, 5 months
Guvnor CR1 Serialization Error
by jkoppenhofer
When starting up the new Guvnor CR1 in both Tomcat and the Standalone Guvnor
download, I get the following errors...
2010-07-23 08:53:35,256 INFO
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/drools-guvnor]]
guvnorService: ERROR: The serialization policy file
'/org.drools.guvnor.Guvnor/8C09DDC749E5C9386FC25E9AAE396D31.gwt.rpc' was not
found; did you forget to include it in this deployment?
2010-07-23 08:53:35,256 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/drools-guvnor]]
guvnorService: WARNING: Failed to get the SerializationPolicy
'8C09DDC749E5C9386FC25E9AAE396D31' for module
'http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/'; a legacy,
1.3.3 compatible, serialization policy will be used. You may experience
SerializationExceptions as a result.
Then, whenever I try to create a rule using the graphical wizard, I get a
system error with the following stack trace...
2010-07-23 08:55:29,914 INFO [STDOUT] ERROR 23-07 08:55:29,914
(LoggingHelper.java:error:76) Type
'org.drools.ide.common.client.modeldriven.brl.RuleModel' was not assignable
to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom
field serializer.For security purposes, this type will not be serialized.:
instance = org.drools.ide.common.client.modeldriven.brl.RuleModel@169dc09
com.google.gwt.user.client.rpc.SerializationException: Type
'org.drools.ide.common.client.modeldriven.brl.RuleModel' was not assignable
to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom
field serializer.For security purposes, this type will not be serialized.:
instance = org.drools.ide.common.client.modeldriven.brl.RuleModel@169dc09
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:610)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:534)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:700)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:730)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:612)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:534)
at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:609)
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:467)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:564)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Guvnor-CR1-Serializat...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Exception while using package deployed in drools-guvnor
by Pardeep Ruhil
Hi,
I have created a rule in Drools Guvnor and when I am trying to access it in my code I am getting the below exception.
java.lang.RuntimeException: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:425)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:121)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:110)
at org.ofbiz.drools.event.drool.RuleIntegrate.createKnowledgeBase(RuleIntegrate.java:45)
at org.ofbiz.drools.event.drool.RuleIntegrate.createWorkingMemory(RuleIntegrate.java:29)
at org.ofbiz.payRoll.PayRollTax.callPayRollTaxRule(PayRollTax.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100)
at org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
at org.ofbiz.service.ModelServiceReader$GenericInvokerImpl.runSync(ModelServiceReader.java:761)
at _$gen.file_58$.D_58$.Dev.swapnilcode.ofbiz_45$09_45$July_45$2010.hot_45$deploy.payRoll.servicedef.services_46$xml_35
$payRollTax.runSync(file:/D:/Dev/swapnilcode/ofbiz-09-July-2010/hot-deploy/payRoll/servicedef/services.xml#payRollTax:9)
at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:399)
at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:226)
at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:165)
at org.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:336)
at org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:637)
at org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:383)
at org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:227)
at org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:90)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:271)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1000)
at org.drools.io.impl.UrlResource.grabStream(UrlResource.java:154)
at org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:102)
at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:414)
My changeset.xml file is :
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set drools-change-set-5.0.xsd' >
<add>
<resource source='http://localhost:8441/DroolsGuvenor/org.drools.guvnor.Guvnor/package/payR...' type='PKG' />
</add>
</change-set>
Please help me in this.
Thanks & Regards
Pradeep Ruhil
________________________________
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
______________________________________________________________________
14 years, 5 months
Uploading models to Guvnor
by james corrigan
Hi All,
I am having severe amount of trouble trying to get started in Guvnor, i
cannot load any jar files at all - i can upload them but not use them when i
try write a guided rule it tells me that no models are loaded even though
Guvnor is telling me its there.
I create a new package, then upload my jar file, then i add a category and
try to save but get the following
error:
"Unable to validate package configuration (eg, DSLs, models) for [Drols].
Suggestion completions may not operate correctly for graphical editors for
this package."
I am running out of time plus patience trying to get this to work, i have
been following the book: JBoss Drools Business Rules, and the online
documentation but to no avail.
Any help is much appreciated.
Kind regards,
James.
14 years, 5 months
RuleAgents and containers
by H.C.
Hi,
I am wondering how I would use a RuleAgent when running in a JEE container?
I am looking to monitor rule changes outside of the war/ear. Is that even
possible and how would I do it? Would I map a JNDI name for the change-set
file? Would changes to the rule files the change-set file references be
visible or would only changes to the change-set file itself be picked up?
Thanks for any answers.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/RuleAgents-and-contai...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months