[jboss-user] [jBPM] - Re: Rules Accessing ArrayList as Process Parameters
Maciej Swiderski
do-not-reply at jboss.com
Mon Dec 19 13:42:39 EST 2011
Maciej Swiderski [http://community.jboss.org/people/swiderski.maciej] created the discussion
"Re: Rules Accessing ArrayList as Process Parameters"
To view the discussion, visit: http://community.jboss.org/message/642306#642306
--------------------------------------------------------------
Darin, after spending some time on this issue I came up with following (that seems to be working fine):
package org.zoikks.drools
import java.util.ArrayList;
import java.util.List;
import org.drools.runtime.process.WorkflowProcessInstance;
rule "Sample Rule"
ruleflow-group "testgroup"
when
$process : WorkflowProcessInstance()
$a: ArrayList()
from collect( String() from $process.getVariable("arrayList"))
then
System.out.println("Sample Rule run successfully.");
System.out.println("Count: " + $a.size());
end
Somehow $process.getVariable() returns strings instead of entire array list.
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/642306#642306]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111219/c2f52622/attachment.html
More information about the jboss-user
mailing list