With the customizable Extensions enabled, the use of the CancelWorkflow() method can sometimes cause the User Site to display the following:
Error in the application: System error occurred. For more information, view the event log.
Depending on what comes before the use of this method, Password Manager may not gracefully handle the error message thrown by this cancellation.
This has been identified as a product defect and has been assigned a tracking number of TF00488017.
The use of the following code prior to calling the above method will allow Password Manager to handle the error message more gracefully:
$activity.state.ShowUI = $false
Instead of using the CancelWorkflow() method, instead use the ActivitySuccess() method, as follows:
Waiting for fix in a future release of Password Manager.