Getting started with Events for Automation in Agile PLM 9.3
By Shane Goodwin-Oracle on Aug 14, 2009
As you have seen in some of the other Blog posts, Agile PLM 9.3 has added an Events system that enables automation of many tasks while preserving our ease of enabling upgrades. The new Events system works with our embedded Groovy scripting and new notifications templates to create a very flexible tool to extend Agile PLM functionality.
We remain a PLM which can be implemented through configuration in Admin without having to build all of your processes in a toolkit, but the Events capability allows our customers to extend our configuration to better support their specific usage and to tie together related business processes. The remainder of this post will go through an example of using the new Events system for the first time.
As a new part of Agile PLM, the Events system is not started in a new implementation or in a newly upgraded database. This was done to eliminate any potential overhead for customers not using Events. When starting work with Events, first make sure to start the Event system using the button on the toolbar in Admin. Once started, the Events system will automatically start after subsequent App Server restarts.
Once you have started the Events system, you want to start exploring the new Event Management node within Admin. We will be using an Event to add a trigger to some Agile PLM action, a Handler to describe what code to run, and a Subscriber to tie the Event and Handler together. We will use the Event Handler Monitor to review the status of and any messages from the Handler.
One common starting example from most programming languages is to somehow print Hello World. Use the following steps to configure Agile PLM to print Hello World into the Event Handler Monitor each time you create an Item:
- Open the Events node, select New, and complete the new Event by choosing Create Object for the Event Type, Items for the Object Type, and then select the generate (123) button for the Name. Select OK to continue.
- Open the Event Handlers node, select New, then choose Script PX for Event Handler Type, type "Hello World" for Name, and in the Script text box add "obj.logMonitor ("Hello World")" before the final }. Then select OK to continue.
- Open the Subscribers node, select New, then select the Event and Handler you just created, use the generate (123) button to set the name, For this example, leave the remainder of the settings at their defaults (Pre, Synchronous, 0, Continue) and select OK to continue.
This should leave you with the 3 admin configurations shown in the next picture.
Now - create any subclass of Item in your system and then open the Event Handler Monitor. You should see something very similar to this:
There you are - you have now used an Event to trigger a Script handler which printed a message into the Event Handler Monitor. If this did not work, open Classes > Items > Event Subscribers and check whether there is anything listed in the Inactive Reasons column. You should be able to correct the information in the Inactive Reasons by enabling the Events system or other settings.
There is an immense amount of additional information available for all of the features mentioned in this entry. You can review the Agile PLM 9.3 documentation, review training recordings using the links in Metalink Note 854537.1, and also review the Samples we have published. I hope this helps you get started with the 9.3 Events system.