Any suggestions on how to collect input from multiple individuals at the same ti

Certified Senior Developer
Any suggestions on how to collect input from multiple individuals at the same time? I have a process that includes a 'survey' type step. I'd like to send a task to a group (at the same time) and have them provide input individually (same input form but each person in the group would be tasked to complete it - and membership could vary). When all (or a set number) have submitted their input (i.e., tasks have been completed) - the process would continue. I'm using the getdistinctusers(topeople(pv!group)) function to assign the task to everyone in a specific group. That seems to work but I get 2 tasks for every person in the group (not sure why). In the 'Other' tab, I selected 'Run one instance for each assignee' at the same time. Each form collects the 'vote' (Y or N) and any feedback (text) in a CDT that is set up as a 'multiple'. When I test it - I get the multiple tasks/assignee but the data saved is just the last data entered. How do I get all re...

OriginalPostID-194377

OriginalPostID-194377

  Discussion posts and replies are publicly visible

  • @judym To the best of my knowledge, that is possible. It depends on how you make configurations in the process. If you are still unclear, please elaborate the design issue and the Appian practitioners would be able to provide the suggestions.

    True, the approach is quiet simple. My idea here was actually to represent an alternate design which looks clean and simple(that is, we don't need a sub-process, an MNI, instance index based operations etc) and also serves you as an additional design criteria as well.
  • Some good suggestions here, I only have a few things to add:

    We accomplish this by using the multiple-valued CDT, each user input task appends to the CDT and sets a 'recordData' variable to true which spawns a separate loop in the model, updating the DS, resetting to false after the loop (old setup). The single value shielded method mentioned above is less of a potential for race conditions however.

    If you are executing the outgoing path (for writes) each time the node is completed, you can run these through a decision node that checks to see if the count or time has elapsed (whenever you want to move along) and end at a non-terminating end event if not. Additionally, place similar logic in a rule exception on your user input tasks, which will bypass any remaining open items once your limits have been reached.

    Note here, if you go the sub process route - place the exception on the user input task within the sub process, there is a product defect that I don't believe is resolved yet where MNI sub processes configured with exception paths will only cancel the first instance instead of all active instances (AN-41986).

    Also to note, regarding the "pass CDT by reference" suggestion above, I would stay away from passing CDTs by reference as it is not best practice - this will cause you issues when the CDT is updated in the future.

  • 0
    Certified Senior Developer
    Great feedback @csteward! Thanks!
  • No problem! However, note in my pseudo-workflow, that exact setup may create multiple flows after exception if multiple tasks are still active at exception time - you will need to adjust according to what setup you settle with (sub process, or not, etc), but the idea is there.
  • 0
    Certified Senior Developer
    Follow up question regarding this issue. Most of this is working but I can’t get the flow to go to the Write to Data Entity node until all ‘votes’ have been submitted. See picture of my process model and explanation below:
    I created this process model (see picture) using a single pv (newItob_cdt) set up to save votes from users that are entered in the first user input form (Enter ITOB Vote). Multiple tasks are launched (1 for each user in a specific group) from this node.
    The Write to ITOB table node is used to record each vote/user.
    The Script Task node adds ‘1’ to pv!count_inc that is checked in the XOR gateway to see if all the individuals in the group submitted votes or if the ‘endtime’ for the survey has been reached.
    The ‘Get data’ node uses a query to pull all the records from the ITOB table and saves the data into pv!newItob_cdt which is displayed in a grid in the last user input node.
    I get the right # of tasks out of the first user input node but only the last user’s input is written to the ITOB table (i.e., the flow never goes to the Write to ITOB table node until all users submitted their votes).
    I did shield the PV (from parallel executions) as @sikhivah suggested and did so on all flows leading up to the XOR and the one that returns to the first user input form.
    Shouldn’t the flow go through each node, return to the first input form node until all votes (or the endTime) is reached? What am I missing?


  • @judym FYI, I am working on this to get you some documentation and high level process in order to make you get on with the use-case. Will do approach you here shortly.
  • I would suggest double-checking the Enter ITOB Vote node settings on the "Other" tab, you will want "Move on when" set to "Each time an instance finishes" for this scenario. Also, unless you want users to loop back to the initial form when they submit their vote, you will want to change the XOR output from the backwards loop to end at a non-terminating End Event.
  • 0
    Certified Senior Developer
    Just changed it to what you suggested and it moves on - but I'm still only getting the last dataset to save. Users aren't looped back if the count = the # of submitted responses. That part seems to work.
  • @judym Please do take a look at the attached documents and further I have included few suggestions in the attached Word document as per the idea I have got with respect to requirements. I would like to suggest to go through it to gain an idea over design and later on you could improvise or modify it on need basis.

    Please feel free to let us know in case if you have any follow up questions or concerns.
  • 0
    Certified Senior Developer
    Thanks @sikhivahans! Taking a look at the document you sent now. How do I reach back to you if I have any other questions without submitting a new technical question?