Variable Substitution In ESB Service - Forum - Technology Partner - Progress Community

Variable Substitution In ESB Service


Variable Substitution In ESB Service

  • Hi,

    I am having trouble understanding why my custom service that I created and the codeshare MailService do not perform variable substitution on the run time parameters.

    In both cases I have enabled run time substitution for those parameters, so I am able to choose what the substitution method will be.

    When I test my ESB process I can see that it uses expression for the parameter substitution, but not the derived value that the expression should have provided.

    Instead of resolving this to be an email addess: ${property:dynamic:sonicfs:///workspace/IES-SonicCommon/common/artifacts/}

    I actually get the expression as the parameter value.

    I do remember reading somewhere that a particular java libary/class need to be included with the service deployment so that substitution would occur. Problem is I don't remember where I read it.

    As a test, I enabled run time substitution on one of the parameters for the File Drop service and it works for it.

    The sonic system I have is 8.0.1



  • Hi,

    First thing to verify is, whether the custom java service you wrote is actually implementing SFCService interface or extending AbstractSFCServiceImpl.

    I attached a custom java service which supports the SFC based init/runtime parameters. It just prints the expression value in the container log.

    In this example, I just picked up a property from a properties file for both init and runtime parameters.



    From: On Behalf Of Ron Rudis

    Sent: Thursday, March 08, 2012 12:38 AM

    To: sonic-forum

    Subject: Fwd: New message: "Variable Substitution In ESB Service"

  • Thanks Ron/Kiran,

    Sorry for the delay in replying.

    I wasn't using any of the SFC classes. Your example helped me understand how to convert the custom java service that I had created using the sonic workbench to use substitution.

    Now I need to convert something a little more complex, a mail service from the code share, to use the SFC classes.

    Would you be aware of a new java service type template for the workbench?    The existing one does not use the SFC classes.

    Thanks for your help,


  • Tony,

    We do not have in-built product support in the form of java templates for creating SFCService implementations yet. We are planning to address this in 8.6 release.

    However, workbench does provide an override mechanism wherein user can state a different jet template to be used for New Java Service types. This is available as a preference option here:

    Windows -> Preferences -> Progress Sonic -> ESB Editors -> JSDE -> Template Location -> Use customer template

    Hence, we can leverage this option and point to a jet template for SFCService. sfcservice-wrapper.javajet, an SFCService specific jet template, is attached.

    Ideally, please import sfcservice-wrapper.javajet into sonicfs://Resources. However, the template can be referred from the local file system as well (For this, launch file chooser dialog using ‘Local File System’ option available in the chooser drop down menu)

    Note: you will still have to manually add the following jars to the project classpath:

    • esb_sfc.jar (available in {SONIC_INSTALL}/ESB8.0/lib)

    • xq_container.jar (available in {SONIC_INSTALL}/ESB8.0/lib)

    • mgmt_client.jar (available in {SONIC_INSTALL}/MQ8.0/lib)

    This step is mandated otherwise the generated source code will not compile. Add jars to the java build path via Properties -> Java Build Path.

    The solution suggested is just a workaround to assist you with current Sonic release, going forward when we have product support for this template, Sonic tools will automatically update the project classpath. But as of now this manual step is required.