org.enhydra.shark.toolagent
Class StorageToolAgent

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

public class StorageToolAgent
extends AbstractToolAgent

Tool agent for storing data into database. This tool uses default parameters from config file: packageDO - full name og package where is stored DO object table- name of the table checkUnique - check unique indexes for database table First two parameters will be overwriten with value of extended attribute from xpdl (DataTableClass) if they exist. This value is full package name for DO class + DO class name. This extended attribute must be called "DataTableClass" and its value must be full name of DO Class

Author:
Svjetlana Milidrag

Field Summary
static java.lang.String DATA_TABLE_CLASS_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
StorageToolAgent()
           
 
Method Summary
 void configure(CallbackUtilities c)
          Read parameters from config file
 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)
          Read extended attributes
 
Methods inherited from class org.enhydra.shark.toolagent.AbstractToolAgent
connect, copyParams, disconnect, getInfo, 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

DATA_TABLE_CLASS_EXT_ATTR_NAME

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

StorageToolAgent

public StorageToolAgent()
Method Detail

configure

public void configure(CallbackUtilities c)
               throws java.lang.Exception
Read parameters from config file

Specified by:
configure in interface ToolAgent
Overrides:
configure in class AbstractToolAgent
Throws:
java.lang.Exception

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

readParamsFromExtAttributes

protected org.enhydra.shark.xpdl.elements.ExtendedAttributes readParamsFromExtAttributes(java.lang.String extAttribs)
                                                                                  throws java.lang.Exception
Read extended attributes

Overrides:
readParamsFromExtAttributes in class AbstractToolAgent
Throws:
java.lang.Exception