Introduction
Automation workflows allows the administrator allow administrators to make the Digizuite™ Dam DAM Center do things automatically , - triggered as other things happens happen in the system.
Automation workflows replaces replace the existing ItemWatcher workflows (And anything else that depends on digimonitor).
To interact with an automation workflow, a Media Manager with at least version 5.2.0 is required.
Note | ||
---|---|---|
| ||
Do Please note that automation workflows are in beta in 5.2. It 0. Hence, it is recommended that you start migrating any existing workflows to the automation engine, as R&D is expecting to sunset digimonitor with around the 5.4.3 0 release (tbd). If you find any actions missingcannot recreate your existing workflows in automation workflows, please open a feature request in the Dam DAM project on JIRAJira, and for R&D to have a look at it. |
Workflow construction
Automation workflows are build of built with "steps". A step can be either an "action", a "trigger", a "filter", or a "foreach loop".
Triggers
A workflow is always started by a " trigger". A trigger is a special kind of step that listens for events in the overall system, such as an asset being uploaded, or metadata changing.
Actions
To actually do thing a workflow has "action"s. An action does a something your workflow needs actions. Actions all do one single thing, such as update : updating a metadata field, or, a trigger triggering an asset publish event.
Filters
To prevent parts of a workflow from running it is possible to use a "filter". A filter checks some the workflow from firing all actions without any logic, a filter must be used.
Filters check that a condition in the Digizuite , such as the value of a metadata field for an asset.Lastly there are loops, which is a special construct that allows for repeating a certain set of steps, is met, e.g. that the asset type of an asset is an image, or that a member has a certain role.
If the condition is not met, the subsequent filters and action below it will not be executed.
Foreach loops
Lastly, there are loops, which is a special construct that allows for repeating a certain set of steps, over a set of data, executing the steps for each data point in the set. (This is very similar to how foreach loops are in other programming languages)
Creating a new workflow
First of all, you need the proper roles to be able to access the workflow menu point
To create a new workflow, open the workflow page by selecting the workflow dropdown (1) from the upper-right side of the Media Manager, next select "workflows" (2):
Next select "Add new" (3)
A menu should open to the left, in please do the following:
- Press "Workflow management" in upper-middle of the page
- Next click on "Workflows"
3. Select "Add new" (Or, for more advanced users, you may choose "Add existing")
4. A menu will open to the left.
5. In this menu, press "insert" on the type of trigger you want. What the different triggers can do,
What each trigger does is documented at the bottom of this document.
...
Once a workflow has been opened in the editor, a flowchart-like view should be shown, either with only the trigger chosen earlier, or with a larger workflow, if an existing workflow was opened. is shown.
If you selected "Add new" - only the trigger you chose will be shown.
If you selected "Add existing", the workflow you inserted will, of course, be shown instead.
Adding a new step
To add a new step to the workflow, drag from the colored circle on the bottom of an existing step.
When you start dragging, a new node placeholder will appear, drag . Drag your cursor to onto this placeholder, and let go.
...
When you let go, a pane will open on the left, where the step to insert can must be selected. Pick a type of step. You can pick all step types than triggers.
The step should now be inserted where the placeholder was. Now
For the step to be valid, you need to fill out the step's parameters for the step.
This is done by selecting pressing the "more" button on the step - and selecting "edit". This should open a dialog
A dialog will now open to the right.
In this dialog fill out the parameters, and select "apply" when done.
Workflow text syntax
...
Behind the flowchart-like UI, code is being generated by the actions you perform with the steps.
This code can be accessed by going pressing the "Text mode" button:
The code could, for example, look like the following:
Code Block | ||||
---|---|---|---|---|
| ||||
trigger "Asset Uploaded" { type = "Asset Created Trigger" resolves = ["Move to User Profile Images", "Move to channel user profile folder"] upload_computer = "Digizuite Media Manager profile" } |
Each step is identified first by a keyword "trigger", "filter", "action", or "foreach", and then followed by a name in qoutesquotes. This name should must be unique within in the workflow.: In trigger "Asset Uploaded"
The parameters for each step are saved in between the curly brackets we have the actual parameters for the steps. : {}
Each parameter is identified by a key, e.g., "an equal (=) sign, and then the value in quotes: upload_computer ", an equal sign "=", and then some value in qoutes. = "Digizuite Media Manager profile"
It is possible to have a set of values (aka. lists, arrays), by putting the values inside square brackets "[ ]", as seen from the "resolves" parameter above.: resolves = ["Move to User Profile Images", "Move to channel user profile folder"]
A more formal version of the format can be seen in the following railroad diagram:
...
Most of the parameters for each step is dynamic are dynamically generated. However, however 3 parameters almost always appear , (depending on the keyword used for the step).
"type" is specified required on all steps, and . It refers to the specific kind of action /or filter that should be run, from . In the example above "Asset Created Trigger" is the type, which means that it will trigger when an asset is created. The specified types available, are documented at the bottom of this document.
Next we have "resolves", as seen in the above example. "resolves" is specified on all triggers, and refers to the last step in a chain of steps, that should be executed.
Lastly, we have "needs", which is used on actions and filters, and . It refers to steps that should be executed before this step, the step with the "needs"; thus creating a chain of dependencies (This must run before that).
...
Foreach loops
For Foreach loops are a bit special , since they allow for the repeated execution of a set (chain) of steps multiple times within the same a workflow. To do thisimplement a foreach loop, you have to specify 5 parameters (The can, of course, be done from the visual, flowchart-like, UI):
- "type", which should be set to "ForEach".
- "resolves", which should be the last step in the chain of steps to execute.
- "needs", which specifies any all steps that should be must have run before entering the for foreach loop.
- "variable", which specifies which variable to iterate over. to iterate over. This accepts both one ("test 1") and many values (["test 1", "test 2", "test 3"])
- "as", specifies what "variable" should be available as, in each iteration of the for loop. foreach loop. I.e. the current variable in the list to interact with.
Variables
To Workflows use variables in order to pass data between different steps, workflows use variables. Variables are identified by starting with an at-sign "(@"), for example example, "@sourceAssetItemId".
Triggers usually emit some variables, such as which ; the asset that triggered themthe workflow.
To pass a variable to an action or filter, just write the variable name, such as "@sourceAssetItemId".
If you try to use a variable before it's ready, you will get an error when you have run the workflow.
Some actions have "exported" variables, which . This means that rather than reading a variable before it executes, it sets a the variable after it is done.
Tips and tricks
...
has executed.
Tips and tricks
Required metadata fields (logic gate operators)
AND operator
"filter" steps below each other.
If two or more metadata fields are required : before a given step should execute, you should position the filters below each other (i.e. make the workflow linear rather than branching).
OR operator
"filter" steps beside each other.
If you have multiple fields, but only one of them are is required: , you should position the filters beside each other.
AND operator = "filter" steps below each other.
OR operator = "filter" steps besides each other.
Available steps
This documentation is auto-generated from the source, so it should be correct. hence it's very unlikely to contain mistakes.
Some additional manual documentation might be provided below.
...