Next we should configure the user transition “publish_action”. First, don't forget to fill the Title.
Then, we will choose here the second trigger type “Initiated by user action”, so that user can invoke this transition from the interface.
In “After Script” property, you must select a logic transition to invoke, here “publish”, so that the workflow will allow user to publish a document. Usually, an “User_Action” transition invokes a “Workflow_Method” transition in "Script (after)" in order to change the workflow state.
The “Workflow_Method" transition is always the one responsible for changing the workflow state, never the “User_Action” transition. As the invoked logic transition “publish” will automatically change the workflow state, you don't need to select anything in the Destination State drop down menu.
In order to show the publish action in the action menu of the user interface, and in addition to choosing the trigger type, you need to fill the “Display in actions box” values as listed below:
Name for the publish action: it will be displayed in the menu.
URL: it is used by the action, and must be set to:
%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=publish_action
It calls the default workflow view dialogue on the page.
Category: it is used to put the action in a specific section of the action menu (section titles are displayed in grey).
We can define here when the action will be viewable. But we will wait until we associate it with a state to do it.