Multi-Iteration agree in the diagram

Hello Everybody !
There is a User Task on which you can enter a comment and a list of Assignees for additional agree. If the list of users for additional agree is not empty, the task is assigned to each of them. Each of these new users can also enter their comment and (optionally) a list of users for additional agree.
The process ends after several iterations when all users have completed their tasks.
How can this process be better displayed and processed on a diagram?
My vision is shown in the following diagram:

Original prototype for Modeler 5.23.0 (Camunda 8.5) is here:
Recursion_Agreement_v03.bpmn (11.2 KB)

When I entered the list of users like: {"name":"user03"},{"name":"user04"} and {"name":"user07"},{"name":"user08"}
I received the result:
["{\"name\":\"user03\"},{\"name\":\"user04\"}","{\"name\":\"user07\"},{\"name\":\"user08\"}"]
How to transform it to the correct JSON Array like:
[{"name":"user03"},{"name":"user04"},{"name":"user07"},{"name":"user08"}]
I tried to use FEEL Expression like: replace(SourceString1, pattern1, replacement1) to replace “\"\{” to “\{”, but it works fine for string only, not for array.
I can convert array to string and make a replacement: replace(string(SourceString1), pattern1, replacement1), but I don’t know how to convert result string to array back.
Maybe somebody can give me advice ?
Or maybe my Task with Multi-Iteration agree can be done with another (better) diagram solution ?

Hi @volodya327,

I made a few changes to have a working example.

Attached is the modified version
Recursion_Agreement_v03.bpmn (11.3 KB)

2 Likes

Hi, @hassang !

Wow, thanks for your help !
Modified version of diagram works fine ! This is important result for me.
But it works well only for one additional assignee. Is it possible to add a List of users for additional agree ?

Yes, you can use a dynamic list

Projection is applied

https://docs.camunda.io/docs/components/modeler/feel/language-guide/feel-context-expressions/#projection

flatten function is used

https://docs.camunda.io/docs/components/modeler/feel/builtin-functions/feel-built-in-functions-list/#flattenlist

Kindly find a full working modified version
Recursion_Agreement_v03.bpmn (11.8 KB)

2 Likes

Hello, @hassang !
Thank you very much for you time and for your cool solutions !
It works as expected !
It’s amazing, it’s amazing all that you can do :smiley:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.