You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Baltej Singh <bs...@ra.rockwell.com> on 2017/01/14 00:27:12 UTC

Issues referencing pojo method

When we write a file, we want to append an identifier pojo.getEventId() 
The $ syntax as documented does not seem to work correctly in the file uri 


1) <bean  class="com.xxx.b2mml.B2mmlProductionPerformance" id="b2mmlProductionPojo"/>

<to id="fileProductionPerformanceInfo"
                        pattern="OutOnly" uri="file:{{out.path}}/{{out-to-erp.milestone}}?fileName={{out-to-erp.milestone}}_$simple{date:now:yyyyMMddhhmmssSSS}_${bean:b2mmlProductionPojo.getEventId}.xml"/>


Filename: ProductionPerformance_20170112030940897_b2mmlProductionPojo.getEventId.xml


2)
<bean   class="com. xxx.b2mml.B2mmlProductionPerformance" id="b2mmlProductionPojo"/>

<to id="fileProductionPerformanceInfo"
                        pattern="OutOnly" uri="file:{{out.path}}/{{out-to-erp.milestone}}?fileName={{out-to-erp.milestone}}_$simple{date:now:yyyyMMddhhmmssSSS}_${bean:b2mmlProductionPojo?method=getEventId}.xml"/>


Filename: ProductionPerformance_20170112030940897_b2mmlProductionPojo.getEventId.xml

3)
<bean     class="com. xxx.b2mml.B2mmlProductionPerformance" id="b2mmlProductionPojo"/>

<bean id="testBean" beanType="com. xxx.b2mml.B2mmlProductionPerformance" method="getEventId" ref="b2mmlProductionPojo"/>
            <log id="logPayload_beanEventId" message="bean EventId is: ${bean:testBean}"/>

[org.apache.camel.NoSuchBeanException - No bean could be found in the registry for: testBean]