This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Stop/Break Workflow Activity

Hi 

 

I am trying to implement a workflow such that it will stop an attribute from being modified based on the results of a search criteria.

So "If result=x continue workflow";"If result=y stop workflow"

 

The logic I have created to stop the workflow works but the originating action is still pending, which has the effect of "hanging" the target account - anything you try to do to the account fails with the Stop/Break error message.

 

Is there a way of cancelling the original request in a similar way to a "reject" Approval activity would.

 

Thanks

  • What is your exact requirement? can you please explain scenario more in detail?
  • Thanks for responding.

    So I am trying to automate the creation of admin accounts ( ie second privileged AD accounts).

    I have created a VA, that sits on the main account, for the service Desk to select when a user requires an admin account, this triggers a workflow which runs an approval and if approved then creates the account, pulling in the required attributes from the main account. This all works.

    Now I want to enhance the workflow with search and if/else functions to check if the admin account already exists and, 'if not exist' follow the above logic, and 'if exist' send a mail to the originator, cancel the request and stop the workflow. All of this works apart from cancelling the original request. The stop/break does a 'hard stop' but the original task is still pending and 'locks' the web UI.

     

    As I mentioned this seems to me to be the same logic as a Reject command (from an Approval Activity) would need so I thought there may be some way to use powershell to build an automated reject function?

  • I am not sure if the below would help, because in the scenario there isn't a Approval task created for when the admin account exists?

    Get-QARSOperation -TargetObject 'domainName\userName' -OperationID 123-123 -OperationStatus Pending | %{Get-QARSApprovalTask -Operation $_ -ApproverIsMe} | Reject-QARSApprovalTask
  • Hi RoastEM , what condition you are putting in search?
    i have tested in my lab and it works fine. below is the scenario which i have configured and tested, please correct if anything missed;

    1. workflow trigger condition on create user
    2. search activity to find the attribute which is unique for service account(in my case description) - description equals workflow target description
    3. if and else branch 1 - if description of found object equals description of workflow target then activity-send notification and stop/break.
    4. if and else branch 2 - if description of found object dose not equals description of workflow target (do not put any activity here)
    5. outside search activity run approval activity.

     

  • Thanks Prasad

    I think this has confirmed the logic I am using. The only difference is that I am triggering the WF on an VA flag. The issue I think I am having is the webUI caching the request.

    If I select the VA the WF triggers and I get the message from the stop/break activity. If I then select Exit on that User Account and reopen the VA is in its original state. However if I don't exit and try to do any admin on the account, then the browser seems to keep trying to update the VA and hangs.

    Thanks for your help