Copying nodes/actions from one place to another

This recipe will just present a simple approach for doing refactoring of nodes and actions. It uses the copy/paste functionality of the Eclipse OEPE to copy a node/action from one place to another.

Getting ready

You can import the OSB project containing the base set up for this recipe into Eclipse OEPE from chapter2getting-readycopying-nodes-actions.

How to do it...

Often when creating a new message flow, some node/actions are very similar. Instead of creating all of them from scratch, there is a way to copy them in Eclipse OEPE. To duplicate a PipelinePair node, perform the following steps:

  1. Open the CustomerManagement proxy service and navigate to the Message Flow tab.
  2. Right-click on the node/action to copy, for example, the PipelinePair node in the FindCustomer branch and select Copy.
  3. Right-click on the PipelinePair node and select Paste.
  4. The PipelinePair has been duplicated under the new name PipelinePair1.
    How to do it...
  5. The whole PipelinePair node including all nested nodes and actions is duplicated.
  6. The new node can now be moved to another place, if necessary, by applying the previous recipe Moving nodes/actions in Eclipse OEPE by drag-and-drop.

How it works...

The copy functionality in Eclipse OEPE provides a simple and efficient way to duplicate functionality in another place. This is handy because often the same kind of functionality is needed and there is no way to reuse code within a single message flow other than by copying it.

Sometimes it might not be possible to paste at the right place because the menu item is not available in both the context-sensitive menu as well as the main menu. In that case, duplicate the given node/action where it is allowed and then move it by applying the Moving nodes/actions in Eclipse OEPE by drag-and-drop recipe.

The copy/paste functionality also works across proxy services. Just open both artifacts and copy from one to the other. This is similar to copying text from one editor to another.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset