[rules-users] Setting WorkItem parameter to object in working memory

Mauricio Salatino salaboy at gmail.com
Fri Apr 1 05:45:13 EDT 2011


what about adding the same object that you are inserting in the working
memory as a process parameter?
Are you generating new objects inside your rules and then you want to inject
that inside a work item?
Work Items have their own scope that should be decoupled from the knowledge
session, so you need to find a way to copy the information from the working
memory scope to the work item scope and the first thing that comes into my
mind is to do it in the easiest way that it's to include that information in
the process scope.
Greetings.

2011/4/1 Swindells, Thomas <TSwindells at nds.com>

>  We have a process which runs some rules against items in the working
> memory. We then want to use one of the objects in the working memory as the
> input parameter to a work item.
>
>
>
> The only way I can see to do this is to use a script step to fetch the fact
> from the wm (via a query or whatever) and then set a global, then have the
> global map into the in paramater.  This however seems very messy, scoping
> the variable far larger than it needs to.
>
> Is there a more appropriate solution which doesn’t pollute the global
> variable namespace – perhaps running some code in the work items on entry
> action to populate the parameter directly?
>
>
>
> Thanks,
>
>
>
> Thomas
>
> ------------------------------
>
>
> **************************************************************************************
> This message is confidential and intended only for the addressee. If you
> have received this message in error, please immediately notify the
> postmaster at nds.com and delete it from your system as well as any copies.
> The content of e-mails as well as traffic data may be monitored by NDS for
> employment and security purposes. To protect the environment please do not
> print this e-mail unless necessary.
>
> NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18
> 4EX, United Kingdom. A company registered in England and Wales. Registered
> no. 3080780. VAT no. GB 603 8808 40-00
>
> **************************************************************************************
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar

 - Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110401/c8f9490c/attachment.html 


More information about the rules-users mailing list