com.ibm.b2bi.im.bfm.client
Class BFMBean

java.lang.Object
  |
  +--com.ibm.b2bi.im.bfm.client.BFMBean

public class BFMBean
extends java.lang.Object


Field Summary
static java.lang.String copyrightNotice
           
 
Constructor Summary
BFMBean()
           
 
Method Summary
 java.util.Hashtable adocServiceRequest(java.lang.String request, java.util.Hashtable context, java.util.Hashtable input, java.lang.String adocId)
          Deprecated. As of WSBI 2.0. Use serviceRequest instead.
 void archiveAdoc(java.lang.String adocId)
          Archives the Adoc.
 java.lang.Object createAdoc(java.lang.String adocType)
          Creates an instance of an Adoc for the given type.
 java.lang.String createAdocIdReturn(java.lang.String adocType)
          Creates a Adoc for a given adoc type.
 com.ibm.b2bi.im.bfm.client.Tamap findTamapByTaskId(java.lang.String taskId)
          Deprecated. As of WSBI 2.0. With the advent of the generic serviceRequest methods the Adoc query methods should be used.
 java.util.Vector findTamapsByAdoc(java.lang.String adocId)
          Deprecated. As of WSBI 2.0. With the advent of the generic serviceRequest methods the Adoc query methods should be used.
 java.util.Vector findTamapsByAdocForUser(java.lang.String adocId, java.lang.String user)
          Deprecated. As of WSBI 2.0. With the advent of the generic serviceRequest methods the Adoc query methods should be used.
 java.util.Vector findTamapsByProcessInstance(java.lang.String procId)
          Deprecated. As of WSBI 2.0. With the advent of the generic serviceRequest this method should not be required.
 java.util.Vector findTamapsByUser(java.lang.String user)
          Deprecated. As of WSBI 2.0. With the advent of the generic serviceRequest methods the Adoc query methods should be used.
 java.lang.Object getAdoc(java.lang.Object adocKey, java.lang.String adocType)
          Gets an Adoc.
 com.ibm.b2bi.im.bfm.client.AdocDetails getAdoc(java.lang.String adocId)
          Gets the AdocDetails object for the given adoc instance.
 java.lang.String getAdocFromTaskId(java.lang.String taskId)
          Gets the ADOC ID for the given Task ID.
 java.util.Vector getAdocs(java.lang.String adocType, java.lang.String user, java.lang.String state)
          Gets a list of Adocs matching some criterion.
 java.util.Vector getAdocsByFilter(java.lang.String adocType, java.util.Hashtable filterParams)
          Gets a list of Adocs based on an user filter.
 java.util.Vector getAdocsByFilter(java.lang.String adocType, java.lang.String user, java.lang.String state, java.util.Hashtable filterParams)
          Gets a list of Adocs based on an user filter.
 java.util.Vector getAllAdocEvents(java.lang.String adocType, java.lang.String state, java.lang.String role, java.lang.String user)
          Gets a list of Adocs and get a list of events that the Adoc alone can accept in current state.
 java.util.Vector getAllPossibleBusinessEvents(java.lang.String adocId, java.lang.String role, java.lang.String user)
          Gets a list of events that the Adoc alone can accept in current state.
 java.util.Vector getArchivedAdocs(java.lang.String adocType, java.lang.String startDateTimeStr, java.lang.String endDateTimeStr)
          Gets a list of Adocs that have been archived.
 java.util.Vector getEventListForAdoc(java.lang.String adocId, java.lang.String role)
          Gets a list of events that the Adoc alone can accept in current state.
 java.util.Vector getEventListForTask(java.lang.String taskId, java.lang.String role)
          Gets a list of events that the Activity alone can accept in current state.
 java.util.Vector getInboxList(java.lang.String user)
           
 com.ibm.b2bi.im.bfm.client.Tamap getProcDetails(java.lang.String taskId)
           
 java.util.Vector getWorklist(java.lang.String user)
           
 java.util.Hashtable incomingEpicMessage(com.ibm.b2bi.im.bfm.client.EpicMessage em)
          This method provides the necessary logic to map/transform an incoming message (EpicMessage) to raise an event on an Adoc instance using the serviceRequest method.
 java.util.Hashtable incomingEpicMessage(java.lang.String bodyCategory, java.lang.String bodyType, java.lang.String corrId, java.lang.String message)
          This method provides the necessary logic to map/transform an incoming message (EpicMessage) to raise an event on an Adoc instance using the serviceRequest method.
 void initialize()
          Gets a reference to BFMAdmin server object.
 java.util.Hashtable invoke(java.lang.String commandId, java.util.Hashtable _context, java.util.Hashtable _inputList)
          Allows to execute any command defined in the command.xml without involving a Controller.
 void remove()
          Removes the instance of BFMAdmin in BFM server.
 void removeAdoc(java.lang.String strkey)
          Removes the given Adoc object.
 com.ibm.b2bi.im.bfm.client.AdocDetails resolveDocument(java.lang.String taskId)
           
 java.lang.Object reviveAdoc(java.lang.String adocId)
          Revives the Adoc specified in the AdocDetails .
 java.util.Hashtable serviceRequest(java.lang.String request, java.util.Hashtable context, java.util.Hashtable input, java.lang.String adocId, java.lang.String user)
          This method does a state transistion change on a Adoc controller.
 void setServerString(java.lang.String serverString)
          Sets the location of the BFM server.
 java.util.Hashtable taskServiceRequest(java.lang.String request, java.util.Hashtable context, java.util.Hashtable input, java.lang.String taskId)
          This method does a state transistion change on a task controller.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyrightNotice

public static final java.lang.String copyrightNotice
Constructor Detail

BFMBean

public BFMBean()
Method Detail

adocServiceRequest

public java.util.Hashtable adocServiceRequest(java.lang.String request,
                                              java.util.Hashtable context,
                                              java.util.Hashtable input,
                                              java.lang.String adocId)
                                       throws BFMClientException
Deprecated. As of WSBI 2.0. Use serviceRequest instead.

Raises the event (request) on the adoc instance (adocId) passing in the context and the input parameters. For more information please read the Client Programming section of the PBS Developer Guide.
Parameters:
request - The Event.
context - The context information.
input - The input information.
adocId - The adoc Id.
Returns:
Hashtable The aggregated output of adoc controller commands.
Throws:
RemoteException - Wrapped around any exception thrown.
See Also:
serviceRequest

archiveAdoc

public void archiveAdoc(java.lang.String adocId)
                 throws BFMClientException
Archives the Adoc. Archives the Adoc specified in the AdocDetails and any business attributes specified by the Hashtable archive() method in the Solution Adoc. Normally this method is invoked automatically by the Adoc Archival Listener when the archival request is scheduled. For more information please refer to the Adoc Life Cycle Management section of the PBS Developer Guide.
Parameters:
AdocDetails - The adoc structure holding the base adoc attributes
Throws:
RemoteException - Wrapped around any exception thrown.
See Also:
com.ibm.epic.bfm.ejb.base.AdocDetails

createAdoc

public java.lang.Object createAdoc(java.lang.String adocType)
                            throws BFMClientException
Creates an instance of an Adoc for the given type.
Parameters:
adocType - The adoc Type
Returns:
Object The solution-adoc object. Needs to be narrowed before use.
Throws:
RemoteException - Wrapped around any exception thrown.

createAdocIdReturn

public java.lang.String createAdocIdReturn(java.lang.String adocType)
                                    throws BFMClientException
Creates a Adoc for a given adoc type. Creates a Adoc for a given adoc type, but returns the adoc identifier instead of the remote object.
Parameters:
adocType - Adoc Type
Returns:
String Adoc Id
Throws:
RemoteException - Wrapped around any exception thrown.

findTamapByTaskId

public com.ibm.b2bi.im.bfm.client.Tamap findTamapByTaskId(java.lang.String taskId)
                                                   throws BFMClientException
Deprecated. As of WSBI 2.0. With the advent of the generic serviceRequest methods the Adoc query methods should be used.

Finds the Tamap object for the task/activity id from the internal Activity Maps.
Parameters:
taskId - The activity id.
Returns:
Vector The Tamap object.
Throws:
RemoteException - Wrapped around any exception thrown.
See Also:
getAllAdocEvents, getAllPossibleBusinessEvents, com.ibm.epic.bfm.ejb.base.Tamap

findTamapsByAdoc

public java.util.Vector findTamapsByAdoc(java.lang.String adocId)
                                  throws BFMClientException
Deprecated. As of WSBI 2.0. With the advent of the generic serviceRequest methods the Adoc query methods should be used.

Finds all the Workflow Activities active for an adoc instance and the user from the internal Activity Map cache.
Parameters:
adocId - The Adoc instance.
Returns:
Vector A Vector of Tamap objects.
Throws:
RemoteException - Wrapped around any exception thrown.
See Also:
getAllAdocEvents, getAllPossibleBusinessEvents, com.ibm.epic.bfm.ejb.base.Tamap

findTamapsByAdocForUser

public java.util.Vector findTamapsByAdocForUser(java.lang.String adocId,
                                                java.lang.String user)
                                         throws BFMClientException
Deprecated. As of WSBI 2.0. With the advent of the generic serviceRequest methods the Adoc query methods should be used.

Finds all the Workflow Activities active for an adoc instance and the user from the internal Activity Map cache.
Parameters:
adocId - The Adoc instance.
Returns:
Vector A Vector of Tamap objects.
Throws:
RemoteException - Wrapped around any exception thrown.
See Also:
getAllAdocEvents, getAllPossibleBusinessEvents, com.ibm.epic.bfm.ejb.base.Tamap

findTamapsByProcessInstance

public java.util.Vector findTamapsByProcessInstance(java.lang.String procId)
                                             throws BFMClientException
Deprecated. As of WSBI 2.0. With the advent of the generic serviceRequest this method should not be required.

Finds all the Workflow Activities active for the process instance from the internal Activity Map cache.
Parameters:
procId - The Process instance.
Returns:
Vector A Vector of Tamap objects.
Throws:
RemoteException - Wrapped around any exception thrown.
See Also:
getAllAdocEvents, getAllPossibleBusinessEvents, com.ibm.epic.bfm.ejb.base.Tamap

findTamapsByUser

public java.util.Vector findTamapsByUser(java.lang.String user)
                                  throws BFMClientException
Deprecated. As of WSBI 2.0. With the advent of the generic serviceRequest methods the Adoc query methods should be used.

Finds the Workflow Activities for the given user from internal Activity Map cache.
Parameters:
user - The user Id.
Returns:
Vector of Tamap objects.
Throws:
RemoteException - Wrapped around any exception thrown.
See Also:
getAllAdocEvents, getAllPossibleBusinessEvents, com.ibm.epic.bfm.ejb.base.Tamap

getAdoc

public java.lang.Object getAdoc(java.lang.Object adocKey,
                                java.lang.String adocType)
                         throws BFMClientException
Gets an Adoc. Gets the remote Solution Adoc object using the key for the adocType. The key object passed in must be the key object for the Solution Adoc. A runtime exception will be thrown if it is otherwise.
Parameters:
key - The primary key of the particular solution adoc e.g RFQAdocKey
adocType - The adoc Type. e.g. RFQ
Returns:
Object The adoc Object. It needs to be narrowed to the appropriate adoc.
Throws:
RemoteException - The exception description.

getAdoc

public com.ibm.b2bi.im.bfm.client.AdocDetails getAdoc(java.lang.String adocId)
                                               throws BFMClientException
Gets the AdocDetails object for the given adoc instance.
Parameters:
adocId - The adoc Id
Returns:
AdocDetails The AdocDetails Object.
Throws:
RemoteException - The exception description.
See Also:
com.ibm.epic.bfm.ejb.base.AdocDetails

getAdocFromTaskId

public java.lang.String getAdocFromTaskId(java.lang.String taskId)
                                   throws BFMClientException
Gets the ADOC ID for the given Task ID.
Parameters:
taskId - Task ID.
Returns:
Returns the ADOC ID for the given task ID. Returns null if it fails.
Throws:
BFMClientException - Thrown if any exception occurs in executing the request.

getAdocs

public java.util.Vector getAdocs(java.lang.String adocType,
                                 java.lang.String user,
                                 java.lang.String state)
                          throws BFMClientException
Gets a list of Adocs matching some criterion. Gets a list of AdocDetails for given adocType or user or a state or any combination of the above three.
Parameters:
adocType - Adoc Type.
user - Adoc owner
state - Adoc State
Returns:
Vector A list of AdocDetails objects.
Throws:
RemoteException - The exception description.
See Also:
com.ibm.epic.bfm.ejb.base.AdocDetails

getAdocsByFilter

public java.util.Vector getAdocsByFilter(java.lang.String adocType,
                                         java.lang.String user,
                                         java.lang.String state,
                                         java.util.Hashtable filterParams)
                                  throws BFMClientException
Gets a list of Adocs based on an user filter. The filtering logic is implemented in the boolean filter (Hashtable filterParams) method on the solution Adoc. The filter method should return a true or false, based on which the Adoc is selected or not selected. This typically allows for Adoc selection based on referenced business object attributes.

A null can be passed for any/all of the Adoc attributes type, owner or state.

Parameters:
adocType - The Adoc Type.
user - The Adoc owner
state - The Adoc State,
Hashtable - filter parameters as name-value pairs
Returns:
Vector A list of AdocDetails objects.
Throws:
RemoteException - The exception description.
See Also:
getAdocsByFilter, com.ibm.epic.bfm.ejb.base.AdocDetails

getAdocsByFilter

public java.util.Vector getAdocsByFilter(java.lang.String adocType,
                                         java.util.Hashtable filterParams)
                                  throws BFMClientException
Gets a list of Adocs based on an user filter. The filtering logic is implemented in the boolean filter (Hashtable filterParams) method on the solution Adoc. The filter method should return a true or false, based on which the Adoc is selected or not selected. This typically allows for Adoc selection based on referenced business object attributes.
Parameters:
adocType - Adoc Type.
Hashtable - filter parameters as name-value pairs
Returns:
Vector A list of AdocDetails objects.
Throws:
RemoteException - The exception description.
See Also:
getAdocsByFilter, com.ibm.epic.bfm.ejb.base.AdocDetails

getAllAdocEvents

public java.util.Vector getAllAdocEvents(java.lang.String adocType,
                                         java.lang.String state,
                                         java.lang.String role,
                                         java.lang.String user)
                                  throws BFMClientException
Gets a list of Adocs and get a list of events that the Adoc alone can accept in current state. The event list would also include the ones that can be raised on Activities that the Adoc maybe associated with. The input parameters can be provided in any combination, although a null needs to be specified if the particular attribute is insignificant.
Parameters:
adocType - An Adoc Type. Provide null if unknown.
state - An Adoc State. Provide null if unknown.
role - The Role of the interacting user. Provide null if unknown.
user - The name of the user. Provide null if unknown.
Returns:
Vector A Vector of AdocEvents.
Throws:
RemoteException - The exception description.
See Also:
com.ibm.epic.bfm.ejb.base.AdocEvents

getAllPossibleBusinessEvents

public java.util.Vector getAllPossibleBusinessEvents(java.lang.String adocId,
                                                     java.lang.String role,
                                                     java.lang.String user)
                                              throws BFMClientException
Gets a list of events that the Adoc alone can accept in current state. The event list would also include the ones that can be raised on Activities that the Adoc maybe associated with.
Parameters:
adocId - An Adoc Instance identifier.
role - The Role of the interacting user. Provide null if unknown.
user - The name of the user. Provide null if unknown.
Returns:
Vector A Vector of named event String.
Throws:
RemoteException - The exception description.
See Also:
getAllAdocEvents

getArchivedAdocs

public java.util.Vector getArchivedAdocs(java.lang.String adocType,
                                         java.lang.String startDateTimeStr,
                                         java.lang.String endDateTimeStr)
                                  throws BFMClientException
Gets a list of Adocs that have been archived. This is probably a call that would be made as first step to revive (restore) an adoc or a group of adocs. All Adocs that have been archived within the given period of time (both start and end time is provided) , before a particular time (only end time is provided) or after a particular time (only start time is provided) will be returned.
Parameters:
adocType - An Adoc Type. Provide null if unknown.
startDateTime - Provide in the format [MM:DD:YY] HH:MM AM/PM eg. 4/12/01 1:40 AM, 1:00 PM (1:00 PM today) or null
endDateTimeStr - Provide in the format [MM:DD:YY] HH:MM AM/PM eg. 4/12/01 1:40 AM, 1:00 PM (1:00 PM today) or null
Returns:
Vector A Vector of AdocDetails.
Throws:
RemoteException - The exception description.
See Also:
com.ibm.epic.bfm.ejb.base.AdocDetails

getEventListForAdoc

public java.util.Vector getEventListForAdoc(java.lang.String adocId,
                                            java.lang.String role)
                                     throws BFMClientException
Gets a list of events that the Adoc alone can accept in current state.
Parameters:
adocId - An Adoc Instance identifier.
role - The Role of the interacting user. Provide null if unknown.
Returns:
Vector A Vector of named event String.
Throws:
RemoteException - The exception description.
See Also:
getAllPossibleBusinessEvents

getEventListForTask

public java.util.Vector getEventListForTask(java.lang.String taskId,
                                            java.lang.String role)
                                     throws BFMClientException
Gets a list of events that the Activity alone can accept in current state.
Parameters:
taskId - An Activity Instance identifier.
role - The Role of the interacting user. Provide null if unknown.
Returns:
Vector A Vector of named event String.
Throws:
RemoteException - The exception description.
See Also:
getAllPossibleBusinessEvents

getInboxList

public java.util.Vector getInboxList(java.lang.String user)
                              throws BFMClientException

getProcDetails

public com.ibm.b2bi.im.bfm.client.Tamap getProcDetails(java.lang.String taskId)
                                                throws BFMClientException

getWorklist

public java.util.Vector getWorklist(java.lang.String user)
                             throws BFMClientException

incomingEpicMessage

public java.util.Hashtable incomingEpicMessage(com.ibm.b2bi.im.bfm.client.EpicMessage em)
                                        throws BFMClientException
This method provides the necessary logic to map/transform an incoming message (EpicMessage) to raise an event on an Adoc instance using the serviceRequest method.
Parameters:
EpicMessage - A full formed message as an EpicMessage.
Returns:
Hashtable The output, similar to the ones produced by the serviceRequest method.
Throws:
RemoteException - The exception description.
See Also:
serviceRequest

incomingEpicMessage

public java.util.Hashtable incomingEpicMessage(java.lang.String bodyCategory,
                                               java.lang.String bodyType,
                                               java.lang.String corrId,
                                               java.lang.String message)
                                        throws BFMClientException
This method provides the necessary logic to map/transform an incoming message (EpicMessage) to raise an event on an Adoc instance using the serviceRequest method.
Parameters:
bodyCategory - The Body Category of the message. This is mapped to an Adoc Type
bodyType - The Body Type of the message. This is mapped to the event to be raised on the Adoc.
corrId - The correlation Id of the message. This is assumed to be the Adoc Id.
message - The message itself in a stringified form.
Returns:
Hashtable The output, similar to the ones produced by the serviceRequest method.
Throws:
RemoteException - The exception description.
See Also:
serviceRequest

initialize

public void initialize()
                throws BFMClientException
Gets a reference to BFMAdmin server object. This object is used for all future communications with the server for accessing ADOC beans and other objects.
Throws:
BFMClientException - Thrown if communication with the sever failed or any other unknown error occurs.

invoke

public java.util.Hashtable invoke(java.lang.String commandId,
                                  java.util.Hashtable _context,
                                  java.util.Hashtable _inputList)
                           throws BFMClientException
Allows to execute any command defined in the command.xml without involving a Controller.
Parameters:
commandId - The command Id, as defined in the command.xml
_context - Hashtable of context info
_inputList - Hashtable of input info
Returns:
Hashtable Output values of the command executed.
Throws:
RemoteException - The exception description.

remove

public void remove()
Removes the instance of BFMAdmin in BFM server.

removeAdoc

public void removeAdoc(java.lang.String strkey)
                throws BFMClientException
Removes the given Adoc object. Life cycle management of Adocs are handled automatically. Use this method with caution.
Parameters:
key - The primary key for the Adoc object.
adocType - The adoc Type
Returns:
void
Throws:
RemoteException - The exception description.

resolveDocument

public com.ibm.b2bi.im.bfm.client.AdocDetails resolveDocument(java.lang.String taskId)
                                                       throws BFMClientException

reviveAdoc

public java.lang.Object reviveAdoc(java.lang.String adocId)
                            throws BFMClientException
Revives the Adoc specified in the AdocDetails . If a revive (Hashtable solutionAttributes) is implemented on the Solution Adoc, all business attributes that were archived are passed onto this method for reinitializinf the referenced business objects. For more information please read the Adoc Life Cycle Management section of the PBS Developer Guide.
Parameters:
AdocDetails - The adoc structure holding the base adoc attributes
Throws:
RemoteException - Wrapped around any exception thrown.
See Also:
com.ibm.epic.bfm.ejb.base.AdocDetails, archiveAdocs

serviceRequest

public java.util.Hashtable serviceRequest(java.lang.String request,
                                          java.util.Hashtable context,
                                          java.util.Hashtable input,
                                          java.lang.String adocId,
                                          java.lang.String user)
                                   throws BFMClientException
This method does a state transistion change on a Adoc controller.
Parameters:
request - The Event.
context - The context information.
input - The input information.
adocId - The adoc Id.
Returns:
Hashtable The output of task controller commands.
Throws:
RemoteException - The exception description.

setServerString

public void setServerString(java.lang.String serverString)
Sets the location of the BFM server.

taskServiceRequest

public java.util.Hashtable taskServiceRequest(java.lang.String request,
                                              java.util.Hashtable context,
                                              java.util.Hashtable input,
                                              java.lang.String taskId)
                                       throws BFMClientException
This method does a state transistion change on a task controller. If a task controller is not defined for a Task (i.e WorkItem in MQWF) then the default task controller is used.
Parameters:
request - The Event.
context - The context information.
input - The input information.
taskId - The task Id.
Returns:
Hashtable The output of task controller commands.
Throws:
RemoteException - The exception description.