GetPartnerData
The GetPartnerData function returns selected data for a participant.
The participant to use and the type of data to retrieve are passed as parameters to the function.
Return type
The function return type is based on the data that is selected to be returned.
Function parameters
| Parameter order | Input variable type | Parameter data type | Required parameter | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Valid types are:
|
PARTNER | Yes | The participant to use to retrieve the data. | ||||||||||||||||||||||||||||||
| 2 | Constant | FIXED | Yes | The variable name to use for the data to be returned. The variable names are
case-sensitive.
|
||||||||||||||||||||||||||||||
| 3 | Constant | String | No. However, it is required if parameter 2 is CustomAttr | If parameter 2 is CustomAttr, this parameter is the name of the participant custom attribute whose value is assigned to the field. The custom attribute is a string value. |
Example
The following XML shows an example of using the GetPartnerData function in an assignment
element.
<taskDescriptor name="TaskName" type="ASSIGNMENT">
<assignments>
<assignment field="testClientType" type="GetPartnerData" value="ibmIntPartnerId, 'clientType'"/>
<assignment field="refTimezone" type="GetPartnerData" value="ibmIntPartnerId, 'CustomAttr', 'timezone'"/>
<assignment field="isRDFI" type="GetPartnerData" value="ibmIntPartnerId, 'HasRole', 'RDFI'"/>
</assignments>
</taskDescriptor>
In this example:
- The first assignment statement calls GetPartnerData to retrieve the value of the clientType field for participant ibmIntPartnerId. The value that is returned by the function is assigned to the testClientType field.
- The second assignment statement calls GetPartnerData to retrieve the value of the participant custom attribute called timezone for participant ibmIntPartnerId. The value that is returned by the function is assigned to the refTimezone field.
- The third assignment statement calls GetPartnerData to determine whether participant ibmIntPartnerId is assigned the RDFI role. The value that is returned by the function, either a Y or an N, is assigned to the isRDFI field.
Error return values
The following problems can occur when the value of a custom attribute is retrieved for a participant.
- The participant is unknown because it couldn't be located. The function returns an empty string, which is assigned to the data field that is being set. The data field is also marked not current.
- The custom attribute is unknown because it was not defined in the CUSTOM_ATTRIBUTE table. The function returns an empty string, which is assigned to the data field that is being set. The data field is also marked current.
- The custom attribute is not defined for the specific participant. The function returns an empty string, which is assigned to the data field that is being set. The data field is also marked current.
A trace message that indicates the reason for not assigning a value is logged. The data field that is being set is marked either current or not current so that tests on the condition can be done.