Re: [rules-users] Calling RuleSet from a Function/Another Rule

2013-11-12 Thread Lance Leverich
Hi Ayon,
I'm not personally familiar with Blaze, but I can tell you that in Drools,
rules are not something that you "call". In Drools, rules are evaluated
whenever the facts in your WorkingMemory change; and the consequences are
executed according to agenda/rule-flow group, and salience settings.

When the consequence of a rule introduces changes (adds a new fact, updates
an existing fact, removes/retracts an existing fact) to the WorkingMemory,
the rules that may be affected by that change are re-evaluated. Any new
consequences are scheduled for execution, based upon the agenda/rule-flow
group and/or salience settings. Any previously scheduled consequences may
also be removed from the schedule, if the rule which caused them to be
scheduled is no longer true.

All of that said, if what you are wanting to accomplish is controlling the
order of when consequences are executed then you should learn more about
agendas, rule-flow groups, and salience. Otherwise, in order to cause a
rule's consequences to execute, you should make sure your facts support the
rule.

Hope this helps,
Lance Leverich
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Fully qualified name for generated classes

2013-09-04 Thread Lance Leverich
The issue isn't that Foo cannot be resolved, as it was imported into both
packages from the Global Area. The packages compile just fine. I believe
what might be happening, though, is that each package is creating its own
version of Foo.
For example, am I experiencing something like...
com.mypkg.a generates a class with a fully qualified name of
drools.com.mypkg.a.Foo
com.mypkg.b generates a class with a fully qualified name of
drools.com.mypkg.b.Foo
?

If this is the case, is there someway within Guvnor to refer to a
particular version? I'm beginning to think that my best option might be to
create a POJO and import it. At least that way, I can make sure I know the
fully qualified (i.e. canonical) class name.

~ Lance


Cc:
> Date: Wed, 4 Sep 2013 15:41:55 +0100
> Subject: Re: [rules-users] Fully qualified name for generated classes
> Guvnor's Global Area has no affect on fully qualified type names; it's
> just a container for things you want to share.
>
> If Foo could not be resolved in myRuleB the rule would fail to compile.
>
> What do you observations show if you don't have any rule flow?
>
>
> On 4 September 2013 15:28, Lance Leverich wrote:
>
>> What would be the fully qualified name for a generated class, that is
>> based upon a fact type (for example a type named "Foo") that is defined
>> inside a declarative model?
>> How is the fully qualified name affected if the model resides in the
>> Global Area, and is imported into multiple packages?
>>
>> The reason for my question is that I have the following issue:
>>
>> In the Global Area, I have a declarative model (named MyModel) with a
>> definition like...
>>declare Foo
>>   bar: String
>>   version: String
>>end
>>
>> In a package (com.mypkg.a), I have imported MyModel from the Global Area.
>> I have a rule like...
>>
>>rule "myRuleA"
>>ruleflow-group "firstGroup"
>>when
>>   not Foo( bar=="bar" )
>>then
>>   Foo fact = new Foo();
>>   fact.setBar("bar");
>>   fact.setVersion("1");
>>   insert(fact);
>>
>> In another package (com.mypkg.b), I have also imported MyModel from the
>> Global Area. I have a rule like
>>
>>rule "myRuleB"
>>   ruleflow-group "secondGroup"
>>   when
>>  Foo()
>>   then
>>  System.out.println("got at least one Foo");
>>
>> Looking at logs, the rule myRuleA fires as is appropriate; however, the
>> rule myRuleB does not fire, even though both ruleflow groups are
>> represented in the ruleflow. I have verified that both of the ruleflow
>> groups are activated, using the logs. My best guess at this point is that
>> the class generated for fact type Foo is different for each package. So,
>> how can I make sure that I am instantiating and checking for the same type
>> across packages?
>>
>>
>>
>> Lance Leverich
>>
>> ___
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Fully qualified name for generated classes

2013-09-04 Thread Lance Leverich
What would be the fully qualified name for a generated class, that is based
upon a fact type (for example a type named "Foo") that is defined inside a
declarative model?
How is the fully qualified name affected if the model resides in the Global
Area, and is imported into multiple packages?

The reason for my question is that I have the following issue:

In the Global Area, I have a declarative model (named MyModel) with a
definition like...
   declare Foo
  bar: String
  version: String
   end

In a package (com.mypkg.a), I have imported MyModel from the Global Area. I
have a rule like...

   rule "myRuleA"
   ruleflow-group "firstGroup"
   when
  not Foo( bar=="bar" )
   then
  Foo fact = new Foo();
  fact.setBar("bar");
  fact.setVersion("1");
  insert(fact);

In another package (com.mypkg.b), I have also imported MyModel from the
Global Area. I have a rule like

   rule "myRuleB"
  ruleflow-group "secondGroup"
  when
 Foo()
  then
 System.out.println("got at least one Foo");

Looking at logs, the rule myRuleA fires as is appropriate; however, the
rule myRuleB does not fire, even though both ruleflow groups are
represented in the ruleflow. I have verified that both of the ruleflow
groups are activated, using the logs. My best guess at this point is that
the class generated for fact type Foo is different for each package. So,
how can I make sure that I am instantiating and checking for the same type
across packages?



Lance Leverich
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Restricting the items included in a snapshot

2013-05-07 Thread Lance Leverich
I am aware of how Guvnor can be told to only include assets with a given
state, during the build process. What I haven't been able to figure out is
a way to tell Guvnor to only include the items that were part of the latest
build, when creating a snapshot. Is there a way to do this? I am using
Guvnor 5.3.5.Final.

~ Lance
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Designer for Guvnor 5.3.5

2013-04-22 Thread Lance Leverich
Can anyone point me to where I can find the jBPM designer tool for use
within Guvnor v5.3.5? Instead of getting a download option, all we get is
the error message telling us that Guvnor couldn't find the designer tool.

~ Lance
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Upgrade options and considerations

2013-04-11 Thread Lance Leverich
My company started out using Drools/Guvnor v5.1.1, for a single
product/project. Later, we decided to start building an enterprise oriented
service, which was partially completed and is based upon Drools/Guvnor
v5.3.0.

Recently, the decision has been made to get all of our Drools/Guvnor
instances running the same version. I ran into issues (mostly related to
dependencies and the use of rule-flows) when I initially attempted to just
get everything running on v5.3.0. But those issues seem to have all gone
away when I replaced my rule-flows with BPMN's and moved everything to a
v5.3.5 instance.

My question, for this group, is whether there are good reasons to move even
further forward and upgrade everything to v5.4.x? If so, what might those
reasons be? Are there any known, significant, issues in one or more of the
5.4 versions? Is there any consensus on which patch version of the 5.4 tree
would be best? I have already been told by upper management that they would
not support moving to v5.5.x, so that's not even on the table.

Any feedback would be appreciated.

Lance Leverich
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users