close

Filter

loading table of contents...

Studio Developer Manual / Version 2107

Table Of Contents

7.23.3.2 Studio Client

For the client side, use the AddPublicationWorkflowPlugin as a subclass of the AddWorkflowPlugin. Default forms for publication workflows already exist. It is not recommended defining your own forms from scratch and no support is given in this respect. Instead, it is recommended to sub-class the default form components if needed and to use the additional workflow fields mechanism described in Section 7.23.1.2, “Adding Workflow Fields”.

The AddPublicationWorkflowPlugin plug-in automatically sets the default forms and some other configuration parameters:

processCategory

Set to Publication.

startForm

The DefaultStartPublicationWorkflowForm.

inboxForm

The DefaultPublicationWorkflowDetailForm.

pendingForm

The DefaultPublicationWorkflowDetailForm.

finishedForm

The DefaultPublicationWorkflowInfoForm.

listToolbarButtonsFunction

Set to WorkflowUtils.getPublicationToolbarButtons().

You have to configure the following settings for your workflow:

processDefinitionName

The name of your process definition.

nextSelectedTaskProcessVariableName

The name of the process variable where the next selected task is save (see the explanations above on nextSelectedTask alongside the example workflow definition).

assignmentTasks

The tasks of the workflow where assignees may be set.

statePanel

The panel allowing the user to select the next task. The panel needs to implement NextTaskSelector. For your convenience there already exists a generic implementation for such a panel in the form of the WorkflowStatePanel, which you then need to configure for your workflow. For more details, see the code documentation.

One important aspect is to explicitly define for which tasks the performer is forced to be the same as for the previous task (forceCurrentPerformer). This needs to mirror the forced-user configurations in your workflow definition. In the example of the 3-step pubication workflow, the task DoPublish is set as a forced-user task in the workflow definition above as well as in the WorkflowStatePanel configuration below.

Example 7.94, “Usage of the AddPublicationWorkflowPlugin for the StudioThreeStepPublication workflow” shows an example usage of the AddPublicationWorkflowPlugin for the case of the StudioThreeStepPublicationWorkflow.

        
<?xml version="1.0" encoding="UTF-8"?>
<editor:StudioPlugin
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns="exml:ext.config"
        xmlns:exml="http://www.jangaroo.net/exml/0.8"
        xmlns:collab="exml:com.coremedia.cms.editor.controlroom.config"
        xmlns:editor="exml:com.coremedia.cms.editor.sdk.config">
  <fx:Metadata>
    [ResourceBundle('com.coremedia.blueprint.studio.threesteppublication.ThreeStepPublicationWorkflow')]
  </fx:Metadata>
  <fx:Script><![CDATA[
    import com.coremedia.cms.editor.controlroom.workflow.publication.PublicationWorkflowConstants;

    import mx.resources.ResourceManager;

    public static const xtype:String = "com.coremedia.blueprint.studio.threesteppublication.config.threeStepPublicationWorkflowStudioPlugin";

    public native function ThreeStepPublicationWorkflowStudioPlugin(config:ThreeStepPublicationWorkflowStudioPlugin = null);
    ]]></fx:Script>

  <editor:configuration>
    <collab:AddPublicationWorkflowPlugin
        processDefinitionName="StudioThreeStepPublication"
        nextSelectedTaskProcessVariableName="{PublicationWorkflowConstants.NEXT_SELECTED_TASK_PROCESS_VARIABLE_NAME}"
        assignmentTasks="{[PublicationWorkflowConstants.APPROVE_TASK_NAME, PublicationWorkflowConstants.PUBLISH_TASK_NAME]}">
      <collab:statePanel>
        <collab:WorkflowStatePanel processDefinitionName="StudioThreeStepPublication"
                                   defaultCurrentTaskName="{PublicationWorkflowConstants.COMPOSE_TASK_NAME}">
          <collab:workflowStateTransitions>
            <collab:WorkflowStateTransition task="{PublicationWorkflowConstants.COMPOSE_TASK_NAME}"
                                            nextSteps="{[{nextStep: PublicationWorkflowConstants.APPROVE_TASK_NAME}]}"
                                            defaultStep="{PublicationWorkflowConstants.APPROVE_TASK_NAME}"/>
            <collab:WorkflowStateTransition task="{PublicationWorkflowConstants.APPROVE_TASK_NAME}"
                                            nextSteps="{[{nextStep: PublicationWorkflowConstants.COMPOSE_TASK_NAME, allowAlways:true},
                                                         {nextStep: PublicationWorkflowConstants.PUBLISH_TASK_NAME}]}"
                                            defaultStep="{PublicationWorkflowConstants.PUBLISH_TASK_NAME}"/>
            <collab:WorkflowStateTransition task="{PublicationWorkflowConstants.PUBLISH_TASK_NAME}"
                                            nextSteps="{[{nextStep: PublicationWorkflowConstants.APPROVE_TASK_NAME},
                                                         {nextStep:'DoPublish', forceCurrentPerformer: true}]}"
                                            defaultStep="DoPublish"/>
          </collab:workflowStateTransitions>
        </collab:WorkflowStatePanel>
      </collab:statePanel>
    </collab:AddPublicationWorkflowPlugin>

    <editor:CopyResourceBundleProperties
            destination="{ResourceManager.getInstance().getResourceBundle(null, 'com.coremedia.cms.editor.ProcessDefinitions')}"
            source="{ResourceManager.getInstance().getResourceBundle(null,
                'com.coremedia.blueprint.studio.threesteppublication.ThreeStepPublicationWorkflow')}"/>
  </editor:configuration>

</editor:StudioPlugin>

      

Example 7.94. Usage of the AddPublicationWorkflowPlugin for the StudioThreeStepPublication workflow


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.