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¶
-
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 Template, navigate to Micro Integrator Project Explorer.
-
Click on the + icon to open the Add Artifact pane.
-
Click + View More under Create an Integration.
-
Click Template under Other Artifacts to open the Template Form.
-
In the Template Form, select Sequence Template.
-
Enter a unique name for the template.
-
Specify the vales for the required parameters in the sequence template.
-
Click Create.
The template is created in the
<PROJECT_NAME>/src/main/wso2mi/artifacts/templates
folder under the integration project you created.
Update properties¶
-
Go to MI Project Explorer > Other Artifacts > Templates, and select the sequence template to open the Resource View of the sequence template you created.
-
Click the edit icon to edit the sequence template.
Design the integration¶
When you have a Sequence template defined, you can use a Call Template Mediator in your mediation sequence.
-
Open the Resource View of your mediation sequence.
-
Add the Call Template Mediator from the Palette under Mediators > Generic to the relevant position in the mediation sequence.
-
In the Call Template pane, select the previously-created sequence template from the Target Template dropdown.
-
Add required values using the Call-Template Parameters.
Examples¶
Follow our examples on sequence templates: