Category:Events for resource templates

From Catglobe Wiki
Jump to: navigation, search



Events for resource templates

The idea behind the event feature is, that when a certain action happens to a resource (e.g. a new resource being added) then we can trigger certain events to happen. In order to make the logic most flexible, we have made it possible to add events by resource template. The logic means that whenever updates/changes happen to a resource using that resource template, then it will be checked if any of the triggers of that resource template should be activated.

Initially there will only be very few triggers offered, but as this feature becomes more and more popular we expect that almost all possible resource related actions will have triggers applied. We also expect that already implemented but hard-coded work flow settings of Catglobe may be replaced by events in the next many versions.

The events tab lists all the events that was added to a resource template. When we add an event we will be shown the events dialog as shown below.

Event57-1

An event will consist of the following three fields:

Trigger: The thing happening to a resource (using this resource template) that will cause the post trigger script to be executed.

Description: Describe what the post trigger script does so other people looking through the Events may understand it.

Post trigger script: Use CGScript to specify the actions that should happen and conditions under which they should happen. A typical script on a trigger called e.g. "resource being updated" would be

  • Check if vital information of the context resource has changed
  • Inform the team of the resource about this change by e-mail

In version 5.8 there will be created a library holding standard scripts that can be used by anyone having access to places in Catglobe where CGScript can be executed. If you already now want to try to create your own script you will most likely want to initially look at the following function:

Event_getCurrentEvent(): This function returns the resource object that is triggering the event. After having this returned you can then check IF the object has certain criteria fulfilled that will THEN run related scripts.

Below are shown the triggers that currently are supported by the Events module.


Pages in category "Events for resource templates"

The following 2 pages are in this category, out of 2 total.