Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Forum Rules Engine: Defining version string
    • Sign In

    • State Verified Answer
    • +4 person also asked this people also asked this
    • Replies 24 replies
    • Answers 1 answer
    • Subscribers 74 subscribers
    • Views 10815 views
    • Users 0 members are here
    • administrator
    • ProjectWise
    • version
    • Rules Engine

    Rules Engine: Defining version string

    Morten Sørensen
    Offline Morten Sørensen over 8 years ago

    Hey all

    Hope someone can help me with this. Because I'm not quite seeing the full picture.

    Where do I define the Rules Engine's default version string: XYY.ZZ...??? 

    According to the document "ProjectWise Rules Engine Guide_v2.docx" I can have the Rules Engine control the versioning of documents in PW, by using the action type "CHANGE_REV_NO".

    The default version string is: XYY.ZZ
    X = prefix letter
    YY = Major numerical revision
    ZZ = Minor numerical revision

     But where do I, for example, define the prefix letter (X)..??

     Thanks..!!

    • Sign in to reply
    • Cancel

    Top Replies

    • Peter Willmen
      Offline Peter Willmen Wed, Jul 14 2021 11:05 AM in reply to Peter Willmen +3
      During a recent rare quiet time I have managed to get this functionality working without the use of a Stored Procedure and using standard ProjectWise configuration. It allows the use of any Revision…
    • Morten Sørensen
      Offline Morten Sørensen Thu, Jun 18 2015 5:51 AM +1 verified
      Sorry for the late response. I was the one who asked the original quenstion and we figured out how to define the version string to our needs. You don't need to mess around in the database, all you need…
    Parents
    • Peter Willmen
      0 Offline Peter Willmen Fri, Jun 19 2015 4:30 AM
      This is certainly possible and I have implemented it on a number of major infrastructure projects in the UK.

      I have achieved it with the addition of a single SQL Stored Procedure and some additional Revision attributes in the Environment.
      This allows any number of Prefix letters to be used (P01.1, P01, X01.1, Z01.1 etc.)as well as numeric only revisions without a Prefix letter (01.1, 02 etc.).

      As soon as I get some spare time I will document the method and post it on here.

      If you need any further information in the meantime please message me

      Pete.
      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Peter Willmen
      0 Offline Peter Willmen Wed, Jul 14 2021 11:05 AM in reply to Peter Willmen

      During a recent rare quiet time I have managed to get this functionality working without the use of a Stored Procedure and using standard ProjectWise configuration.

      It allows the use of any Revision prefix 'P01.1', X01.1' etc, multiple prefix letters 'AA01.1', AB01.1' etc as well as numeric only revisions '00.1', '02.1' etc.

      The revisions can also be incremented and changed using the standard features of the Workflow Rules Engine.

      As soon as I have finished documenting it I can make it available if anyone is interested

      • Cancel
      • Vote Up +3 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Sonny Tan
      0 Offline Sonny Tan Fri, Sep 10 2021 6:38 AM in reply to Peter Willmen

      Hi Pete.

      I am very interested in knowing what your method is. It sounds like the precise thing which we need to use at the moment. I would be very grateful if you could share this with us.

      Regards,

      Sonny Tan

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Richele De Mesa
      0 Offline Richele De Mesa Wed, Mar 23 2022 4:42 AM in reply to Peter Willmen

      Hi Pete, 

      I'm also interested in your method, please, can you share it with me? Appreciate it.

      Thanks.

      Regards,

      Richele

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Andreas Karltorp
      0 Offline Andreas Karltorp Tue, Nov 22 2022 4:11 PM in reply to Peter Willmen

      Hi Peter,

      Could you share your method here, I would really appreciate it! 

      Thanks,

      Andreas

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Alex Acton
      0 Offline Alex Acton Tue, Nov 29 2022 8:45 PM in reply to Andreas Karltorp

      We modified our wreIncrementVersionNumber back in 2019 and haven't needed to touch it since.
      It has been great as it is setup for our direct needs. We have an Increase, Remove and Add for each MAJOR, MINOR and INTERNAL. Example: Major[#A,##A,##A,A].Minor[#,##].Internal [#,##] - 1A.1.3

      We can then call these via the WRE in any format we want, in some cases have special scenarios.
      Example: REM_MAJ only removes a character from the Major. If you had A or B it would be blank. Calling INC_MAJ detects blank and then changes it to 0 - used for construction issues. If you had 5C.1 in the same situation the REM_MAJ would remove the C and just return the Major (5) then the INC_MAJ would increase the major to 6.
      Same calls, but depending what state the document version is in, works differently.

      I know this isn't available to everyone as you need access to the SQL database. It's also not a 1 fit solution for everyone.


      I can see how you could do this without the SQL method, just using WRE, however I think editing the SQL would make it much quicker.

      Just using WRE with Environment Attributes you could create a few attributes for the Prefix/major/minor and others for triggers.
      You can then do Projectwise SELECT calls based on specific attributes to update fields before pulling it into the document for the version. I normally prefix attributes with what they are used for, groups them together.

      Quick example I'd suggest verPrefix, verTRIG_Inc_Major, verTRIG_Inc_Minor

      verPrefix - Normal varChar field nothing special you just have some WRE entries to SET_ATTR depending what button you click to change it to what you want.

      verTRIG_Inc_Major - integer field, you just SET_ATTR to 0 or 1. Anytime this is set it will count as triggering/updating.
      You can then use the ProjectWise select attribute in PWA Environments to update the field. (Select '$EDIT#docMajor$' + 1)
      If you use characters, you want to convert it to ascii then +1 and convert back.

      Since you're doing this in ProjectWise SELECT Attribute, it is still SQL but you don't have to change or have access to the database.

      You can do nearly anything with Triggers and Attribute SQL.
      It just gets messy when you have 30+ triggers in an environment.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Ian Davidson
      0 Offline Ian Davidson Mon, Jan 9 2023 5:29 AM in reply to Peter Willmen

      Hi Peter,

      I would also be very interested in your method if you are willing to share.

      Thanks,

      Ian

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Ian Davidson
      0 Offline Ian Davidson Mon, Jan 9 2023 5:29 AM in reply to Peter Willmen

      Hi Peter,

      I would also be very interested in your method if you are willing to share.

      Thanks,

      Ian

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    No Data

    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