Setting up outbound message composition

To create a new outbound message and use the composition service for the message, do the following:

  1. Create a new controller command or customize an existing task command to send a message with a  certain message ID or name.
  2. Add a row into MSGTYPES table assign a msgtype_id with a new viewname, based on the command.
  3. Create a new row with the VIEWNAME in VIEWREG table and  assign the devicefmt_id, and JSP template name (with the full path).
  4. Create a profile in the PROFILE table using the WebSphere Commerce  Administration Console, and  assign the message type to the correct transport (e.g. e-mail) and device format (e.g. standard device format). See 
    Assigning a transport method to a message type for a site or store. A valid device format ID, as specified in the VIEWREG table, must be specified for each transport to be used. This device format ID (ie. DEVICEFMT_ID) must match with the one added into VIEWREG table to in order to be able to pick the right JSP template file for composition. The following are the values you should use in the VIEWREG table:
    SOAP XML data transmitted via HTTP = -1
    HTTP Browser = Reserved for IBM 
    use Standard Device Format = -3
    WebSphere MQ Adapter for XML = -4
    WebSphere MQ Adapter for WCS (Legacy message) = -5
    
  5. Note: Most out-of-box message types (regardless for which transport they were designed) are designed to use the standard device format. What choice to pick is strictly dependent on how the entries for the VIEWREG table are created. The default values of device format ID may change in future releases.
  6. Create a messaging system object using the SendMsgCmd task command. Use the setMsgType() and setStoreId() initialization services.
  7. Invoke the SendMsgCmd.execute() method.