Versions not created when using workflows in 6.7.2

jsmith's Avatar

jsmith

30 Nov, 2010 06:31 PM

We just recently noticed that when using workflows to edit a page a new version is not created in the history when the changes are published. Cascade simply updates the currently active version with the new content and udpates the "last updated by" and "last updated date" fields to reflect the latest change. The version comments stay the same as they were, and there is no way to recover the previously active versions content. This is a problem, as we rely on Cascade to be somewhat of our source control system for keeping version history.

  1. Support Staff 1 Posted by Tim on 30 Nov, 2010 06:52 PM

    Tim's Avatar

    Hi,

    Try using the Version Trigger in your Workflows and let me know if that does the trick.

    Thanks

  2. 2 Posted by jsmith on 30 Nov, 2010 06:59 PM

    jsmith's Avatar

    Here's the current workflow XML. The documentation on the Version trigger is pretty sparse. Can you let me know where I should be inserting the call.

    <system-workflow-definition name="Testing - Becker Beta Approval for Production Publish" initial-step="initialize" >
      <triggers>
        <trigger name="publish" class="com.cms.workflow.function.Publisher" />
        <trigger name="merge" class="com.cms.workflow.function.Merge" />
        <trigger name="assignToWorkflowOwner" class="com.cms.workflow.function.AssignToWorkflowOwner" />
        <trigger name="com.cms.workflow.function.PreserveCurrentUser" class="com.cms.workflow.function.PreserveCurrentUser" />
        <trigger name="com.cms.workflow.function.Version" class="com.cms.workflow.function.Version" />
      </triggers>
      <steps>
        <step type="system" identifier="publish-beta" label="Publish Beta" >
          <actions>
            <action identifier="publish" label="publish" type="auto" move="forward" >
              <trigger name="merge" />
              <trigger name="publish" >
                <parameter>
                  <name>publish-working-copy</name>
                  <value>true</value>
                </parameter>
                <parameter>
                  <name>destination</name>
                  <value>/Beta</value>
                </parameter>
              </trigger>
              <trigger name="assignToWorkflowOwner" />
            </action>
          </actions>
        </step>
        <step type="transition" identifier="contributor-review" label="Review changes on beta.becker.com" default-user="system-workflow" >
          <actions>
            <action identifier="contributor-review-approve" label="Publish to production" move="forward" />
            <action identifier="contributor-review-make-changes" label="Make additional changes and update beta" next-id="edit-update">
              <trigger name="com.cms.workflow.function.PreserveCurrentUser" />
            </action>
          </actions>
        </step>
        <step type="system" identifier="publish-live" label="Publish Live" >
          <actions>
            <action identifier="publish-live" label="Publish Live" type="auto" move="forward" >
              <trigger name="merge" />
              <trigger name="publish" >
                <parameter>
                  <name>destination</name>
                  <value>/Production One</value>
                </parameter>
              </trigger>
              <trigger name="publish" >
                <parameter>
                  <name>destination</name>
                  <value>/Production Two</value>
                </parameter>
              </trigger>          
            </action>
          </actions>
        </step>
        <step type="system" identifier="completed" label="Completed" />
      </steps>
      <non-ordered-steps>
        <step type="edit" identifier="edit-update" label="Edit or update content" default-user="system-workflow" >
          <actions>
            <action identifier="edit" label="edit" next-id="publish-beta">
              <trigger name="com.cms.workflow.function.PreserveCurrentUser" />
            </action>
          </actions>
        </step>
      </non-ordered-steps>
    </system-workflow-definition>
    
  3. Support Staff 3 Posted by Tim on 30 Nov, 2010 07:06 PM

    Tim's Avatar

    Sure. If you are looking to get a version when you publish it to your production instance, try placing it in between your merge and publish triggers:

      <trigger name="merge" />
      <trigger name="com.cms.workflow.function.Version" />
      <trigger name="publish" >
    

    note: if you change the <trigger> at the top of your workflow from:

        <trigger name="com.cms.workflow.function.Version" class="com.cms.workflow.function.Version" />
    

    to:

        <trigger name="version" class="com.cms.workflow.function.Version" />
    

    you can then do something like this:

    <trigger name="merge" />
    <trigger name="version" />
    <trigger name="publish" >
    
  4. 4 Posted by jsmith on 30 Nov, 2010 09:26 PM

    jsmith's Avatar

    I've updated our workflow as above placing the version trigger between the merge and publish and a new version is created. The problem is that now the previous versions content is being wiped empty and the new version is still being created with the comments entered on the edit screen. Also, both the current active and the previous version are being updated with the same modified by user and date. Should something be passed into the version trigger to set the comments and to leave the previous version as is?

  5. Support Staff 5 Posted by Tim on 01 Dec, 2010 09:27 PM

    Tim's Avatar

    Hmm, I may have goofed. Can you try swapping those tags so that the version trigger comes before the merge trigger:

    <trigger name="version" />
    <trigger name="merge" />
    <trigger name="publish" >
    

    Let me know if that changes the behavior.

  6. 6 Posted by jsmith on 02 Feb, 2011 04:34 PM

    jsmith's Avatar

    Sorry for the delay in getting back with you. This fixed the issue.

    This issue can be closed out now.

    Thanks,
    Jaime

  7. Support Staff 7 Posted by Tim on 02 Feb, 2011 04:35 PM

    Tim's Avatar

    Good deal. Thanks for the update Jamie!

  8. Tim closed this discussion on 02 Feb, 2011 04:35 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM