Announcement

Collapse
No announcement yet.

Custom Destination Type

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom Destination Type

    I am wondering if it is easy to create your own custom destination type and add it to the server? I want to be able to use the filtering mechanisms to weed out chater and then when the appropriate message comes along have my own class be called with a reference to the incoming data so I can pull out what I need and make calls to existing service methods or perhaps create a jms message, etc.

    Is this type of extension possible? Is there any docs or samples to look at?

    Thanks,

    Gray Jones

  • #2
    Re: Custom Destination Type

    This is possible, however we will need to work with you a bit to define the interfaces you need to make this happen.

    Can you create an issue in the tracker (www.mirthproject.org/jira) with your request?

    Thanks,
    -Chris
    Chris Lang

    Comment


    • #3
      Re: Custom Destination Type

      Actually what I want to accomplish is straightforward within mule itself. Here I was able to hack the hello world example that ships with mule and able to insert my own class to receive the message data. I could easily extend my class to acquire handles to the necessary spring services and parse out the data I need.

      As of now I am leaning towards letting mirth be responsible for receiving the hl7 incoming requests and writing the data to a file. But then I will use mule directly to read the files from the directory and process the data. This will actually keep our deployment process fairly clean

      <mule-descriptor name="test"
      implementation="TestMuleReceiver">
      <inbound-router>
      <endpoint address="file:///c:/dev/test">
      <filter pattern="*.txt,*.xml"
      className="org.mule.providers.file.filters.Filenam eWildcardFilter"/>
      </endpoint>
      </inbound-router>
      <outbound-router>
      <router className="org.mule.routing.outbound.OutboundPassT hroughRouter">
      <endpoint address="file:///c:/dev/test2">
      </endpoint>
      </router>
      </outbound-router>
      <interceptor name="default"/>
      </mule-descriptor>

      public Object onCall(UMOEventContext eventContext) throws UMOException {
      System.out.println("onCall");
      String message = eventContext.getMessageAsString();
      System.out.println(message);
      return null;
      }

      Comment


      • #4
        Re: Custom Destination Type

        This is excellent - thanks for posting your results!

        One thing to watch for is re-deployments in Mirth which will regenerate the mule-config.xml.

        -Chris
        Chris Lang

        Comment

        Working...
        X