Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Set-PWDocumentState : Workflow rules not being executed
    • Sign In

    • State Verified Answer
    • Replies 8 replies
    • Answers 1 answer
    • Subscribers 66 subscribers
    • Views 1649 views
    • Users 0 members are here
    • set-pwdocumentstate
    • new-pwdocumentversion

    Set-PWDocumentState : Workflow rules not being executed

    AEC_PW_Interface
    Offline AEC_PW_Interface over 2 years ago

    Hello,

    Looking for some help to understand why our Set-PWDocumentState commands do not trigger the WRE when we do state changes.

    Our scripts boils down to :

    • New-PWLogin -DatasourceName "name" -LoadWRE -UserName "user"  -Password $Password                                                                
    • $doc = Get-PWDocumentsByGUIDs -DocumentGUIDs GUI                                                                             
    • Set-PWDocumentState -InputDocuments $doc -State "Next state in the workflow"  

    We also see the same kind of issue with New-PWDocumentVersion, just like the Set-PWDocumentState, we notice that the workflow rules have not been executed after execution.

    Looking on the forums, we also saw the suggestion to use Invoke-WSGWorkflowCommand but that command gives the following:

    Error: Manual change state not allowed. Please use Workflow customization rules to change document state.

    Anyone has any pointers on how to investigate why the workflow isnt being triggered ?

    Thanks !

    • Sign in to reply
    • Cancel

    Top Replies

    • AEC_PW_Interface
      Offline AEC_PW_Interface Tue, Jul 27 2021 3:19 PM +1
      Ok, thanks everyone ! I will try again with the PWPS_WSG even though it dint work earlier but honestly I think we will just reimplement the workflow rules inside the script. If PWPS_WSG ends up working…
    • AEC_PW_Interface
      Offline AEC_PW_Interface Fri, Oct 8 2021 11:20 PM in reply to AEC_PW_Interface +1 verified
      Just to confirm that it ended up working with Invoke-WSGWorkflowCommand Our script boiled down to the below : New-PWLogin -DatasourceName $datasource -UserName $username -Password $SecurePassword…
    • Chris Andrew
      Offline Chris Andrew Sat, Oct 9 2021 2:37 AM in reply to AEC_PW_Interface +1 suggested
      Pwps_dab was updated recently to include a hidden -Force command on Set-PWDocumentState This now works with Server Side WRE set.

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies