JBoss Community

Processing

created by Darin Wilcox in jBPM - View the full discussion

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

Start a new discussion in jBPM at Community