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
  • I'm getting some strange behaviour with Set-PWDocumentState. PWPS_DAB version = 1.5.15.0.

    I have a workflow and have bounced a file along to 'Checking' state with a 'CAD' account. I then logged in as an 'Engineer' account to bounce it along from 'Checking' to 'Package Shared'. At this stage, if this is done through PWE, one of the checks that WRE does is the suitability code (BS 1192) to make sure it's not at S0, with a NOT_EQUAL_TO call. Also, the minor rev gets dropped (P01.1 -> P01) amongst other things. This does not happen if I do this through the PS commandline. The file happily bounces along to 'Package Shared' state, with no intervention by the WRE.

    # Log in with test accoiunt capable of moving to next state in workflow

    New-PWLogin -NonAdminLogin -LoadWRE

    $doc = Get-PwDocumentsBySearch -DocumentName 'Some-Doc-Name-Number' -GetAttributes

    # File is at 'Checking' state

    $doc | Set-PWdocumentState -State 'Package Shared'

    It seems like the LoadWRE switch is getting ignored completely

Reply
  • I'm getting some strange behaviour with Set-PWDocumentState. PWPS_DAB version = 1.5.15.0.

    I have a workflow and have bounced a file along to 'Checking' state with a 'CAD' account. I then logged in as an 'Engineer' account to bounce it along from 'Checking' to 'Package Shared'. At this stage, if this is done through PWE, one of the checks that WRE does is the suitability code (BS 1192) to make sure it's not at S0, with a NOT_EQUAL_TO call. Also, the minor rev gets dropped (P01.1 -> P01) amongst other things. This does not happen if I do this through the PS commandline. The file happily bounces along to 'Package Shared' state, with no intervention by the WRE.

    # Log in with test accoiunt capable of moving to next state in workflow

    New-PWLogin -NonAdminLogin -LoadWRE

    $doc = Get-PwDocumentsBySearch -DocumentName 'Some-Doc-Name-Number' -GetAttributes

    # File is at 'Checking' state

    $doc | Set-PWdocumentState -State 'Package Shared'

    It seems like the LoadWRE switch is getting ignored completely

Children