Version 2

    Here's a quick summary of the properties support we would like to see in 0.8.  Let me know if I missed something or got something wrong.


    There are actually two different categories of properties that will be supported:


    • Environment Properties refer to properties which are resolved from the SwitchYard runtime environment and replaced inside the switchyard.xml application descriptor.
    • Implementation Properties refer to properties which are configured on a specific service implementation.  In other words, the property value is made available to service logic executing inside an implementation container.


    These two types of properties support distinct use cases within SwitchYard, yet they are compatible.  For example, an implementation property can be injected into application logic with a value from an environment property.


    Environment Properties

    Environment properties allow you to replace any attribute or element value in switchyard.xml with a property from the runtime environment.  The syntax for a replaced token is "${varName}" where "varname" is your property name.  The configuration layer in SwitchYard is configured with instances of PropertyResolver, which are used to resolve the value of a property based on its name.  Property values are resolved from the following locations:

    • System properties
    • Domain properties in switchyard.xml
    • SCA property definitions in the composite (this needs to be added)
    • Unit test properties (this needs to be added)


    Implementation Properties

    Implementation properties allow you to inject one or more property values into a service implementation.  This is based on the property support in the SCA assembly spec.  Since the property is injected into service implementation logic, the injection mechanism itself is unique to each implementation type.  The details for each implementation type follow:

    • Java : injected using @Property into a CDI bean
    • Camel : wired into Camel properties component and accessible in a Camel route using Camel's own {{varName}} property notation
    • BPMN 2 : inserted into process variables by data input associations
    • BPEL : mapped into process variables via an <assign> from property names
    • Drools : available in a global map