Custom Form with DSL
by bhochhi
I were able to launch the custom form in DSL, however the rule condition is
not mapped to corresponding DRL. I don't know if this is a bug or just
something is missing. my DSL mapping looks like this:
[when]
my dsl is "{varName:CF:MyFactType.fieldName}" =
System.out.println("{varName}")
I have working set created then configured custom form for fieldName. All
things working but rule is not validating. When I check drl source, I found
the mapping is not taking place, its still displaying DSL expression in DRL
source instead of displaying:
System.out.println("values from cf")
Any ideas? I have tried this in guvnor 5.4.0.final and 5.5.beta1
--
View this message in context: http://drools.46999.n3.nabble.com/Custom-Form-with-DSL-tp4020207.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
Error messages are not like the ones described in documentation
by Magnus Vojbacke
MY DROOLS BINARIES VERSIONS:
drools-clips-5.4.0.Final.jar
drools-compiler-5.4.0.Final.jar
drools-core-5.4.0.Final.jar
drools-decisiontables-5.4.0.Final.jar
droolsjbpm-introduction-docs-5.4.0.Final.jdocbook
drools-jsr94-5.4.0.Final.jar
drools-persistence-jpa-5.4.0.Final.jar
drools-templates-5.4.0.Final.jar
drools-verifier-5.4.0.Final.jar
BACKGROUND:
I'm embedding drools in an application.
To test the error handling, I'm trying to import a type that doesn't exist:
import does.not.exist;
When I print out the error messages from KnowledgeBuilder.getErrorMessages() they all look similar to this:
Error importing : 'does.not.exist'
Rule Compilation error : [Rule name='Telnet']
defaultpkg/Rule_Telnet_cdef8401dd054fb59abb4e33b76d12f7.java (2:74) : Only a type can be imported. does.not.exist resolves to a package
I have looked at section 4 - "Error messages" in the drools expert documentation - http://docs.jboss.org/drools/release/5.4.0.Final/drools-expert-docs/html_... to find a description of error messages.
MY QUESTION:
There is an error message format described in the drools expert documentation:
" 1st Block: This area identifies the error code.
2nd Block: Line and column information.
3rd Block: Some text describing the problem.
4th Block: This is the first context. Usually indicates the rule, function, template or query where the error occurred. This block is not mandatory.
5th Block: Identifies the pattern where the error occurred. This block is not mandatory."
Why is my error message not formatted like the documentation describes?
13 years, 3 months
Creating own UI to translate rules in Drools
by benq2188
Hello,
I want to design UI which suggests options to the user for adding,modifying
and deleting rules. Within drools final 5.4.0 version, writing rules in xml
format is depreciated, so I thought to save user input data as rules inside
a .drl file with our own translation from UI. Seems it will take time, we
need to consider creating rules either first degree or n-degree(several
conditions and actions for each rule).
Can anyone suggest a way to deal with it?
Thanks in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/Creating-own-UI-to-translate-rules-in-D...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
Re: [rules-users] Few Questions About using Drools
by benq2188
Hello, wondering that have you found any solution for your requirements?
I want to design UI which suggests options to the user for adding,modifying
and deleting rules. Within drools final 5.4.0 version, writing rules in xml
format is depreciated, so I thought to save user input data as rules inside
a .drl file with our own translation from UI. Seems it will take time, we
need to consider creating rules either first degree or n-degree(several
conditions and actions for each rule).
Any solutions to deal with it?
Thanks in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/Few-Questions-About-using-Drools-tp3007...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
Building our own UI for Drools
by kapokfly
Due to some reasons (for example, build a consistent UI within our own
application, easier to work with our own meta data, don't want SSO etc), we
are considering to build our own UI to generate Drools rule file basing on
the user input via the UI , has anyone tried this before? Is there any
library shipped within Drools Gunvor can be used to be easier to work with
Drools rule syntax?
Thanks,
Ivan
-----
Ivan, your Panda, forever
--
View this message in context: http://drools.46999.n3.nabble.com/Building-our-own-UI-for-Drools-tp350884...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
How to get notified just before rule is picked up for evaluation
by GPatel@tsys.com
Is there a way to get a hook into just before a rule is evaluated to
determine whether an activation is created ?
The earliest hook available is DefaultAgendaEventListener.
activationCreated(ActivationCreatedEvent event)
What I am looking for is to get notified just before a rule is picked up
for evaluation and just after it has been evaluated.
Thanks
Ghanshyam
-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you
13 years, 3 months
Guvnor repository and UNC
by TonyN
Would like to know if anyone has success in setting up the Guvnor repository
to use UNC (\\server\somedir). I am keep getting error
6:01:45,374 INFO [org.drools.guvnor.server.security.SecurityServiceImpl]
(http--129.172.3.58-8080-1) Logging in user [tony]
16:01:45,608 WARN [org.jboss.seam.security.permission.SecurityRuleLoader]
(http--129.172.3.58-8080-1) No security rules configured - rule base
permissions will be unavailable.
16:01:45,952 INFO [org.drools.repository.RulesRepositoryConfigurator]
(http--129.172.3.58-8080-2) Creating an instance of the
RulesRepositoryConfigurator.
16:01:46,124 INFO [org.apache.jackrabbit.core.config.RepositoryConfig]
(http--129.172.3.58-8080-2) Creating repository directory
\\sw-scmapp01i.slb.cal.boeing.com\tcudata01\SDRlink\Tony\guvnor5.4.0
16:01:46,171 INFO [org.apache.jackrabbit.core.config.RepositoryConfig]
(http--129.172.3.58-8080-2) Copying configuration from
vfs:/C:/jboss-as-7.1.1/bin/content/guvnor-5.4.0-Final.war/WEB-INF/lib/jackrabbit-core-2.2.8.jar/org/apache/jackrabbit/core/repository.xml
to
\\sw-scmapp01i.slb.cal.boeing.com\tcudata01\SDRlink\Tony\guvnor5.4.0\repository.xml
16:01:46,280 INFO [org.apache.jackrabbit.core.config.RepositoryConfig]
(http--129.172.3.58-8080-4) Creating repository directory
\\sw-scmapp01i.slb.cal.boeing.com\tcudata01\SDRlink\Tony\guvnor5.4.0
16:01:46,296 ERROR [org.drools.guvnor.server.RepositoryServiceServlet]
(http--129.172.3.58-8080-2) Service method 'public abstract
org.drools.guvnor.client.rpc.Module
org.drools.guvnor.client.rpc.ModuleService.loadGlobalModule()' threw an
unexpected exception: org.jboss.weld.exceptions.WeldException: WELD-000049
Unable to invoke [method] @PostConstruct public
org.drools.guvnor.server.repository.RulesRepositoryManager.createRulesRepository()
on org.drools.guvnor.server.repository.RulesRepositoryManager@16e992d:
org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke
[method] @PostConstruct public
org.drools.guvnor.server.repository.RulesRepositoryManager.createRulesRepository()
on org.drools.guvnor.server.repository.RulesRepositoryManager@16e992d
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-repository-and-UNC-tp4020832.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months
Test if String endsWith()
by Omar Baqueiro
Hello,
I am trying to evaluate certain data with Drools based on the end of a
string. So far, I have got the following mvel based DRL ( My Wrapper class
has the fields (with all their accessors) id, email and list):
---
rule "Check the items of the list and remove the ones that satisfy the
condition"
lock-on-active
when
$wrapper : Wrapper(
id == "itemId",
email.endsWith("@email.com") == true,
$items : list)
$item : Map() from $items
then
$items.remove($item)
end
----
However, when trying to apply this rule, I get the error: no viable
alternative at input '"@gmail.com"' in rule ...".
What is the correct way to test whether a string ends with certain text
(i.e, using the String.endsWith function using MVEL)
Thanks for any help!
--
--
*Omar Baqueiro Espinosa*
Software Engineer |
baqueiro(a)ooyala.com | +52 (33) 3817-0861
www.ooyala.com | blog <http://www.ooyala.com/blog> |
@ooyala<http://www.twitter.com/ooyala>
13 years, 3 months
Problem in Parsing Change-set.xml
by anniejoseph
Hi
I'm using change-set.xml, which pionts to a drl file. While running
change-set.xml I got an exception due to in *space *on the folder name in
the url .
My path for change-set.xml is : ' F:/Rule Testing/rules/change-set.xml ' .
Exception that I got is :
java.lang.RuntimeException: Unable to parse ChangeSet
at
org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentI
mpl.java:448)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgen
tImpl.java:180)
at com.xxx.xxx.xxxxx.xxx.xxxx.<init>(xxxx.java:75)
at com.xxx.xxx.xxxxx.xxx.xxxx.<clinit>(xxxx.java:55)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Unable to get File for url
file:/F:/Rule Testing/rules/change-set.xml
at org.drools.io.impl.UrlResource.getFile(UrlResource.java:246)
at org.drools.io.impl.UrlResource.grabLastMod(UrlResource.java:275)
at
org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:134)
at org.drools.io.impl.UrlResource.getReader(UrlResource.java:214)
at
org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentI
mpl.java:446)
Is there any way to parse change-set.xml ,if it's folder name have space?
Can any one help me to solve my problem?
Thanks & Regards
Annie
--
View this message in context: http://drools.46999.n3.nabble.com/Problem-in-Parsing-Change-set-xml-tp402...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 3 months