Create New Workflow Trigger

This workflow trigger instantiates workflows for analogous assets to support translation capabilites or cross-site content synchronization.

This workflow trigger works on the premise that a client has their content set up in the following structure:

  • en
  • de
  • fr

Assume the internet folder has a target named internet with base folder internet. Assume each of the subfolders has an asset, "page" in them. These are the "analogous assets". Analagous assets must have the same name for this plugin to work.

Whenever one of these analogous assets is edited and placed into a workflow containing this trigger, this trigger will start corresponding edit workflows for the other two analogous assets. For example if "internet/en/page" were edited, "internet/de/page" and "internet/fr/page" would be put into an edit workflow of the user's specification (denoted by the invoked-workflow-definition-path parameter).

Implementation

Declaration

Usage

Parameters

The trigger is capable of taking multiple parameters of the same name. In this case the administrator would set up the trigger in the workflow on the "en" folder to have the triggers set as such:

to handle "de" and

to handle "fr".

The target parameter specifies a target path that will be used to calculate the analogous asset paths.  For this trigger to work properly, the target structure should mirror the folder structure, such that each individual folder (en, de, fr) has its own target (en, de, fr).  In this example, a workflow is started on /internet/en/page, with additional workflows created for /internet/de/page and /internet/fr/page.  The target parameter is set based on the originating workflow - /internet/en, with the /internet/en folder as its base folder.

Alternatively, the folder-path parameter can be used which explicitly specifies the analogous assets’ base folders. The trigger then determines the common path shared by all the assets, which in this simple example is "/internet". It then calculates the relative paths based on either the target base folders or the folder-path parameter by subtracting the common part of the paths from the target base folder paths or the folder-path parameter values.

In this example the relative folder path would be "/fr" for the French site and "/de" for the German site. Then the trigger will attempt to locate the analogous asset by building a path of the form $COMMON + $RELATIVE + $ASSET_NAME, which would yield "/internet/fr/page" and "/internet/de/page" for French and German sites, respectively. It then instantiates those assets into the edit workflow specified by invoked-workflow-definition-path whose owner will be specified by the owner parameter.

This trigger also handles creates and copies. For creates, when an asset is created a new additional asset with the same name and same data should be created in the folders where the other "analogous assets" live. The same goes for copies.

In total, the user will need to set up two workflow definitions (create, edit, copy) on each "analogous" folder. One workflow definition will be the workflow definition containing this trigger, which will spawn the workflows for the analogous assets. The other workflow definitions are the ones that will be spawned when an asset in some other analogous folder is created, edited or copied.

Finally, if an analogous asset is already in workflow or locked, this trigger should send a message to the user that did the original edit (for example of the "en/page" page) letting them know which pages could not be put into workflow. The user may not have access to that analogous page, but should be notified of the failure.

Last modified on Mon, 14 Jan 2008 13:04:44 -0500

Comments


Top / Previous / Next / Up / Table of Contents