IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.server.flow.al.base
Class BaseActivity

java.lang.Object
  extended bycom.ibm.btt.server.flow.al.base.BaseActivity

public abstract class BaseActivity
extends java.lang.Object

This class is the base class for all the remote activities.

Methods to access the context, services and formats are provided.


Field Summary
static java.lang.String PARAM_NAME_KEY
          PARAM_NAME_KEY
static int RC_ERROR
          RC_ERROR
static int RC_OK
          RC_OK
 
Constructor Summary
BaseActivity()
           
 
Method Summary
 DataElement addElement(DataElement aDataElement)
          Adds the data element aDataElement to the business process context.
protected  void assignService(java.lang.String aServiceName, BTTServiceRequester aServiceRequester)
          Assigns the service.
abstract  int execute()
           
 java.lang.String getApplicationId()
          Returns the business process application id.
protected  Context getContext()
          Returns the business process context.
protected  java.lang.Object getDataFromWorkArea(java.lang.String name)
          Returns the data stored in the business process work area.
protected  DataElement getElementAt(java.lang.String aCompositeKey)
          Returns the data element identified by aCompositeKey.
protected  FormatElement getFormat(java.lang.String aFormatName)
          Returns the format named aFormatName.
 KeyedCollection getKeyedCollection()
          Returns the keyed collection of the business process context.
 java.lang.String getName()
          Returns the activity name.
 KeyedCollection getParams()
          Returns the activity parameters.
 Context getParent()
          Returns the parent of the business process context.
protected  BTTServiceRequester getService(java.lang.String aServiceName)
          Returns the service named aServiceName.
protected  BTTSystemData getSystemData()
          Returns the system data stored in the business process work area.
protected  java.lang.Object getValueAt(java.lang.String aCompositeKey)
          Returns the value of the data element identified by aCompositeKey.
 void loadParams(java.lang.String paramsInfoLocation)
          Loads the operation step parameters from the resource bundle.
protected  void releaseService(BTTServiceRequester aServiceRequester)
          Releases the service.
 DataElement removeAt(java.lang.String aCompositeKey)
          Removes the data element identified by aCompositeKey from the business process context.
 void setContext(Context cha)
          Set the business process context.
 void setName(java.lang.String aName)
          Sets the activity name.
 void setParams(KeyedCollection kc)
          Sets the activity parameters.
protected  void setValueAt(java.lang.String aCompositeKey, java.lang.Object aDataValue)
          Sets the value of the data element identified by aCompositeKey.
protected  void unassignService(java.lang.String aServiceName)
          Unassigns the service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RC_OK

public static final int RC_OK
RC_OK

See Also:
Constant Field Values

RC_ERROR

public static final int RC_ERROR
RC_ERROR

See Also:
Constant Field Values

PARAM_NAME_KEY

public static final java.lang.String PARAM_NAME_KEY
PARAM_NAME_KEY

See Also:
Constant Field Values
Constructor Detail

BaseActivity

public BaseActivity()
Method Detail

setContext

public void setContext(Context cha)
Set the business process context.


getContext

protected Context getContext()
                      throws BTTBPException
Returns the business process context.

Returns:
com.ibm.btt.base.Context The business process context.
Throws:
BTTBPException

getValueAt

protected java.lang.Object getValueAt(java.lang.String aCompositeKey)
                               throws BTTBPException
Returns the value of the data element identified by aCompositeKey.

Parameters:
aCompositeKey - The key of the data element.
Returns:
java.lang.Object The value of the data element.
Throws:
BTTBPException

setValueAt

protected void setValueAt(java.lang.String aCompositeKey,
                          java.lang.Object aDataValue)
                   throws BTTBPException
Sets the value of the data element identified by aCompositeKey.

Parameters:
aCompositeKey - The key of the data element.
aDataValue - The value of the data element.
Throws:
BTTBPException

getElementAt

protected DataElement getElementAt(java.lang.String aCompositeKey)
                            throws BTTBPException
Returns the data element identified by aCompositeKey.

Parameters:
aCompositeKey - The key of the data element.
Returns:
com.ibm.btt.base.DataElement The data element.
Throws:
BTTBPException

getService

protected BTTServiceRequester getService(java.lang.String aServiceName)
                                  throws BTTBPException
Returns the service named aServiceName.

Parameters:
aServiceName - The name of the service.
Returns:
com.ibm.btt.base.services.BTTServiceRequester The service.
Throws:
BTTBPException

releaseService

protected void releaseService(BTTServiceRequester aServiceRequester)
                       throws BTTBPException
Releases the service.

Parameters:
aServiceRequester - The service.
Throws:
BTTBPException

assignService

protected void assignService(java.lang.String aServiceName,
                             BTTServiceRequester aServiceRequester)
                      throws BTTBPException
Assigns the service.

Parameters:
aServiceName - The service name.
aServiceRequester - The service.
Throws:
BTTBPException

unassignService

protected void unassignService(java.lang.String aServiceName)
                        throws BTTBPException
Unassigns the service.

Parameters:
aServiceName - The service name.
Throws:
BTTBPException

getFormat

protected FormatElement getFormat(java.lang.String aFormatName)
Returns the format named aFormatName.

Parameters:
aFormatName - The name of the format.
Returns:
com.ibm.btt.formatter.client.FormatElement The format.

getDataFromWorkArea

protected java.lang.Object getDataFromWorkArea(java.lang.String name)
                                        throws BTTBPException
Returns the data stored in the business process work area.

Parameters:
name - The name of the data.
Returns:
java.lang.Object The data.
Throws:
BTTBPException

getSystemData

protected BTTSystemData getSystemData()
                               throws BTTBPException
Returns the system data stored in the business process work area.

Returns:
com.ibm.btt.base.BTTSystemData The system data.
Throws:
BTTBPException

execute

public abstract int execute()
                     throws BTTBPException
Throws:
BTTBPException

loadParams

public void loadParams(java.lang.String paramsInfoLocation)
                throws BTTBPException
Loads the operation step parameters from the resource bundle.

If null is provided as the paramsInfoLocation, the properties file with the same name as the class will be used.

Parameters:
paramsInfoLocation - The location of the resource bundle.
Throws:
BTTBPException

addElement

public DataElement addElement(DataElement aDataElement)
                       throws BTTBPException
Adds the data element aDataElement to the business process context.

Parameters:
aDataElement - The data element to be added.
Returns:
com.ibm.btt.base.DataElement The data element added.
Throws:
BTTBPException

getApplicationId

public java.lang.String getApplicationId()
                                  throws BTTBPException
Returns the business process application id.

The application id is read-only here and should be set by the invoker of the business process in BTT system data as subsession id.

Returns:
java.lang.String The business process application Id.
Throws:
BTTBPException

getKeyedCollection

public KeyedCollection getKeyedCollection()
                                   throws BTTBPException
Returns the keyed collection of the business process context.

Returns:
com.ibm.btt.base.KeyedCollecion The keyed collection of the business process context.
Throws:
BTTBPException

getName

public java.lang.String getName()
                         throws BTTBPException
Returns the activity name.

Returns:
java.lang.String The operation step name.
Throws:
BTTBPException

getParams

public KeyedCollection getParams()
                          throws BTTBPException
Returns the activity parameters.

Returns:
com.ibm.btt.base.KeyedCollection The operation step parameters.
Throws:
BTTBPException

getParent

public Context getParent()
                  throws BTTBPException
Returns the parent of the business process context.

Returns:
com.ibm.btt.base.Context The parent of the business process context.
Throws:
BTTBPException

removeAt

public DataElement removeAt(java.lang.String aCompositeKey)
                     throws BTTBPException
Removes the data element identified by aCompositeKey from the business process context.

Parameters:
aCompositeKey - The key of the data element.
Returns:
com.ibm.btt.base.DataElement The data element.
Throws:
BTTBPException

setName

public void setName(java.lang.String aName)
             throws BTTBPException
Sets the activity name.

Parameters:
aName - The operation step name.
Throws:
BTTBPException

setParams

public void setParams(KeyedCollection kc)
Sets the activity parameters.

Parameters:
kc - The operation step parameters.

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005