State management in Guvnor
by Ambika Goel
Hi All,
What is the significance of Status in Guvnor. I have added multiple statuses like Production, Testing etc.
How can I use it to differentiate between rules. I want to run only the rules under production status. How to do it
16 years, 5 months
Re: [rules-users] Drools Flow Persistence Doubt
by Jesper S. Knudsen
Hi Pardeep
I think you are using the wrong syntax in your QL
Should it not be:
select object(v) from VariableInstanceInfo as v where
v.processInstanceInfo.id = :processId
like in ejbql?
Best regards
Jesper
Pardeep.Ruhil(a)lntinfotech.com skrev:
>
> Hi Mauricio,
> Thanks for your reply.
> When I try to run the demo project with configuration to work with
Mysql, I got this exception when I uncommented the the named-query in
orm.xml
> </query>
> select
> v
> from
> VariableInstanceInfo v
> where
> v.processInstanceInfo.id = :processId
> </query>
>
> SEVERE: Error in named query: VariableInstancesInfoByProcessId
> org.hibernate.QueryException: could not resolve property:
processInstanceInfo of:
org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo
[select v from
org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo
v where v.processInstanceInfo.id = :processId]
> at
org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:67)
> at
org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:61)
> at
org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1385)
> at
org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:302)
>
> Please help me resolve to this exception.
> Am i doing something wrong?
>
> Thanks & Regards
>
> Pardeep Ruhil
>
>
>
> if you take a look at this post:
> http://blog.athico.com/2009/09/drools-flow-variable-persistence.html
>
> you will see that there is a demo project with the configuration to work
> with MySQL.
> Greetings.
>
> 2009/10/7 <Pardeep.Ruhil(a)lntinfotech.com>
>
> >
> > Hi,
> > I have doubt regarding persistence in Drools.
> > I read the documentation of persistence in Drools Flow and got to know
that
> > it uses hibernate with H2 database as default.
> > My doubt is if I want to use Mysql database, then I want to know which
are
> > the tables that I need to create in the database or
> > Is their any code written which automatically creates the tables in the
> > schema in Mysql database.
> >
> > Also is their any document present for configuring Mysql database.
> > Please help me to get through the situation.
> >
> > Thanks & Regards
> >
> > Pardeep Ruhil
> > _________________
>
>
>
> ______________________________________________________________________
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
16 years, 5 months
Re: [rules-users] Drools Flow Persistence Doubt
by Pardeep.Ruhil@lntinfotech.com
Hi Mauricio,
Thanks for your reply.
When I try to run the demo project with configuration to work with Mysql,
I got this exception when I uncommented the the named-query in orm.xml
</query>
select
v
from
VariableInstanceInfo v
where
v.processInstanceInfo.id = :processId
</query>
SEVERE: Error in named query: VariableInstancesInfoByProcessId
org.hibernate.QueryException: could not resolve property:
processInstanceInfo of:
org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo
[select v from
org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo
v where v.processInstanceInfo.id = :processId]
at
org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(
AbstractPropertyMapping.java:67)
at org.hibernate.persister.entity.AbstractPropertyMapping.toType(
AbstractPropertyMapping.java:61)
at org.hibernate.persister.entity.AbstractEntityPersister.toType(
AbstractEntityPersister.java:1385)
at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(
FromElementType.java:302)
Please help me resolve to this exception.
Am i doing something wrong?
Thanks & Regards
Pardeep Ruhil
if you take a look at this post:
http://blog.athico.com/2009/09/drools-flow-variable-persistence.html
you will see that there is a demo project with the configuration to work
with MySQL.
Greetings.
2009/10/7 <Pardeep.Ruhil(a)lntinfotech.com>
>
> Hi,
> I have doubt regarding persistence in Drools.
> I read the documentation of persistence in Drools Flow and got to know
that
> it uses hibernate with H2 database as default.
> My doubt is if I want to use Mysql database, then I want to know which
are
> the tables that I need to create in the database or
> Is their any code written which automatically creates the tables in the
> schema in Mysql database.
>
> Also is their any document present for configuring Mysql database.
> Please help me to get through the situation.
>
> Thanks & Regards
>
> Pardeep Ruhil
> _________________
______________________________________________________________________
16 years, 5 months
Ctrl + space + enter ERASE ALL LINE? BROKEN? * DROOLS 5.0.1 Context assist*
by mehdi bennani
Hi guys,
I have been using drools 4 for couple of months now and I am starting to get the hang of it. We recently decided to move to Dools 5 with Eclipse 3.4.2 (Ganymede).
We unfortunately hit a major 'show stopper' (for us at least). In the DSLR editor: Context Assist + space + enter removes/replaces the whole line, not only the place holder.
In other words:
DSL:
[*][]Log : {msg}=System.out.println("{msg}");
[*][]id1="some id label"
DSLR:
rule "MyRule"
when
then
end
In my DSLR, If I Press L then control space --> the line Log:{msg} appears in the context menu. Hit enter I get
Log :{msg}
Now, If want to replace msg by id1. I position the cursor in the _{msg}, hit ctrl space, id1 shows in the list.
I hit enter the whole line is replaced, hence I am left with
id1
instead of
Log : id1
Is this a setting somewhere in eclipse itself?? I doubt it but maybe...
The same thing use to work 'as expected' in Drools 4. Is this a bug?
thanks.
/elextra
16 years, 5 months
Uses of timer node
by Renato Herebia
Hi!
I'm testing the timer node and I did a simple flow with start node, action
node (System.out.println("action node 1");),
a timer node, other action node (System.out.println("action node 2");) and
the end node. When the process start,
the first action node is triggered, after that, the timer node is activated
and don't pass for the next action node after
the delay time programmed.
Has any configuration to do when working with timer nodes (handlers, etc.)?
Someone has a simple example like
this I'm testing?
Thanks!
--
Renato Herebia
16 years, 5 months
[droolsflow] Constraint Editor
by Anderson vasconcelos
I have a flow that user (Human Task) can choose two ways: Valid Ticket and
Invalid Ticket
To pass to valid way, i used a MinataskClient.Complete and it works.
But to go to invalid way, i try to used MinaTaskClient.fail, but this
command not continue my task.
My question is:
1) Whats the bast way to invalidade a ticket and finish the flow?
2) Its possible to get the task inside Split Constaint? (I think in this
possibility. I get the task and check if it status=='FAILED')
Thanks
16 years, 5 months
[droolsflow] ForEach usage - Version 5.1.0
by Anderson vasconcelos
Hi All
To use a ForEach element i need to access a collection inside my
FactObject. (FactObject.list)
I tried to call FactObject.list inside a CollectionExpressions but this
fail. (Just ok with list defined as a process variable)
*So i do something thats a consider a workaround:*
1- I Create a '"Action Node" before a "ForEach Node"
2-In the "Action Node", i get the FactObject and populate the process
variable that represents FactObject.list :
*FactObject factObject =
(FactObject)drools.getKnowledgeRuntime().getObjects(new
ClassObjectFilter(FactObject.class)).iterator().next();
context.setVariable("list", factObject.getDefeitos());*
3- And on the "Foreach node" i just passed the "list" in the
CollectionExpressions
This is the correct way to do this? Has a better way to get FactObject.list
to use on "For Each Node"?
On Eclipse, the CollectionExpression of forEach don't have a window (Like
Action Editor) to put a MVEL/Java expressions. I think this is a interesting
resource.
16 years, 5 months
Help with Drools Flow
by Nair, Mahesh
Hi,
I have recently started with Drools flows . I am having some trouble using the ruleFlowGroup node.
The way I understood the user guide is that when the flow reaches a ruleFlowGroup the engine will start firing rules associated to the specific rule flow group . But when I try what I see is that the call to the startProcess returns when it reaches a ruleFlowGroup node. The audit logs show that the RuleFlowGroup is activated.
After the return when I explicitly call a fireAllRules the rule group seems to get executed and the flow moves on to the subsequent nodes.
What is the expected behavior? Will the rules start executing automatically when a ruleFlowGroup node is reached or do you have to call fire all rules explicitly?
I am using drools 5
thanks in advance
Mahesh
16 years, 5 months
For each - properties
by Betto Bardi
Hello,
I have been experimenting with the for each loop in Drools Flow, but I cannot get it to work. This is because I don't know how to specify the properties of this node. Could you please have a look at the attached sample and point me in the right direction on how to specify these properties? I'm struggling mainly with the properties: CollectionExpression and Variable Name (marked red in the attached file: screenshot.jpg).
As you can see in the attached file DroolsTest.java my domain model is simple. There are two entities, Person and Loan. A Person can have zero or more Loans. The for each construction in the flow file should execute some rule for each Loan belonging to a Person.
I appreciate your help.
Thanks,
Betto Bardi
16 years, 5 months