Dynamically assigning users to useraction

Sort:
You are not authorized to post a reply.
Author
Messages
Quarantine
Basic Member
Posts: 24
Basic Member

    Hi 

    We have a requirement where the user may require to dynamically reassign a pending user action to another user. We are already using the TimeOut functionality to reassign after 3 days but that is also predefined users or tasks. Is there a way a user can be passed as a variable value to a useraction.

     I was thinking if it would be possible to send the user actor name as the value in reason comments and pass it as a value in next useraction node which will be used to reassign to their selected user rather than the default timeout defined user.

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      If you're assigning your UserAction to a User (instead of a Task), even if you assign that user ID to a variable, once the flow hits the UserAction, it uses the variable value to push to the User's Inbasket and you can't simply change the variable value for reassignment. You can go into the WorkUnit and Add a secondary assignment record for the UserAction, but it would have to be handled outside of the WorkUnit - either manually or by a second flow. If you built this new flow and triggered it with the old and new user values, it should be able to find and add the new user value on any pending approvals (you have to add the new user and delete the old user assignment - you can't change the value).
      David Williams
      Bob Canham
      Veteran Member
      Posts: 217
      Veteran Member
        What if reassignment was an action in the user action? That way, that user action ends, you could update the user variable with the new user it is supposed to go to, and then put it back to the user action node.
        David Williams
        Veteran Member
        Posts: 1127
        Veteran Member
          You can set the Reassign value using a variable, but it seems the need is to do this apart from the TimeOut function. Once the UserAction is initiated you can't change the variable value.
          David Williams
          KyleT
          New Member
          Posts: 2
          New Member

            Couldn't you create an action that was reassign? And have the user doing the reassigning enter the new user in the comments or something similar? And have the reassign process loop back to the initial useraction after an assign node reassigns the variable from the comment? I haven't tried this and am purely speculating. It sounds like you have user interaction involved with the reassignment, so I would think this would be possible.

            Kyle

            David Williams
            Veteran Member
            Posts: 1127
            Veteran Member
              Yes, Kyle, you could do that. I’ve done something similar.
              I guess I assumed the first user was no longer an approver and someone needed to reassign the work - but if the current approver needed to push to a different one, then you can build that as part of the process.
              David Williams
              Quarantine
              Basic Member
              Posts: 24
              Basic Member

                Thanks All, Adding a reassign action seems to have worked. The only quirk seems to be to have to create a single user task to handle cases being reassigned from a task with filters to a single user.

                Quarantine
                Basic Member
                Posts: 24
                Basic Member
                  One more question: how can I check if the user actor id passed is a valid one. Is there a landmark query that i can do to check if the actor passed in variable exists before reassigning to it.
                  Bob Canham
                  Veteran Member
                  Posts: 217
                  Veteran Member
                    Yeah, do a landmark query first, I think it would be the pfiuser business class.
                    You are not authorized to post a reply.