org.yawlfoundation.yawl.resourcing.codelets
Class ShellExecution

java.lang.Object
  extended by org.yawlfoundation.yawl.resourcing.codelets.AbstractCodelet
      extended by org.yawlfoundation.yawl.resourcing.codelets.ShellExecution

public class ShellExecution
extends AbstractCodelet

A codelet that executes an external program in the client environment. It expects the following workitem input parameters: - command: the command line (including any arguments) - env: an optional set of attrib-value pairs representing temporary additions to the client environment (requires a user-defined data type that will deliver data like this: value1 value2 ... - dir: an optional working directory

Author:
Michael Adams Date: 18/06/2008

Field Summary
 
Fields inherited from class org.yawlfoundation.yawl.resourcing.codelets.AbstractCodelet
_description, XSD_NAMESPACE
 
Constructor Summary
ShellExecution()
           
 
Method Summary
 void cancel()
          This method is called when the work item running this codelet is cancelled.
 org.jdom.Element execute(org.jdom.Element inData, List<YParameter> inParams, List<YParameter> outParams)
          Base override.
 List<YParameter> getRequiredParams()
          This method is called when an external entity (such as the YAWL editor) requests the list of parameters required by the codelet.
 
Methods inherited from class org.yawlfoundation.yawl.resourcing.codelets.AbstractCodelet
getCanonicalClassName, getClassName, getDescription, getInputParameter, getOutputData, getOutputParameter, getParameterValue, getPersist, getRequiredParamsToXML, getValue, getWorkItem, init, resume, setDescription, setInputs, setParameterValue, setPersist, setWorkItem, shutdown, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShellExecution

public ShellExecution()
Method Detail

execute

public org.jdom.Element execute(org.jdom.Element inData,
                                List<YParameter> inParams,
                                List<YParameter> outParams)
                         throws CodeletExecutionException
Base override. Executes the codelet

Specified by:
execute in class AbstractCodelet
Parameters:
inData - the input data
inParams - a list of input parameters
outParams - a list of output parameters
Returns:
the completed output data for the workitem
Throws:
CodeletExecutionException

cancel

public void cancel()
Description copied from class: AbstractCodelet
This method is called when the work item running this codelet is cancelled. Override to cancel the codelet as required.

Overrides:
cancel in class AbstractCodelet

getRequiredParams

public List<YParameter> getRequiredParams()
Description copied from class: AbstractCodelet
This method is called when an external entity (such as the YAWL editor) requests the list of parameters required by the codelet. Override to populate the list. Each parameter should include a name, data type and description as a minimum.

Overrides:
getRequiredParams in class AbstractCodelet
Returns:
the List of parameters required by the codelet.


Copyright © 2004-2012 The YAWL Foundation.