Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Forum Workflow state on document move
    • Sign In

    • State Verified Answer
    • +1 person also asked this people also asked this
    • Replies 3 replies
    • Answers 1 answer
    • Subscribers 60 subscribers
    • Views 3207 views
    • Users 0 members are here
    • Workflow

    Workflow state on document move

    Leif Frederiksen
    Offline Leif Frederiksen over 9 years ago

    When I move a document that is in a specific workflow state from one folder to another, then the state is reset to the first state of the workflow attached to the destination folder.

    This happens even if the source and destination folders are attached to the exact same workflow.

    It happens both on the current version of the document and on all older versions.

    I have two questions regarding this:

    1) Can I prevent this behavior and have PW hang on to the current state if this state is valid in the destination folder?

    2) How can I access and change the state of the older versions of the document and manually assign the correct state?

    • Sign in to reply
    • Cancel
    • Jeff Burrill
      0 Offline Jeff Burrill Tue, Aug 19 2014 2:07 AM in reply to Leif Frederiksen

      My solution takes care of the current version as well as old versions. The methods used to preserve state of old versions is the part that goes beyond the normal API function that handles the current version. But the basis for all of it is in hooks.

      The API provides the ability to add a "hook" into different points of event chains. In my solution, the hook gets registered and runs whenever a document move operation is detected in ProjectWise Explorer. Using information available to the hook about the document being processed at that time, you can use API methods to manipulate the document, such as set the workflow state.

      There are some good examples that demonstrate hook usage in the SDK samples.

      Answer Verified By: Leif Frederiksen 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Reject Answer
      • Cancel
    • Leif Frederiksen
      0 Offline Leif Frederiksen Tue, Aug 19 2014 1:37 AM in reply to Jeff Burrill

      Hi Jeff,

      Thanks for your answer.

      So what you are saying is, that you created a solution to keep the correct state on the current version, but not on the older versions (the ones that are also hardest to fix afterwards)?

      I do not have experience with the SDK (yet) - can you enlighten me a bit on how you accomplished this?

      /Leif

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Jeff Burrill
      0 Offline Jeff Burrill Mon, Aug 18 2014 1:28 PM

      There is no out-of-the box setting to force preservation of workflow state when moving between folders, even if they share the same workflow. Though some times it might appear they are being preserved, that is purely coincidental; e.g. the state applied after the move (dependent on what your datasource settings are for "Creation in workflow") just happens to match what it was before the move.

      Prior versions cannot be modified in any way, and this includes workflow state. Given that rationale, I do not understand why workflow states aren't automatically preserved on the older versions when a document with versions is moved - at least between folders with the same workflow, but I digress...

      I put in a CR for these very issues a while ago (sorry, can't recall the CR#) but to date, they haven't been addressed. In the meantime, I came up with my own workarounds. Using the SDK, I was able to solve state preservation for current versions using a hook. I also engineered my own SDK solution to modifying state of prior versions, but that one goes beyond the native capabilities of the SDK and would not be supported by Bentley.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel

    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