DSL parsing List of Strings
by Trägenap
Hi,
how I can define a list in a DSL-file?
So user should define a list of comma separated reations (Strings)in a
DSL-rule-file, like this {"r1","r2","r3"}
This list should be used as parameter for "in"-command.
I always get:
mismatched input '{' expecting ')
no viable alternative at input '{' in rule
DSLR:
when
Reaction appears {"r1","r2","r3"}
DSL:
[condition][]Reaction appears {reactions}=
$interactionrequest : Interactionrequest($state in ({reactions}))
Thanks for advice
Thorsten
15 years, 11 months
Drools Flows on web systems?
by Cristiano Gavião
Hi drools people,
I came from a long desktop-swing development history, and I always
used statefull connections for everything :-). Now, I have to
adventure myself on a web app and I'm learning drools, seam or grails
for that.
With swing examples I could understand well how to use drools... I
got some tests working well.... But now Im getting some difficult to
understand some concepts with web development. But I'll get there some
day :)
I would like to hear from you people about some things on drools that
I couldn't figure out yet.
Suppose that I have a long process with sub-process and lots of
activities. some of this activities should run automatically by the
system and some activated by human hands (by some forms to fill, some
decision to take, etc). A really workflow.... And I want to track
every step on this process and who is the people doing the human
tasks.... This is a job for Drools Flows, right?
What should be the best approach to take for using drools flows on
this kind of system??? Should I use Drools Server or Guvnor or both
for that job?
And about drools sessions, should I always use Stateless sessions with
those servers?
How could I persist the long process flow instances on a web system?
And about processes scopes, for example, one global variable
declarared in a dsl, used by some rule that is running on different
process instances, they share same value?
Can I have a kind of callback like the on PetStore example that came
with stateless sessions?
Thanks in advance for any help or suggestions
_________________________
Cristiano Gavião
15 years, 11 months
Guvnor deployment exception
by Raphael Duarte Paiva
Hi!
I'm using JBoss 4.2.3.GA <http://4.2.3.ga/> via JBoss Tools and when I try
to deploy drools-guvnor.war I get the attached stack trace.
This one draws my attention as it's the stack's base:
Caused by: java.io.FileNotFoundException: repository.xml (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:218)
Where does it try to create the repository.xml file? Is there any way to
modify the path of this file so It would be in a folder with r/w permission
to the user?
Please forgive any grammatical/English errors!
Thanks in advance!
--
Abraços
Raphael Duarte Paiva
Graduando em Ciência da Computação
15 years, 11 months
problem with drules
by niraj manandhar
I have following plan for the free item distribution
purchase of 3 items under a same brands will get 1 gift item free
purchase of 5 items under a same brands will get 2 gift item free
purchase of 10 items under a same brands will get 4 gift item free
now if some buyer buys 13 items then he wil get free ites
4 for first 10
1 for the remaining 3
tell me how to make a drl with this thing'
15 years, 11 months
Guvnor Issues
by Herman Post
Hi,
I've been working with the Model feature in Guvnor 5.M4 and have some questions:
1. Is there a way to delete a fact type once created?
2. When I declare a field as a Date it gets included as a java.lang.Date and
the fact will not validate.
3. If I have created two facts, the one created first cannot reference the
second one as the type of a field. The second on can reference the first. It
would be nice to support this forward -referencing feature.
I'd be happy to enter any of these in Jira if they are not already present
(couldn't find them).
Thanks,
Herm
15 years, 11 months
Regarding BRMS
by Ashish Soni
Hi Mark ,
I am evaluating Drools BRMS for our upcoming projects and have below
questions it would be great if you can help ..
I have created a rules package using BRMS and then trying to execute rules
using below code can you please let me know how i can see the modified
object back.
The Rules is very simple as if the name of the customer is "Ashish' then set
the phone to some value as given in the rule .
public static void main(String[] args) {
Properties properties = new Properties();
try {
properties.load(new
FileInputStream("C:\\Dev\\MyTest\\src\\com\\mytest\\MyRules.properties"));
} catch (IOException e) {
}
RuleAgent ruleAgent = RuleAgent.newRuleAgent(properties);
RuleBase rb = ruleAgent.getRuleBase();
StatefulSession session = rb.newStatefulSession();
session.addEventListener( new DebugAgendaEventListener() );
session.addEventListener( new DebugWorkingMemoryEventListener() );
WorkingMemoryFileLogger logger = new WorkingMemoryFileLogger(
session );
Customer customer = new Customer();
customer.setName("Ashish");
logger.setFileName(
"C:\\Dev\\MyTest\\src\\com\\mytest\\helloworld.txt" );
session.insert(customer);
session.fireAllRules();
logger.writeToDisk();
session.dispose();
Properties File
newInstance=true
url=
http://localhost:8080/drools-jbrms/org.drools.brms.JBRMS/package/AshwinPK...
poll=30
name=MyConfig
Regards,
Ashish soni
15 years, 11 months
Build Packages For Deployment (Guvnor)
by Brad Hadfield
Hi,
I am unable to build packages using guvnor -
Caused by: java.lang.NullPointerException
at
org.drools.compiler.PackageBuilder.validateUniqueRuleNames(PackageBuilder.java:826)
at
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:548)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:287)
Is there another method for creating deployable packages for loading by the
RuleAgent?
I'm using a Properties file stipulated directory (until Guvnor becomes a
little more stable).
Thanks
15 years, 11 months