4.0

Table Of Contents
5 Import any other classes that the workflow trigger implementation requires.
The SolarSystemTriggerGenerator class requires the following class:
import java.util.Properties;
6 Declare a public class to contain the workflow trigger implementation.
The SolarSystemTriggerGenerator class declares the following class:
public class SolarSystemTriggerGenerator {
}
You set up the workflow trigger implementation.
What to do next
Implement the PluginTrigger class from the Orchestrator plug-in API to create workflow trigger instances.
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.
Chapter 7 Developing Plug-Ins
VMware, Inc. 177