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.
-
Go to Micro Integrator Project Explorer > Templates.
-
Hover over Templates and click the + icon that appears to open the Template Form below.
-
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
/src/main/wso2mi/artifacts/templates
folder under the integration project you created.
Update properties¶
-
Open the Resource View of the sequence template you created.
-
Add the required mediators from the Palette.
-
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.
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.
Learn more about sequence templates
Follow our examples on sequence templates: