The Grid Workflow Forum
[ start | index | login ]
start > GWES > GWESActivityPluginTutorial

GWESActivityPluginTutorial

Created by bassheide. Last edited by bassheide, one year and 96 days ago. Viewed 577 times. #16
[diff] [history] [edit] [rdf]

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.:

$GWES_HOME/WEB-INF/lib/

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

Sequencediagram-ActivityPlugin_initiate

Thread that starts new activities

Sequencediagram-ActivityPlugin_start

Thread for activity postprocessing

Sequencediagram-ActivityPlugin_complete

no comments | post comment
gridworkflow.org | Copyright 2005-2008 Fraunhofer FIRST