Tutorial: How to implement GWES Activity Plugins
Main steps:
1. Specify the mapping of the
GWorkflowDL elements to your activity plugin
Example:
- edgeExpression -> parameter name
- content of token -> content of parameter
- operationCandidate.type -> type of plugin (e.g. wsgram, soap, rest, cli)
- operationCandidate.operationName -> name of operation, e.g., name of SOAP method or executable of command line program.
- operationCandidate.resourceName -> name of resource, e.g., URL of WSDL or hostname of Grid cluster.
2. Implement adapter class that extends the abstract class
Activity
The sequence diagrams below show how the plugin is called by the GWES and which GWES methods should be called by the plugin.
The activity plugin should implement the following abstract methods:
- initiateActivity()
- startActivity()
- simulateActivity()
- suspendActivity()
- resumeActivity()
- abortActivity()
- restartActivity()
- cleanupActivity()
3. Compile jar file and deploy it
Put all jar files that are required by the activity plugin to the GWES classpath, e.g.:
4. Provide gwes.properties for the activity plugin
Example for telling GWES to use implementation "de.fraunhofer.first.gwes.plugin.wsactivity.WSActivity" for invoking activities with operation type "soap":
gwes.activity.soap.class=de.fraunhofer.first.gwes.plugin.wsactivity.WSActivity
Thread that initiates new activities
Thread that starts new activities
Thread for activity postprocessing