org.enhydra.shark.toolagent
Class BshToolAgent

java.lang.Object
  extended byorg.enhydra.shark.toolagent.AbstractToolAgent
      extended byorg.enhydra.shark.toolagent.BshToolAgent
All Implemented Interfaces:
ToolAgent

public class BshToolAgent
extends AbstractToolAgent

Tool agent that executes bean shell scripts. Script can be executed as a file that is stored in tool agent repository, or may be contained within the given application name.

Version:
1.0
Author:
Sasa Bojanic

Field Summary
static long APP_MODE_FILE
           
static long APP_MODE_TEXT
           
static java.lang.String SCRIPT_EXT_ATTR_NAME
           
 
Fields inherited from class org.enhydra.shark.toolagent.AbstractToolAgent
APP_MODE_EXT_ATTR_NAME, APP_NAME_EXT_ATTR_NAME, appInfo, appMode, appName, assId, COMMA_SEPARATOR_STR, cus, extAttributes, handle, parameters, procInstId, SEMICOLON_SEPARATOR_STR, shandle, status, tashandle, toolInfo, wmci
 
Fields inherited from interface org.enhydra.shark.api.internal.toolagent.ToolAgent
APP_STATUS_ACTIVE, APP_STATUS_FINISHED, APP_STATUS_INVALID, APP_STATUS_RUNNING, APP_STATUS_TERMINATED, APP_STATUS_WAITING
 
Constructor Summary
BshToolAgent()
           
 
Method Summary
 java.lang.String getInfo(WMSessionHandle shandle)
           
 void invokeApplication(WMSessionHandle shandle, long handle, WMEntity appInfo, WMEntity toolInfo, java.lang.String applicationName, java.lang.String procInstId, java.lang.String assId, AppParameter[] parameters, java.lang.Integer appMode)
           
protected  org.enhydra.shark.xpdl.elements.ExtendedAttributes readParamsFromExtAttributes(java.lang.String extAttribs)
           
 
Methods inherited from class org.enhydra.shark.toolagent.AbstractToolAgent
configure, connect, copyParams, disconnect, getParameterByName, getParameterString, getParameterStringArray, getReturnParameters, requestAppStatus, terminateApp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP_MODE_FILE

public static final long APP_MODE_FILE
See Also:
Constant Field Values

APP_MODE_TEXT

public static final long APP_MODE_TEXT
See Also:
Constant Field Values

SCRIPT_EXT_ATTR_NAME

public static final java.lang.String SCRIPT_EXT_ATTR_NAME
See Also:
Constant Field Values
Constructor Detail

BshToolAgent

public BshToolAgent()
Method Detail

invokeApplication

public void invokeApplication(WMSessionHandle shandle,
                              long handle,
                              WMEntity appInfo,
                              WMEntity toolInfo,
                              java.lang.String applicationName,
                              java.lang.String procInstId,
                              java.lang.String assId,
                              AppParameter[] parameters,
                              java.lang.Integer appMode)
                       throws ApplicationNotStarted,
                              ApplicationNotDefined,
                              ApplicationBusy,
                              ToolAgentGeneralException
Specified by:
invokeApplication in interface ToolAgent
Overrides:
invokeApplication in class AbstractToolAgent
Throws:
ApplicationNotStarted
ApplicationNotDefined
ApplicationBusy
ToolAgentGeneralException

getInfo

public java.lang.String getInfo(WMSessionHandle shandle)
                         throws ToolAgentGeneralException
Specified by:
getInfo in interface ToolAgent
Overrides:
getInfo in class AbstractToolAgent
Throws:
ToolAgentGeneralException

readParamsFromExtAttributes

protected org.enhydra.shark.xpdl.elements.ExtendedAttributes readParamsFromExtAttributes(java.lang.String extAttribs)
                                                                                  throws java.lang.Exception
Overrides:
readParamsFromExtAttributes in class AbstractToolAgent
Throws:
java.lang.Exception