Thursday, March 10, 2016

Adding a sequence to ESB local registry

Hi all,

Its' WSO2 ESB. Lets add an sequence to ESB local registry. Adding sequences/or resources in to governance or configuration registry is easy. Because you can do it easily through Management Console (UI).

Lets consider about local registry...


       1.  Login to ESB

       2.  Browse registry (Home > Registry > Browse)                                                                        

   
      3.  Then u can see config, governance and local registries under _system


      4.  Click on "local"

      5.  Click on "Add resource"


      6.  Give the sequence xml file. (You have to create separate xml file which contains sequence.)
      
<?xml version="1.0" encoding="UTF-8"?>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="localSeq">
    <log level="full">
        <property name="Message" value="This is on store sequence which is stored in local registry" />
    </log>
</sequence>
         
        (U have to save this xml file with the name of sequence. Ex: localSeq.xml)

       7. Click on "Add". Then it will be add to local.           


                                                                         
        8.  Then you have to point it via some mediator or from somewhere. I am using store mediator and pointing it as follows:
<store messageStore="reg" sequence="local:/localSeq.xml" />
             Use syntax "local:/localSeq.xml"


5 comments:

  1. Are those sequences that are added to registry accessible only on database or are they created also on file system?

    ReplyDelete
    Replies
    1. They are created on file system. So you can edit locally

      Delete
  2. Thank you for your answer but I cannot find those sequences on file system.

    ReplyDelete
    Replies
    1. You have to create sequence in a separate xml file and add it to your local file system (Ex: MyComputer/ESB/ ). Then give the path to that xml file. Then ESB taking the file dynamically and creating sequence through synapse configurations.

      Note: I given sample sequence file within the blog post. You just have to save it as xml file and add to a folder.

      Delete
  3. This comment has been removed by the author.

    ReplyDelete