Next we should configure the user transition "publish_action".
First, don't forget to fill the Title. You can add a description for this transition.
Here we will choose the second trigger type "Initiated by user action", so that user can invoke this transition from user interface.
In "Script (after)" property, you must select a logic transition to invoke, here "publish", so that the workflow will allow user to publish a document. In general, a "Initiated by user action" transition invokes a "Initiated by WorkflowMethod" transition in "Script (after)" in order to change the workflow state.
The transition "Initiated by WorkflowMethod" is always the one that is reponsable to change the workflow state, never the "Initiated by user action". As the invoked logic transition "publish" will automatically change the workflow state to "public", so you don't need to select "public" in the Destination State drop down menu.
In order to show the publish action in the "Action..." menu in user interface, in addition to choose the trigger type, you still 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, which must be:
%(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.