Workflow Client¶
The workflow client is a command line interface that allows users to register workflows, check their status, and retrieve results. The workflow client is encapsulated in a java jar file. Thus, assuming that we have a variable called $CLASSPATH with the location of the required jar files, the usage of the workflow client is as follows:
java -cp $CLASSPATH tassl.application.workflow.WorkflowClient
-serverPort <port>
-serverAddress <serverAddress>
(-regWorkflow <workflowFile> |
-checkStatus <workflowId> |
-cancelWorkflow <workflowId> |
-getSupportedApps |
-getResults <workflowId> -user <remoteUserId> -path <local path>)
Parenthesis means that you need to specify one of the options.
Option | Description |
---|---|
-help | Shows help information and exit. |
-serverPort <port> | Specify the port where the workflow manager is listening. |
-serverAddress <serverAddress> | Specify the IP address/FQDN where the workflow manager is listening. |
-regWorkflow <workflowFile> | Register a workflow described by the file indicated as argument. Returns a unique workflow ID. |
-checkStatus <workflowId> | Check the status of a previously register workflow using its unique workflow ID. |
-cancelWorkflow <workflowId> | Cancel a workflow. If the workflow is in execution, it will release all allocated resources. |
-getSupportedApps | Return the list of applications (i.e. worker) supported by each site of our federation. This name is used in the Application field of our XML workflow description. |
-getResults <workflowId> -user <remoteUserId> -path <local path> | Retrive result files generated by the workflow using scp. -user option indicates the username to be used by scp to retrieve the files from the remote machine. -path option indicates the directory where the retrieved files will be placed. |
For simplicity we keep a script called workflowClient.sh in the directory simple_run/client/. The content of this script is described as follows:
export CLASSPATH=../../dist/*:../../lib/*
java -cp $CLASSPATH tassl.application.workflow.WorkflowClient $@
Requirements¶
This service requires Java runtime 1.7+ and rsync.
Examples¶
Let us consider that the workflow manager is hosted in machine1.domain.com and it is listening in the port number 8888.
Register a workflow
$ workflowClient.sh -serverAddress machine1.domain.com -serverPort 8888 ‐regWorkflow myworkflow.xml
Check status of the workflow identified by the ID 21312541
$ workflowClient.sh -serverAddress machine1.domain.com -serverPort 8888 ‐checkStatus 21312541
Retrieve results from workflow identified by the ID 21312541. The user in the remote machine is jdiaz and I would like to get the results in my local directory /home/jdiaz/results/
$ workflowClient.sh -serverAddress machine1.domain.com -serverPort 8888 ‐retrieveResutls 21312541 -user jdiaz -path /home/jdiaz/results/