官术网_书友最值得收藏!

Using context menu to add nodes and actions to message flow

So far we have used the drag-and-drop feature for adding nodes and actions to the message flow of a proxy service. However, there is also a more developer-friendly approach, where we don't have to know where in the palette a given item is and especially which items are allowed in a given context.

Getting ready

You can import the OSB project containing the base setup for this recipe into Eclipse OEPE from \chapter2\getting-ready\using-context-menu-to-add-nodes-actions.

How to do it...

Navigate to the Message Flow tab and perform the following steps:

  1. In the message flow, right-click on any element, for example, on the Default branch of the operational branch node.
  2. In the given context, Insert Into and Insert After are possible.
  3. Select Insert Into and then the element to be added. In the given context, the Default handler, only a Conditional Branch, an Operational Branch, a Pipeline Pair, or a Route are valid and therefore the context menu only holds these items.
    How to do it...
  4. Select Pipeline Pair to add the unsupported error-handling code as shown in the previous screenshot.
  5. Right-click on the Request Pipeline of the pipeline pair just added earlier and check the context menu.
  6. Only Insert Into | Stage is available in this context.
    How to do it...

How it works...

The context-sensitive menu helps in choosing the right element at a given place in the message flow. There is an Insert Into and an Insert After menu, the first inserting the element into the element that holds the focus and the second one adding it after the one holding the focus.

This is very helpful, especially for a beginner, because this way we no longer have to exactly know which elements are allowed at a given place in the message flow. If using the drag-and-drop feature, the drop will not be possible for a certain action or node, if it's not allowed in the given context. Only those elements that are valid at the given context can be chosen.

主站蜘蛛池模板: 仁化县| 株洲县| 林甸县| 南溪县| 泗水县| 买车| 汉寿县| 屯留县| 遵义市| 富顺县| 漳平市| 南皮县| 江北区| 营口市| 双峰县| 花莲县| 揭阳市| 柯坪县| 连云港市| 安西县| 龙门县| 乌鲁木齐县| 普兰店市| 泌阳县| 米林县| 光泽县| 柘城县| 新乡县| 金山区| 万荣县| 嘉兴市| 桐乡市| 龙江县| 佛山市| 自治县| 黄冈市| 云阳县| 阜新市| 岫岩| 塔城市| 甘泉县|