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

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.

主站蜘蛛池模板: 吉木乃县| 沂南县| 日喀则市| 洱源县| 宜丰县| 新田县| 大关县| 克拉玛依市| 诸城市| 麦盖提县| 崇文区| 开化县| 宜昌市| 仁化县| 海阳市| 新民市| 军事| 榆林市| 新宾| 黔西| 铜梁县| 崇义县| 开原市| 台湾省| 碌曲县| 大悟县| 武邑县| 定结县| 如皋市| 绥中县| 佛教| 内黄县| 密云县| 林甸县| 平塘县| 梅河口市| 辽宁省| 襄城县| 隆德县| 威海市| 石渠县|