Custom activity - Send the user to the "logging" page.

Hello everyone,

 

I'm new with Password Manager, custom activities and scripts.

I want to do a script to cancel the access of the disabled users at the beginning of the workflow and, at the same time, send them to the first page, where they will have to join again with another user.

 

This is the part of the script where I want to do this:

function PreLoad($workflow, $activity) {

        $Disabled = $workflow.UserInfo.AccountInfo.AccountDisabled

        if ($Disabled -like "True") {

            $activity.Runtime.Controls["enabled"].hidden = "True"

            $activity.Runtime.Controls["title"].hidden = "True"
            $workflow.ActivityFailure()

        }else{

            $activity.Runtime.Controls["disabled"].hidden = "True"

            $activity.Runtime.Controls["title"].hidden = "True"

       }

}

I tried with ActivityFailure method,  WorkflowContext.Cancel method and activity.State.IsFailure. Probably i'm doing something wrong.

Can someone help me with this?

 

Parents Reply Children
No Data