Variable set in multi-instance sub-process scope issue

7 views
Skip to first unread message

David Goldstein

unread,
Jan 11, 2021, 10:44:59 AM1/11/21
to jBPM Usage

I have a multi-instance sub-process that iterates over an ArrayList of names (eg Joe, Dave) as the "MI Collection input" that correctly uses the iterator to extract an email address from a parallel ArrayList of email addresses (eg JoeE...@email.com, Dave...@email.com) in a script task.

I want to send an email using the Email plugin to the email address extracted (ie to JoeE...@email.com for Joe in the first instance of the sub-process).

However, despite assigning either the "MI Data Output" of the multi-instance sub-process or to a "Process Variable" of the multi-instance sub-process the variable is null after it leaves the script task where it was assigned (and so null at the Email work item).

Where do I define the variable such that it can be used as the email address (ie it exists for the lifetime of the multi-instance sub-process)?  

I am trying to do this entirely within JBPM, as I have many other components in Java and this seems like a JBPM-scope issue.  I have attached JPGs of the two ways I have tried to define the email address and the trivial process.

email process.jpg
as subprocess variable.jpg
set as mi data output.jpg

David Goldstein

unread,
Jan 11, 2021, 12:25:07 PM1/11/21
to jBPM Usage
Even if I set the email address to send to in the Email work item as the "on entry" action, the value is not picked up by the subprocess process variable (see image)
setting in On Enter Action.jpg
Reply all
Reply to author
Forward
0 new messages