How to use process variable's list in a called process?

1
0
-1

I have a process variable 'q_list' that contains a list of questions. I want each question to be answered parallelly by a group of users, so I'm making a new process and call the new process parallelly, and make an iterator that points to q_list.
My question is, how do I access the iterator in the called process, in order to display each question in the called process parallelly (display it in a form)?
Thanks

Comments

Submitted by charles.souillard on Tue, 09/24/2019 - 16:42

Hello,

why don't you use multi instantiation at task level instead of a call activity? This seems a better fit from what I understand.

Charles

Submitted by abizer.lokhandw... on Tue, 09/24/2019 - 16:50

Hey Charles,
For this use case, yes I can use a task instead. I have another use-case where I need to multi-instantiate 3-4 steps (tasks) due to which I'll be using a call activity, how do I send process variable data to my called activity then? Also, how do you use process variables in a form?
Thanks

1 answer

1
+2
-1
This one is the BEST answer!

Hello,

you can defined which data to send and receive by selecting the call activity in your diagram and then going to the properties tab at the bottom and go into "Data to send" and "Data to receive" sections.

Process variables are not meant to be used in forms. This is a major structural choice that has been made. To make your applications and processes sustainable, it is key to make sure you do not mix business logic (processes), data (BDM) and user interfaces (forms and pages). So there is no easy way to use process variables within a UI designed with Bonita and I highly recommend not to do it. From what I understand of your use case, I think you need to design business data in the BDM. Depending on your needs, it could be a single data with 2 columns (question, answer) or several data...

Hope this helps,
Charles

Comments

Submitted by abizer.lokhandw... on Wed, 09/25/2019 - 00:55

Hey,

That makes sense, thanks for making it clear. The questions to be displayed in the form are always constant, only the answer to those questions are variable, and I wanted each question to go to one user. Anyway, storing a question-answer mapping in the BDM would be fine too, this approach worked for me, thanks a ton.

Notifications