The form BTI:TE:WS_Interface is used to consume Web Services on the ActiveControl side. It is recommended that any additional Web Service calls made to ActiveControl over and above task creation do so using code associated with this form.
At the time of writing, workflow has been developed and tested for creating tasks in ActiveControl, but other workflow along similar lines could be created in Remedy to consume further Services. Such calls may necessitate the creation of additional input (i_) and output (o_) fields to accommodate the specific interfaces of other Services.
An overview of processing carried out by this form follows:
1. A record is created from workflow running on the CHG:Change Infrastructure form if values from a triggering condition record in the BTI:TE:WS_TriggerConditions form matches the field values in the Change Request record. The fields set at this point are:
2. An instance ID GUID is generated.
3. The Web Service input fields from the trigger condition entry referred to in step 1 are pulled into the i_ fields in this record along with some additional fields in the change record that is keyed off the sysRequestId field.
4. A value of CREATETASK is pushed to the z1D Action field in this record in order to trigger modify related code.
5. The first action on modify is loop through any custom field mappings defined in the BTI:TE:WS_CustomMappings form and pull the relevant source field values from the change request keyed off the sysRequestId field. Each value is drawn into the specific zi_ field in the interface record that is specified in the target reference in the mapping entry.
6. Once all mapping entries have been processed, the next step is to call the ActiveControl create task web service using the values of the input (i_ and zi_) fields.
7. If any errors result in the calling of this Web Service, the interface record is placed into an error state and a Work Log entry associated with the initiating Change Request is created. This entry contains details of the error encountered when calling the Web Service.
8. If there was an error on the ActiveControl end of the call that occurred after successful invocation of the Web Service, then the details will be contained in the output Web Service Message fields. An error is denoted by the code E in the o_Msgtyp field. In such an event, code will trigger to place the interface record into an error state and to create a Work Log entry associated with the initiating Change Request. This entry contains details of the error encountered after successful invocation of the Web Service.
9. Alternatively, if the Web Service was called successfully, it will return output values to the Web Service output (o_) fields.
10. If there was no form of error resulting from the Web Service call, it means a task now exists in ActiveControl that has as a reference equivalent to the Change Request number of the triggering Change. This outcome is indicated by the o_Msgtyp return field containing a null value. A successful call and return to the ActiveControl create task Web Service results in the interface record being marked as Processed and a push being performed to create a Work Log entry associated with the initiating Change Request. This entry contains details of the newly createdActiveControl Business Task.