4.0

Table Of Contents
The solar system plug-in features a workflow trigger that creates an instance of the PluginTrigger class to
monitor solar flare events on a Star object in a SolarSystemRepository instance. These procedures present the
steps involved in creating a workflow trigger. To illustrate the process, they present code from the
SolarSystemTriggerGenerator class. The package of workflows, actions, and resources that accompany the
solar system example provides a workflow that contains a Wait Event element that monitors the workflow
trigger for solar flare events.
For a description of the role of the plug-in triggers and the other components of a plug-in, see “Overview of
Plug-Ins,” on page 141. For information about all the methods and parameters of the plug-in trigger class, see
“PluginTrigger Class,” on page 222.
Procedure
1 Set Up the Workflow Trigger on page 176
To create a workflow trigger, you create an implementation of the PluginTrigger class from the
Orchestrator plug-in API.
2 Create Instances of the PluginTrigger Class on page 177
You create a workflow trigger by instantiating the PluginTrigger class.
3 Set the Properties that a Workflow Trigger Monitors on page 178
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.
Set Up the Workflow Trigger
To create a workflow trigger, you create an implementation of the PluginTrigger class from the Orchestrator
plug-in API.
Prerequisites
n
You have an application to plug in to Orchestrator.
n
You have access to the Orchestrator plug-in API JAR file.
Procedure
1 Create and save a Java file for the workflow trigger implementation.
In the solar system example, the workflow trigger class is named SolarSystemTriggerGenerator.
2 Declare the package that contains the Java classes of the plug-in implementation.
The solar system example declares the following package:
package com.vmware.orchestrator.api.sample.solarsystem;
3 Import the Orchestrator plug-in API classes with a Java import statement.
The SolarSystemTriggerGenerator class requires the following classes:
import ch.dunes.vso.sdk.api.IPluginFactory;
import ch.dunes.vso.sdk.api.PluginTrigger;
4 Import the classes of the application to plug in with a Java import statement.
The SolarSystemTriggerGenerator class requires the following class:
import com.vmware.solarsystem.Star;
vCenter Orchestrator Developer's Guide
176 VMware, Inc.