Executes a
collaboration, sending in
serialized data as the
triggering access data in the access request.
Syntax
string IexecuteCollaborationExtFmt(string collabName, string portName,
string serializedData, string mimeType, string verb);
Parameters
- collabName
- The name of the collaboration to execute.
- portName
- The name of the external collaboration port to which the access client is
bound.
- serializedData
- The serialized data that represents the triggering access data.
- mimeType
- The external format (as a
MIME type) of the serialized data.
- verb
- The value for the business object's
verb.
Return Values
A string that contains the serialized version of the business
object that the collaboration returns. This string is in the
mimeType external format.
Exceptions
- IExecuteCollaborationError
- Thrown when the collaboration is not active or the maps have
failed. This exception contains a status value set to one of the
following constants to indicate the details of the call when the exception
occurred. For more information on how to access this status, see IExecuteCollaborationError.
Constant Name
| Description
|
UNKNOWNSTATUS
| The status of the call to the IexecuteCollaborationExtFmt()
method is unknown.
|
FAILEDTOREACHCOLLABORATION
| The access request did not reach the collaboration.
|
FAILEDINEXECUTIONOFCOLLABORATION
| The access request failed while executing the collaboration.
|
FAILEDINRETURNTOCLIENT
| The collaboration executed but an error occurred while delivering the
response to the access client.
|
Notes
The IexecuteCollaborationExtFmt() method performs the same basic
task as IexecuteCollaboration(): it requests execution of the
collabName collaboration. The main difference is
that this method allows you to perform the following tasks with a single
call:
- Convert the serializedData data to a business
object, using the
data handler appropriate for the data's mimeType
MIME type. This business object represents the triggering access data
for the collaboration.
- Set the business object's verb to the specified verb
value.
- Send the business object to the portName port of the
collaboration to initiate execution of the collaboration. This port
must be configured as external so that is supports call-triggered flow.
- Note:
- No CORBA objects are passing in or out of this method.
The collaboration and port must be configured and mapped for call-triggered
flow and manipulation.
The mimeType parameter specifies the external format
of the serialized data for the business object. The Server Access
Interface uses this MIME type to determine which data handler it calls to
parse and convert the data into an IBM WebSphere InterChange Server business
object. The external format must be of a type that a data handler (IBM
WebSphere InterChange Server-delivered or a custom data handler you have
written) supports. For more on data handling, see the Data Handler
Guide.
Example
String portName = "From";
// Execute the collaboration
IBusinessObject resultantBO = null;
resultantBO = accessSession.IexecuteCollaborationExtFmt(
"getCustAcctPayable",
portName,
serializedXMLData,
"text/xml",
"Create");
