Getting started with Events for Automation in Agile PLM 9.3

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.
caps 2009-08-14_01.jpg
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.
caps 2009-08-14_03.png
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:

  1. 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.

  2. 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.

  3. 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.
caps 2009-08-14_04.jpg
Now - create any subclass of Item in your system and then open the Event Handler Monitor. You should see something very similar to this:
caps 2009-08-14_06.jpg
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.
caps 2009-08-14_07.jpg
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.


What language can be used to add custom scripts for events? - Thanks, Oleg

Posted by Oleg Shilovitsky on August 17, 2009 at 12:50 AM PDT #

Agile PLM 9.3 supports the Groovy scripting language (JSR-241, Other Oracle tools have also used Groovy to provide ease of programming. One nice part of Groovy is that it runs Java code and compiles natively down to Java bytecode - which is convenient and performant since we run in a J2EE application stack. We have also allowed programmers to invoke our full SDK from within a script as well as having the Events system support calling compiled java code. From the business side, adding Scripting gives our customers an easy programming environment for simple use cases while also enabling the full Java and SDK support for more complex needs. Our experience with the ex-Eigner product line has shown that customers, partners, and consulting derives significant benefit from the added flexibility scripting and events add to a PLM system.

Posted by Shane Goodwin on August 17, 2009 at 02:23 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Hear from the community that's pioneering PLM's critical role in transforming supply chains into sustainable value chains that power profitable innovation and competitive advantage.

Subscribe to Oracle Agile PLM Blog by Email


« October 2016