IBM Integration Bus: Creating A Basic Pattern
IBM Integration Bus: Creating A Basic Pattern
June, 2013
This hands-on lab is the first of several labs which show you how to create your own patterns. It
starts by taking a simple message flow (an exemplar) and creating a pattern based on this flow.
Later labs show you more sophisticated tools that you can use to refine your patterns.
Select the Transform project; this will load the Transform message flow, contained in the
Transform application.
2.
3. Create a Pattern Authoring project. Click File, New, Pattern Authoring project.
5. Select the required message flow project….. Transform, and click Finish.
Note the four primary tabs near the bottom of the window.
1) Source Files: this is selected initially, and allows you to select the required files for
this pattern.
2) Pattern Configuration: allows you to edit the pattern definition.
3) Categories: allows you to create and manage your pattern categories.
4) Create Pattern: provides the tools to create and manage the pattern plug-ins so they
can be used by the pattern user.
7. Now select the Transform.msgflow editor tab, and return to the flow editor.
8. Right-click the MQInput node, and select Pattern -> “Select Target Properties”.
9. Expand the Basic group, and select the “Queue Name” as a target property.
Then close the Target Properties dialogue pop-up, by clicking on the cross (top right).
10. Note that the message flow MQInput node now shows the “Pattern Authoring” icon close to
the node itself. This indicates that at least one property of this node has been selected as a
Target Property for pattern authoring. You can click directly on this icon to reopen the Target
Properties editor.
11. Now save and close the message flow in the usual way.
12. You will now see that MyPattern project has been automatically updated to reflect the
selected target property.
The name of the target property is the fully qualified pathname to the property in the
workspace. It includes the project name, schema name, message flow name, node name
and property name.
A pattern parameter has been automatically created for the target property. The pattern
parameter has been added to a group whose name matches the node.
14. Select (highlight) the MQ_Input group, and the click the Edit button
15. Change the Group name and description text to suitable values for your organization. Click
OK.
This page of the Pattern Authoring editor is where you create additional pattern categories.
You also choose the category for this new pattern.
The tree shows all of the categories that are currently available. The page also shows the
pattern specification for the selected pattern. Pattern specifications describe the pattern, any
constraints and limitations, and when to use it. The specifications are HTML files which you
can edit directly.
To ensure you see all the available buttons, you should maximize the editor (double-click the
“MyPattern.pattern” tab).
17. Click “Add Category”, and choose a name for your new category (eg. MyVeryOwnCategory).
Click OK.
18. Click Yes at the save prompt. You will now see your new category in the pattern menu.
19. Now drag and drop the new pattern 'MyPattern' onto the new category.
Before:
After:
20. Open the HTML for the specification (click the “Edit HTML” button).
21. You can change the HTML in any way you want, using any standard HTML constructs.
We will just change the title, to illustrate how to do this.
For example, change the title to “My Very Own Pattern Specification”.
The pattern specification has been edited and saved. The Pattern Authoring editor has
automatically updated the preview.
Provide some suitable value for the pattern plug-in information. For example:
Plug-in ID: com.betaworks.ibm.domain.MyPattern
Version: 1.0.0.0
Provider: IBM BetaWorks
Description: Plug-in created by BetaWorks Early Programs
Click “Test Pattern”. This will build the required pattern plug-ins, and then start a new
instance of the IBM Integration Bus Toolkit.
2. During the new Toolkit start-up, you will see this splash screen.
3. When the workspace selection window opens, take the suggested default, and click OK.
4. This is the second instance of the IBM Integration Bus Toolkit. Select the Patterns Explorer
view. This includes the pattern we have just created, under the new category
(MyVeryOwnCategory).
6. Expand the Queue Information link. You will see that the field “Queue name” has been
highlighted in pink. This means that it is a required parameter, and must be set before you
can generate the new instance.
When creating the pattern, you could have provided a default value for this property, and
more detailed help to guide the pattern user. (We will examine this in a further exercise).
8. This shows the generated pattern instance. A pattern instance project and a message flow
project are created. The message flow is created within a IBM Integration Bus Application.
The message flow project contains the same message flow and ESQL files as the original
message flow. The only difference is that the queue name property on the MQInput node has
been configured by the pattern user.
9. Open the generated message flow. You will see that this flow is identical to the original flow,
except that the name of the input queue has been set by the pattern user.
You can now make further changes to this generated message flow, as required by your own
organization’s development standards.