MM5.8 Automations to instantiate workflows
Workflow part
In almost all instances where you want to instantiate a workflow, you have to do this by an automation.
This guide aims to guide you though this process.
The first thing you need is a workflow, which of course has some stages and transitions. It’s important that the transitions that come from the created node do not have any “execution“ constraints on it. There are 3 - and they are named “Only current stage owner can transition“, “Only instance owner can transition“, and lastly, “Only specific user or user group can transition“. Also, you should not have “input“ constraints on it. in other words, the only allowed constraints here, are the ones with “Metadata“ in their names.
Automation part
In the automated flow, you need to do a bit more to get it working. In the image below, I’ve shown the steps that one needs to instantiate a workflow.
Step 1: Trigger
This part is the same as with all other automations. Simply put, this is the action that triggered this automation.
Step 2: Validation (Optional)
This part is optional, but needed if you e.g. want to control who should be able to instantiate the workflow. As written in the workflow section in the top, transitions from the created note must not contain an “execution“ constant - meaning that everyone could potentially initialize the workflow. (Please note that, you should always aim for designing the system to not even allow such users to trigger the automation trigger)
In the image show, there’s a check on the upload computer. This is made to ensure that profile images, logos, and splashscreen (introscreen) images/videos aren’t triggering the workflow. When you upload normally, the “upload computer name“ you set in the MM’s config manager via the DC will make this pass. If you instead upload a new profile image, a new splash screen image/video, or logos it will append “ profile“, “ splashscreen“, and “ logo“ - making this example fail. If you wish to make a workflow for e.g. splash screen, you’d have to make this check instead be something like “[Your upload computer name] splashscreen“.
Supposing that the upload computer name is “Digizuite Media Manager“, the available options here are:
“Digizuite Media Manager“
“Digizuite Media Manager logo“
“Digizuite Media Manager profile“
“Digizuite Media Manager splashscreen“
Step 3: Extract itemGuid
As the last step (5) requires an entity guid, which is created from concatenating a string with an itemGuid, we need to extract the itemGuid. This is done with “Item ID to Item GUID”. This step will also create the entityGuid.
Step 5: Initiate the workflow
Using the entityGuid together with the sourceMemberId (not sourceMemberItemId), you can now trigger the workflow via your automation.