Set-PWDocumentState enhancement

Would it be possible to add an 'Admin Override' option to the 'Set-PWDocumentState' command in PW PowerShell?. This option should only be useable by members of the Administrator group or by using a '-AdminOverride' option

When this function is used on an object managed under the Workflow Rules Engine (WRE) it returns a 58268 error ("Manual change state not allowed. Please use Workflow customization rules to change document state")

Access to this additional option is required for system Administrators to fix problems with WRE where on occasion the rule action times-out and the file is left in the wrong state. This can be caused by a number of things such as large/corrupt files or even a slow network connection.

I know this can be achieved by editing the database entries but I need a managed function that can be configured to achieve the result in a consistent and controlled manner.

Parents Reply
  • If you are trying to invoke a WRE operation with it's conditions/actions you could try the PowerShell module PWPS_WSG and it's cmdlet Invoke-WSGWorkflowCommand. This utilizes the WSG to invoke the WRE server side operation like the Web Connections do from a connected project. If you are trying to change the state of a workflow document outside the WRE operation pathways, for example as an undo function you would be relying on an update to the cmdlet or a workaround such as using a SQL call but I'm not suggesting you do that. If there are enough users asking for an updated cmdlet and it's technically possible to implement with the SDK the developers are normally very helpful in doing so.