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. To add a new Sequence Template, navigate to Micro Integrator Project Explorer.

  4. Click on the + icon to open the Add Artifact pane.

    add artifact

  5. Click + View More under Create an Integration.

  6. Click Template under Other Artifacts to open the Template Form.

  7. In the Template Form, select Sequence Template.

    Create sequence template

  8. Enter a unique name for the template.

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

  10. Click Create.

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

Update properties

  1. Go to MI Project Explorer > Other Artifacts > Templates, and select the sequence template to open the Resource View of the sequence template you created.

    Sequence template view

  2. Click the edit icon to edit the sequence template.

    edit sequence template

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

Examples

Follow our examples on sequence templates: