Create users from a list of usernames from DB

Certified Senior Developer

Hi All,

What is the best way to create multiple appian users from a list of usernames from the database (Each record has the necessary information for the user, name, last name, email etc) ? I'm just confused of how to set up the create user node for multiple users in this case.

thanks in advance

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    It'd be best to create a process that accepts the username for a single new user as a parameter (and anything else helpful that you might need pertinent to a single user), then have a parent process that loads the list and calls the subprocess either in a process-loop or using MNI (i.e. a single-node loop, which is easier to setup but slightly harder to monitor / debug in case anything goes weird during testing).

    If you need something more quick/simple/dirty, you could probably call the Create User node itself using MNI, though this would not give you the chance to do username-by-username checks for things such as whether it's eligible for account creation in your environment, post-processing like adding to one or more predetermined group(s), etc.

  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    To create the first option you mentioned, I have parent process that holds list of usernames (with all info required so the cdt for the user basically) right then I have a subprocess that  creates based on that passed  process variable but that variable is multiple it has all users needed to be created , when you say to use the loop is where exactly?

  • +1
    Certified Lead Developer
    in reply to Maria

    You could build a manual loop in process (where you call the subprocess for the first [remaining] entry in the users array, proceed to remove that user from the array, check if there are any more, and if so, loop back to the subprocess again), or use subprocess MNI configuration (accessed in the "other" tab in the subprocess node properties).

Reply Children
No Data