Skip to content

Create a Reusable Sequence

Follow these steps to create a new reusable sequence that you can add to your mediation workflow or refer to from a sequence mediator, or to create a sequence mediator and its underlying sequence all at once.

Instructions

Create a sequence 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, 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 Sequence under Other Artifacts to open the Sequence Form.

  7. Provide a unique name for the sequence.

  8. Specify the required values for the sequence.

  9. Click Create.


  • The sequence is created in the <PROJECT_NAME>/src/main/wso2mi/artifacts/sequences folder.

  • The created sequence is also available in the Palette, under All Mediators > Generic > Call Sequence, and is ready for use in other meditation workflows.

    Sample Sequence

    Call Sequence

Create from a sequence mediator

  1. Go to the graphical view of your proxy service.

  2. Click on the add (+) icon to open the Palette to access Mediators.

  3. Select Call Sequence.

    Edit Proxy

  4. In the Call Sequence pane, select the previously created sequence from the Referring Sequence dropdown. Then the sequence will be linked to the integration.

    referring sequence

Design the integration

  1. Once you create a sequence artifact, open its Resource View from Go to MI Project Explorer > Other Artifacts > Sequences.

  2. Click the + icon to open the Palette.

    Sequence design view

  3. Add the required integration artifacts from the Palette and design the integration flow.

    Sequence graphical editor

You can also use the Source view to update the sequence configuration.

Use the Source View

Click the Show Source (</>) icon located in the top right corner of the VS Code to view the XML-based synapse configuration (source code) of the reusable sequence.

Show Source View

You can update the sequence using this view.

Using Source View

Examples

Follow our examples on endpoint templates: