4.1

Table Of Contents
Create Instances of the PluginTrigger Class
You create a workflow trigger by instantiating the PluginTrigger class.
The PluginTrigger class defines a constructor that you can use to create workflow trigger instances. The
PluginTrigger constructor can define properties such as the name of the workflow trigger, a timeout period,
and the type and identifier of the object that the workflow trigger monitors.
Prerequisites
n
Set up the workflow trigger implementation class.
n
Declare a public class to contain the workflow trigger implementation.
Procedure
1 Create an instance of the PluginTrigger class by calling the PluginTrigger() constructor.
The SolarSystemTriggerGenerator class defines the newTrigger() method to create a workflow trigger
named trigger.
private PluginTrigger newTrigger() {
PluginTrigger trigger = new PluginTrigger();
return trigger;
}
2 Call the methods of the PluginTrigger class to set the basic properties of the workflow trigger.
The SolarSystemTriggerGenerator class calls the PluginTrigger.setModuleName() method to set the name
of the workflow trigger to the same name as the plug-in itself and calls PluginTrigger.setTimeout() to
deactivate the timeout period.
private PluginTrigger newTrigger() {
PluginTrigger trigger = new PluginTrigger();
trigger.setModuleName(SolarSystemAdapter.pluginName);
trigger.setTimeout( -1 );
return trigger;
}
NOTE If you find objects by their type or identifier, you implement the setSdkType() and setSdkId()
methods to set triggers on objects.
You used the PluginTrigger() constructor to create workflow trigger instances to notify waiting workflows
when defined events occur.
What to do next
Set the properties that the workflow trigger monitors in the objects in the plugged-in technology.
Set the Properties that a Workflow Trigger Monitors
Workflow triggers monitor changes in the properties of an object in the plugged-in technology. When workflow
triggers detect a change in the properties of an object, they notify any workflows in the Orchestrator server
that are waiting for this event.
You set the properties that a workflow trigger monitors by passing a java.util.Properties list to a
PluginTrigger instance.
Prerequisites
n
Set up the workflow trigger class.
Chapter 7 Developing Plug-Ins
VMware, Inc. 173