If you want to show different versions of metadata depending on if your users are viewing the draft or published  versions when using same-space publishing you can use the view parameter of the {set-message} macro together with a metadata variable.

The value of the metadata ReleaseVersion is set when the transition to the Approved state occurs using the set-metadata macro.

Workflow template

{workflow:name=Using set message published and draft view}
        The Simple Approval Workflow
    {state:In Progress|approved=Approved|taskable=true}
    {state:Approved|final=true|updated=In Progress|hideselection=true}
        Published view
        ||Released Version |{get-metadata:ReleasedVersion}|
        Editor view
        ||Released Version|{get-metadata:ReleasedVersion}|
    {trigger:statechanged|state=In Progress}
        Draft view
        ||Version |{get-metadata:version}|

Related Pages

First trigger

The published content will display the view=published message on the public URL for the content

  • <hostname>/display/public/<spacekey>/<pagename>

(info) A user with edit permission viewing content in the Approved state will, by default, not see the public URL content.  To avoid this confusion, the first trigger has a second set-message action to cater for this scenario so that a user with edit permission will see a message in the Approved state.

Second trigger

The draft content will display the view=draft message.