Hi all,
Lets say I create a new Single Calendar Event asset and that fires off 3 different triggers (all set to fire on Asset Created). How do I know what order they'll fire in? Can I set that order somehow?
Thanks,
Steve
Trigger order
Can you combine the triggers into a single trigger with three different actions? Pretty sure the actions will occur in whatever order you list then.
[quote]
Can you combine the triggers into a single trigger with three different actions? Pretty sure the actions will occur in whatever order you list then.
[/quote]
Nope. We might have one trigger that says - "For all single calendar events in the system set future status to archive 1 day after their start date" then we'll have another trigger that says "For single calendar events that have been added under Agriculture Events send an email to Frank" and yet another one that says "If the event is an agricultural event and has 'Closure' ticked then remove the future archive status". If number 3 gets called before number 1 then it breaks.
Since the events can be identified as 'agricultural' I think you are using folders to divide them. Trigger runs on the location defined by the roots, so it should be possible to exclude 'agricultural' events in the first trigger.
[quote]
Since the events can be identified as 'agricultural' I think you are using folders to divide them. Trigger runs on the location defined by the roots, so it should be possible to exclude 'agricultural' events in the first trigger.
[/quote]
Cant see a way - if you add a "Tree location" condition you cant say "exclude items in X section of the tree". Not in my version anyway (3.20.4)
Is it possible to move the folder of "agricultural events" outside of the general event folder?
No, there is no general events folder - events can be added in several areas within the system and I wanted the archive rule to be in place no matter where the event was added.
Nyngan,
To make triggers fire in a particular order you need to think about setting a different action that will trigger a fresh event.
Some of the actions that you might consider are:
Create Link;
Remove Links;
Set Attribute Value;
Set Metadata Value;
Set Status;
Then that action will triggger a new event:
Link Created;
Link Deleted;
Asset Attributes Changed;
Asset Metadata Changed;
Status Changed.
So in your case you might consider setting up an asset called (say) "EventControl"
then on your first trigger you add the action Create Link to link the Single Calendar Event to "Event Control".
Your second trigger uses the event Link Created, with the condition Has a Parent "EventControl" . This trigger sends the email to Frank. You add the action Remove links to get rid of the link that triggered the event.
Your third trigger uses the event Link Deleted. This trigger removes the future archive status.
Of course with the scheme above you are left with some unwanted links to "Event Control", so you would probably need another trigger, (perhaps the negative of trigger 2) to remove those unwanted links.
But once you start thinking about other actions/events/and values that are unconnected with your primary purpose you might find several that are handy to trigger additional actions, in a set sequence.
For example:
STATUS:
What about the status "Safe Edit"
You can easily add an action to change the status of an asset to "Safe Edit". Doing so has no effect on what the public sees. And then you can use that status change to trigger something else, and this second trigger turns the status back to Live.
The beauty of using status changes for triggers is that status applies to all assets. And if your triggers work on a new asset you have eight different statuses you could cycle through before you get to "Live".
METADATA:
Using Metadata change gives you unlimted sequencing possibilities.
ASSET ATTRIBUTES:
These are a bit more limited, as many assets do not have "spare" attributes that you could use for signalling… but some do.
I know my answer is a bit late for you Nyngan, but it might help some one else who neds to trigger actions in a certain order.
regards
Polonius