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

  • Are you trying to save the responses outside of your sub-process? If yes, then try and save the responses inside the subproc.
  • 0
    Certified Senior Developer
    I am saving them inside the subprocess. I'm actually creating a test scenario with just a vote and feedback being saved. Once I figure it out - I'll make it a subprocess that would be called from the main process.
  • 1. For this part of your problem "That seems to work but I get 2 tasks for every person in the group (not sure why)", I think that you have only 2 users in the group that you have declared. Instead of 'Run one instance for each assignee', use 'Run once instance for each item in <the group>'. Try this. 2. Whatever responses you are getting, are you storing those or appending those to a pv?
  • Try putting your input task (the survery) into a subprocess configured to MNI. Map the output of the subprocess to a pv called singleSurveyResult in the main process. Configure an event listener to listen for a change to pv!singleSurveryResult, when that happens kick off a script task which appends pv!singleSurveyResult to a pv!surveryAllResults which would be an array of your results. Make sure the event listener gets kicked off for every change to the pv!singleSurveyResult and not just once. Also make sure the script tasks deletes previous completed instances. If not you will run into the issue of too many instances of that node if you scale up with the number of users surveyed. Hope this helps!
  • 0
    Certified Senior Developer
    I was storing them to a pv but I thought it would work since the pv is 'multiple'. As for your suggestion @gabriels...I need to digest that a little first. It sounds good but not something I've done before but I'll give it a try. Thank you both!
  • @judym Hi, here goes my suggestions based on your comments:

    >> That seems to work but I get 2 tasks for every person in the group (not sure why)

    Choose 'There should be one-to-one assignment of task instances to assignees' under 'When executing more than once:' section in the 'Assignment' tab of User input task. Else you will continue to see more than 1 task. Please bear in mind that 'When executing more than once:' section will be shown only when you choose 'Show Advanced Options' in the 'Assignment' tab of User input task.


    >> 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 responses saved?

    I would like to suggest to go through the documentation at https://forum.appian.com/suite/help/16.1/Protecting_Process_Variable_Values_in_Parallel_Flows.html and https://forum.appian.com/suite/help/16.1/Process_Variables_and_Parallel_Flows.html to get an idea over how to design in this situation with respect to persisting values.

    For instance, though you are dealing with MNI (that is, one task per person in the group), you don't need an array variable and a subprocess to update the values in the database. If you shield the PV (from parallel executions) properly, a single (that is, non multiple) PV and a simple Write to Data Store Entity (not MNIed) is far more sufficient.

    Offcourse, choosing a multiple PV and thereby a subprocess to make the updates, also works, but it's not the only way. Provided if you are able to implement the Shielding PV from multiple flows concept, your design looks simple and clean from the MNI, intermediate events, subprocess nodes etc.
  • Another good approach^. I actually wasn't aware of PV shielding, thank you for the documentation!
  • Hi Judy, We can do it in one way (MNI), send the tp!instanceIndex as a parameter to the sub process and allow the "Pass as reference" for the CDT / variable.

    Inside the sub process, under outputs node, use the operator "is stored at index" and then populate the response from the user.
  • 0
    Certified Senior Developer
    Thanks @sikhivahans! I'll take a look at that documentation. That sounds like it might be simpler. Will it handle the possibility of an individual NOT responding? I was going to use the option of - continue when 'x' number of completed 'surveys' come in (once the time to complete is reached).