Skip to content

Create a Sequence Template

Follow the instructions below to create a new Sequence Template in the Micro Integrator for Visual Studio Code extension (MI for VS Code).

Instructions

Create the Sequence Template artifact

  1. Launch Visual Studio Code with the Micro Integrator for VS Code extension (MI for VS Code) installed.

    Info

    Follow the Install Micro Integrator for VS Code documentation for a complete installation guide.

  2. Create an integration project.

  3. Go to Micro Integrator Project Explorer > Templates.

    Create sequence template

  4. Hover over Templates and click the + icon that appears to open the Template Form below.

    Add API

  5. In the Template Form, select Sequence Template.

    Create sequence template

  6. Enter a unique name for the template.

    Template artifact

  7. Specify the vales for the required parameters in the sequence template.

  8. Click Create.

    The template is created in the /src/main/wso2mi/artifacts/templates folder under the integration project you created.

Update properties

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

    Sequence template view

  2. Add 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.

    Sequence template design view

Design the integration

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

  1. Open the Resource View of your mediation sequence.

  2. Add the Call Template Mediator from the Palette under Mediators > Generic to the relevant position in the mediation sequence.

    Sequence template resource view

  3. In the Call Template pane, select the previously-created sequence template from the Target Template dropdown.

  4. Add required values using the Call-Template Parameters.

    Call template pane

Learn more about sequence templates

Follow our examples on sequence templates: