Thursday, 02 January 2014 00:00

Getting a user's recently visited items

I had a comment posted in another blog (Agile PX - Creating an Agile PLM Process Extension ) from Akshay who wanted to know how to get items from the Recently Visited and Navigator panes in the web client.  They figured out Recently Visited items, but not Navigator.  Navigator doesn't appear to be persisted, so there is little help I can offer, but I thought readers may be interested in knowing how to get the Recent items.

The process flow is pretty simple:

  • Get the IUser of interest
  • Get the recently visited IFolder
  • Iterate over the IAgileObjects in the IFolder


recent visits


Friday, 08 November 2013 00:00

Running SQL from a Groovy Event Handler

Have you ever run into a situation where you needed to run SQL from an event handler or PX but wasn't quite sure how to do it?  This blog will show you how to get a connection to the Agile PLM database and execute SQL without worrying about the connection details.

The Script

The script itself is pretty simple - just import the com.agile.util.sql package and leverage the ConnectionFactory class.  Once you get the connection, you can proceed as you normally would since it is a standard Connection interface.  If you are coding this externally make sure you add agileclasses.jar to your classpath.

import com.agile.agileDSL.ScriptObj.*;
import com.agile.api.*;
import com.agile.util.sql.*;
import java.sql.*;

void invokeScript(IBaseObjectScriptObj object) {

	Connection connection = null;
	PreparedStatement statement = null;
	ResultSet rows = null;
	try {
		connection = ConnectionFactory.getFactory().getConnection();
		statement = connection.prepareStatement("select ifs_url from vault");
		rows = statement.executeQuery();

		while( {

			// log the SQL response
			object.logMonitor( "SQL Response: " + rows.getString("ifs_url") );
	} catch (Exception e) { 
		object.logMonitor( e.getMessage() );


Tuesday, 02 April 2013 19:24

Create a Custom AutoNumber Source

Sometimes the AutoNumber facility in Agile PLM does not offer the level of sophistication needed to produce a truly intelligent part number. Fortunately, Agile provides an extension point to create custom AutoNumber sources.  This blog will outline the steps needed to create the code for the custom source and get it installed in Agile so it is ready to use.

In my last blog article, Process Extension Development – Demoting a Change Order, I offered some source code that demotes a change order when one of the affected items on the change has an obsolete item on its BOM.  There were a few follow up posts in the LinkedIn discussion about how to create a process extension, also called a PX.  This blog will help outline the steps to package the source code, create the ICustomAction and configure Agile PLM to trigger the process extension (PX) on the submitted workflow step.

Monday, 16 July 2012 18:32

Agile PX - Demoting a Change Order

Demoting a change with an obsolete part on the BOM of an affected item

I often go through the Agile PLM SDK group in LinkedIn.  On a recent visit, someone was having an issue with obsolete parts showing on the BOM of an item on a change order.  To be clear, the issue is not that parts on the change were obsolete, it is that parts on the BOM of the affected items of a change were obsolete.  A process extension (PX) was proposed by another group member to remedy this business rule.  This blog illustrates the implementation of that process extension.