Hi,
I am looking to set up this configuration in Appian and I'm not sure how to approach this. I am designing a task manager application where a single task can be assigned to multiple people. So in the interface form, it will list generic task details such as task name, description, due date, and who the task needs to be assigned to. If I assign it to Alice, Bob, and Charlie, then I want to create three tasks with each one assigned to each individual.
<Interface form>
Create a single task to "Do Laundry" and assign to Alice, Bob, Charlie.
<Data store>
1 - Do Laundry - Alice
2 - Do Laundry - Bob
3 - Do Laundry - Charlie
This way I can see if each person has done their task. I assume I need to use a for each loop somewhere in the process model? How do I code this in the process model to create X number of tasks and write X number of records?
Discussion posts and replies are publicly visible
Use Multiple Node Instances (MNI) on the User Input Task, with a process variable pv!assignees (multiple users). Configure the task to run one instance for each assignee so Alice, Bob, and Charlie each get their own task, then use a Write_To_Data_Store/Write_Record (with forEach over pv!assignees) to insert one record per assignee.
Thanks for the explanation. I have a question on the execution. Currently, I have a RI variable from the interface which contains all the fields and another RI variable to collect the Task Assignees (multiple).
In the <Parent> Process Model, I created two variables, pv!TASK_RI (RecordType) and pv!TaskAssignees (User or Group)(multiple). I set up the Subprocess node to pass these variables to the <Child> Process Model. The Subprocess node has (MNI) selected and will run one instance for each item in pv!TaskAssignees.
In the <Child> Process Model, In the Write Records node, how do I combine both variables into one variable to be added to the RecordType? Under Configure Write Records, in the Setup tab, I selected the TASK_RI. But the Task assignee is not in the RI group. It's in pv!TaskAsignee.
Do I need to write an expression to combine the RI and pv variable together before it gets inserted into the recordtype? I hope my explanation is clear..