[rules-users] Drools Flow, constraint parametrization

Michal Bali michalbali at gmail.com
Sat Mar 7 10:12:05 EST 2009


I did this, some time ago to access a variable from a split node constraint
(not sure if it still works):

$processInstance : ProcessInstanceImpl( )
VariableScopeInstance(variables["customerLoanRating"] >= 1000) from
$processInstance.getContextInstance(VariableScope.VARIABLE_SCOPE)

You need to insert the process instance into the session.

You may want to look at various examples in examples.zip downloadable from
http://www.jboss.org/drools/downloads.html

On Sat, Mar 7, 2009 at 12:23 PM, Ricardo Gil Alcañiz <rgil at okode.com> wrote:

> Hi,
>
> I'm not a new drools user but I started to test rule flows (5.0M5) recently
> and I'm stucked, so any clue will be welcomed :). I'm testing how to share a
> StatefulKnowledgeSession between N rule flow instances. I'm trying to
> parametrize each instance with process variables at start time but I don't
> know how to use them from rule constraints (in event waits, splits, etc.).
> I've read the documentation and I've found this text related to constraints
> "Both rule and code constraints have access to globals that are defined
> for the process and can reuse imports at the process level." I tried it
> assigning (from an action) a variable value to a global variable but it's
> not working for me. ¿I'm missing something?
>
> Thanks in advance!
>
> Ricardo.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090307/3bb343c6/attachment.html 


More information about the rules-users mailing list