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…
↧
Basic Tutorial in Open eHealth IPF V2.0
↧