Creating Sequence Templates

Follow the instructions given below to create a new Sequence Template in WSO2 Integration Studio.

Instructions

Creating the Sequence Template artifact

  1. Right-click the ESB Config project and go to New → Template to open the New Template Artifact dialog box.

  2. Select Create a New Template and click Next.

  3. Enter a unique name for the template and select Sequence Template from the list.

    Specify values for the required parameter for the selected endpoint type.

  4. Do one of the following to save the artifact:

    • To save the template in an existing ESB Config project in your workspace, click Browse and select that project.
    • To save the template in a new ESB Config project, click Create new Project and create the new project.
  5. Click Finish

    The template is created in the src/main/synapse-config/templates folder under the ESB Config project you specified.

  6. To use the sequence template, update the properties.

Updating properties

  1. Open the Design View of the sequence template you created.

  2. Drag-and-drop the required mediators from the Palette.

  3. Specify parameter values as an XPATH.

    In the following example, the GREETING_MESSAGE property of the Log mediator is specified using the $func:message expression.

Designing the integration

When you have a Sequence template defined, you can use a Call Template Mediator in your mediation sequence.

  1. Open to the Design View of your mediation sequence.
  2. Drag the Call Template Mediator from the Palette and drop it to the relevant position in the mediation sequence.

  3. Double-click the Call Template Mediator icon to open the Properties tab.

  4. Select your sequence template from the list in the Available Templates field and then add values using the template parameters.

Examples

Top