Basic Tutorial in Open eHealth IPF V2.0

I’ve just upgraded to V2.0 and to verify my install (really just checking my eclipse config for IPF) wanted to do a quick run of the basic tutorial. The first part of it (before extending it to set up an HTTP endpoint) was fine but there is a documentation bug for the latter part of the tutorial. The code shown in the tutorial that needs to be added to the SampleModelExtension.groovy file is missing an import; the file should be as follows:package org.openehealth.tutorial  import org.apache.camel.model.ProcessorDefinitionimport org.apache.camel.Exchange    class SampleModelExtension {    static extensions = {    ProcessorDefinition.metaClass.reverse = {      delegate.transmogrify { it.reverse() }    }      ProcessorDefinition.metaClass.setFileHeaderFrom = { String sourceHeader ->      delegate.setHeader(Exchange.FILE_NAME) { exchange ->        def destination = exchange.in.headers."$sourceHeader"        destination ? "${destination}.txt" : 'default.txt'      }    }  }}Threw me for a bit of a loop because the camel javadocs are still describing the pre-camel-v2.0 Exchange interface which doesn’t include a FILE_NAME field.Now I just have to find the time to figure out how to file doc bugs for IPF and Camel…

One Comment

  1. Martin Krasser

    November 14, 2009

    Hi Cornelia,thanks for posting your findings about the IPF tutorials (in this and your previous post). I’ll take care of this in the IPF documentation.If you’d like to contribute to documentation improvements (and we’d like to see your contributions) you can request a Wiki account on the IPF mailing lists. For details see http://repo.openehealth.org/confluence/display/ipf2/Contributing. This page also describes to to file bugs etc.If you have any further questions about IPF please let us know on the mailing lists.Thanks,Martin

Share Your Thoughts