Camel route from does not substitute properties in Fuse Service Works

Solution Verified - Updated -

Issue

  • When defining the following camel route.
<?xml version="1.0" encoding="ASCII"?>
<routes xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="{{toScheme}}://ServiceBasic"></from>
        <log message="ServiceBasic - message received: ${body}" logName="Message"></log>
        <log message="ServiceBasic - property value for myProperty: ${properties:myProperty}, property value for myComponentProperty {{myComponentProperty}}" logName="Properties"></log>
        <choice>
            <when>
                <simple>${body} contains "hello"</simple>
                <log message="Detected 'hello' in message, modifying message to add 'World'"></log>
                <bean ref="org.jboss.switchyard.blueprint.basic.camel.processor.HelloProcessor"></bean>
                <to uri="{{toScheme}}://SYBean"></to>
            </when>
            <otherwise>
                <log message="'hello' not detected in message"></log>
                <to uri="{{toScheme}}://SYBean"></to>
            </otherwise>
        </choice>
    </route>
</routes>
  • The {{toSchema}} is correctly substituted in the <to ..> tags, but not substituted in the <from..> tag.

  • The following error is produced on deployment:

org.switchyard.SwitchYardException: Illegal character in scheme name at index 0: {{toScheme}}://ServiceBasic

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.0.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content