Searching by user ID on the user record

I was reading this link: https://docs.appian.com/suite/help/17.3/User_Management.html#-add-user-filters and didn't find the answer to my question. I would like to be able to search by user ID. Is there any way to do so?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to John Stretton

    I don't have such a process at hand, but it shouldn't be terribly hard to create from scratch.  A few checklist items I can think of:

    1. Create a subprocess that handles all of the actual "work" involved
    2. Create a parent process that's launched by a timer, i.e. daily at 1 AM, calling the subprocess from step 1
    3. In the main subprocess,
      1. call the "get users from group" function on a group that you set up to contain all applicable [active] users (such as all users in the system, or all users that meet certain criteria) by rule; save an array (PV) of usernames or "user" type
      2. query all users from your DB users table (active and inactive), save into a separate PV
      3. check for 3 subsets:
        1. Appian user accounts that don't exist in the DB
          1. for these, create a new DB entry
        2. Appian user accounts that are in the DB but are marked as deactivated
          1. for these, the DB entry would need to be marked as active again
        3. DB entries that are marked as active but not currently found in the users array
          1. for these, the user has presumably gotten deactivated, so the DB entry would need to be marked as deactivated
      4. for the above step, i recommend feeding both the user array as well as db-queried CDT into one big expression rule which will then spit out a CDT array of just the needed changed DB entries (we're assuming that the Appian user accounts and their current states are the "source of truth").  This will make it incredibly easier to both develop as well as debug and test.
      5. Write all modified DB entries to the DB table.
    4. Optionally create an independent parent process that will also invoke the main subprocess but which can be kicked off by an admin, on an ad-hoc basis, if a midday update is needed, etc.  This will have potential performance implications (especially if there are tons of users) but could be helpful if there is an occasional urgent need to allow them to update the DB immediately after a user change.

    Let me know if any of that is unclear or if there are any other questions.  This was all off the top of my head so I may have glossed over something.

  • Makes sense, but this is one of those things that is unlikely to make it to the top of my to-do list if I have to make it from scratch. Also, don't you wish that there were a better way to handle scheduling processes to run on a timer?

  • 0
    Certified Lead Developer
    in reply to John Stretton
    Also, don't you wish that there were a better way to handle scheduling processes to run on a timer?

    I'm quick to call out Appian in areas that I feel they need to improve, but as far as pure use cases like running a maintenance process once per day overnight, I feel it's fairly easy to do once you get used to the necessary controls. 

    The one thing I wish we could do, though, would be to set up process triggers based on internal events (like, "run this process every time a user is created, updated or deactivated via any internal mechanism", which would negate the need for a timer in most cases).  But alas, I don't anticipate that happening any time soon.

  • Sure, but I have a LOT of processes that just send some kind of email once per day, or every other Tuesday, or once per month, etc. Having to create two separate process models for that (and a Boolean flag to avoid firing an instance of the timer process when it's published) is a bit cumbersome, don't you think?

  • 0
    Certified Lead Developer
    in reply to John Stretton

    IF you really wanted to, you could potentially configure all (or most) of those use cases into one "daily launch" process model, which then calls various subprocesses (themselves not having any sort of timer), which could each do a double-check whether they should A) not fire "today" (and just exit), B) fire at a later time (wait at a timer node, then execute), or C) execute right away (stuff that should happen at 1 AM).

    I mean, I suppose they could simplify it some, but then we'd likely lose some of the more complex capabilities we currently have.

  • Thanks for all of your suggestions. I'll file the user table one away for a rainy day.