Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.

Page tree
Skip to end of metadata
Go to start of metadata

Publishing content

To launch the publication of content in content apps, trigger the publish action in your app's actionbar. Configure the action in the module configuration under /modules/<module-name>/apps/<app-name>/subApps/browser/actions. The configuration should look similar to the Assets app, for example.

This is what a non-workflow configuration looks like. The configuration launches the activate command inside the versioned catalog which is part of the Activation module. The action creates a new version of the published item and and activates it to the public instance but does not trigger a workflow. 

Properties related to publishing:

  • class: Specifies an action definition class.
  • catalog: References a command catalog.
  • command: A command to be launched inside the catalog.

Extendable action skeleton

Before you change the action to trigger a workflow, look at the available configuration in the workflow module.

You can choose from two action configurations:

  • publish: Launches the workflow directly. Use this action when you do not want to give an editor the possibility to schedule publishing to a future date or add a comment.
  • schedulePublication: Opens a dialog where the editor can add a publication date and a comment.

The command name is the same, activate, but the commands reside in different catalogs. The default non-workflow action launches an activate command from the versioned catalog in the Activation module. The other activate command is in the workflow catalog in the Workflow module.

Use the publish and schedulePublication actions to configure workflow for any content app or extend them in your own action configuration.

Adding fields to publication dialog

When using workflow, the editor can add a comment and set the publication to a future date. The publication dialog provides fields for enter this information.

To open the dialog, reference the dialog definition in the dialogName property. Here is an example from the schedulePublication action:

The formTypes configuration tells the form builder what type of input is expected in the form fields. The types are then mapped to the form configuration using the node name such as publicationDate and comment:

The presenterClass inside the dialogs definition extends the FormDialogPresenter by the necessary functionality for this manual mapping.

Adding custom parameters

You can pass custom parameters from your action definition into the process using the params node in the action configuration. You can reference the parameters in the process as described in Input and output parameters.

Example

In this example we enable workflow in the Assets app. Almost all properties are already defined in the configuration.

  1. Remove all properties from our activate action inside the assets app.
  2. Add an extends property. Set its value to the schedulePublication action.
  3. Change the three remaining publication related actions. Extend the activate action you already did. Override properties to change the default behavior.

4 Comments

  1. HI Support


    Enabling the 4-eye workflow on the stories app is not working, i've tried to configure it multiple times by editing the stories.yaml file in the resouces app, i'm getting always this error "No class mapped for action:activate", i follow the same steps as in the example and it worked fine on the DAM/Assets app, is there any reason for that and whats are the possible solutions please?


    Best Regards


    1. Hello-

      May I kindly ask that you not use the training user to comment in documentation. We'd prefer that you use your own account which is free to open. Let me know if you need assistance with that.

      To answer question, I'm not sure what extra might be needed to use workflow in the stories app. It could be that it requires extra configuration or customization. Could I get you to open a support request in our JIRA? Then we can get someone from the support team to investigate this. See this link for instructions if you are new to the process.

      Thanks!

      Rich

      1. See SUPPORT-8672 - Getting issue details... STATUS

        1. Did you find a solution? I'm getting the same errors