Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | API Reference | awSet | awSetSequenceField
 
awSetSequenceField
BrokerError awSetSequenceField(
BrokerEvent event,
char *field_name,
short field_type,
int src_offsetint dest_offset,
int n,
void *source_values);
event
The event whose sequence field is to be set.
field_name
Name of the event sequence field.
field_type
A field type, such as FIELD_TYPE_BOOLEAN, defined in <awetdef.h>.
src_offset
The number of elements to skip from the beginning of the source sequence.
dest_offset
The number of elements to skip from the beginning of the destination sequence.
n
Number of elements in the source sequence.
source_values
An array of source values to use. See awSet<type>SeqField for the appropriate types.
Sets the values of the destination sequence field field_name to the values contained in the source sequence source_values. The elements in the source and destination sequence are of the type represented by field_type.
Note:
A sequence of sequences cannot be set with this function.
This function may overwrite all or part of the destination sequence field or cause the destination sequence to grow, if a larger number of elements are stored into the sequence. This function never reduces the number of elements in the destination sequence: You must use awSetSequenceFieldSize function to reduce the size of a sequence.
If you set five elements (a, b, c, d, e) into a sequence at location 0, the sequence would appear as: [a b c d e]. If you then set three elements (1, 2, 3) into this same sequence at location 0, the sequence would then appear as follows:
[1 2 3 d e]
Note:
Attempting to set an event field with a type that does not match the event's definition will result in an error being returned. No error will be returned if FIELD_TYPE_STRING values are used to set a sequence field whose type is FIELD_TYPE_UNICODE_STRING. In these cases, the ANSI strings that are supplied will automatically be converted to unicode strings.
See Specifying Field Names for complete information on specifying field_name.
Possible BrokerError major codes
Meaning
AW_ERROR_FIELD_NOT_FOUND
The event is associated with a Broker client and field_name does not exist in the event.
AW_ERROR_FIELD_TYPE_MISMATCH
The field's type does not match the type of field_type or the field_name incorrectly accesses a type.
AW_ERROR_INVALID_EVENT
The event is invalid.
AW_ERROR_INVALID_FIELD_NAME
The field_name is invalid.
AW_ERROR_INVALID_TYPE
The field_type is FIELD_TYPE_SEQUENCE or is not a supported field type.
AW_ERROR_NULL_PARAM
The parameter field_name or source_value is NULL.
AW_ERROR_OUT_OF_RANGE
The src_offset is out of range, the dest_offset is less than zero, or n is less than -1.
See also: