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¶
-
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.
-
Create an integration project.
-
To add a new Sequence, navigate to Micro Integrator Project Explorer.
-
Click on the + icon to open the Add Artifact pane.
-
Click + View More under Create an Integration.
-
Click Sequence under Other Artifacts to open the Sequence Form.
-
Provide a unique name for the sequence.
-
Specify the required values for the sequence.
-
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.
Create from a sequence mediator¶
-
Go to the graphical view of your proxy service.
-
Click on the add (+) icon to open the Palette to access Mediators.
-
Select Call Sequence.
-
In the Call Sequence pane, select the previously created sequence from the Referring Sequence dropdown. Then the sequence will be linked to the integration.
Design the integration¶
-
Once you create a sequence artifact, open its Resource View from Go to MI Project Explorer > Other Artifacts > Sequences.
-
Click the + icon to open the Palette.
-
Add the required integration artifacts from the Palette and design the integration flow.
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.
You can update the sequence using this view.
Examples¶
Follow our examples on endpoint templates: