Set the HTTP header - for attachment

Besides cookie in the HTTP header, the endpoint system (Service Anywhere) also requires fs_filename to perform attachment exchange. The function below adds cookie and fs_filename into the HTTP header.

Out-of-box function:

CaseExchange_SAWUtil.getAttachHttpHeader

The function has the following parameters:

  • direction: The direction of the action. This parameter has only two values:

    • lib.smis_Constants.MAPPING_DIRECTION_LEFTRIGHT()
    • lib.smis_Constants.MAPPING_DIRECTION_RIGHTLEFT()

    You can call the lib.CaseExchange_CommonLib.isOutbound(direction) or lib.CaseExchange_CommonLib.isInbound(direction) function to judge if the action is inbound or outbound.

  • param: All parameters defined in the SMIS configuration. You can get a specific parameter value by using the param['object'] syntax. If you change any value in this parameter, the change is saved to the SMIS configuration.
  • attachObj: For inbound activities, this is an instance of CEAttachment. For outbound activities, this is an instance of the Attachment object in Service Manager.

The function returns the following result:

Object: The HTTP Header object