[jboss-user] [jBPM] - Processing
Darin Wilcox
do-not-reply at jboss.com
Thu Dec 15 17:29:32 EST 2011
Darin Wilcox [http://community.jboss.org/people/zoikks] created the discussion
"Processing"
To view the discussion, visit: http://community.jboss.org/message/641864#641864
--------------------------------------------------------------
Hello,
I am using jBPM 5.1.0.Final to execute some processes. I started a process with parameters where one of the parameters is an ArrayList<?> named "itemList". I'm trying to access the "itemList" from within a rule using the following syntax:
when
$process : WorkflowProcessInstance()
$a : ArrayList() from ((ArrayList)$process.getVariable("arrayList"))
then
System.out.println("Size: " + $a.size());
However, the condition never seems to be true when I use an ArrayList (I assume the same thing would happen using any object that implements Collection). I have used other singular objects such as String without a problem and read it properly from the process in the condition portion. Additionally, the arrayList object is accessible in the consequence as long I don't check for it in the condition.
Can anyone tell me why the ArrayList cannot be read from the process parameters in the condition portion of a rule?
Are there any options to this scenario other than loading the elements from the ArrayList into working memory and running a "from collect" on them?
I have attached code that demonstrates the issue.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641864#641864]
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/20111215/31a410ce/attachment.html
More information about the jboss-user
mailing list