IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

how to set the environment variables in CAF

  • 1.  how to set the environment variables in CAF

    Posted Mon July 27, 2015 07:15 AM

    Hi,

    I am working on a CAF project in webMethods version 8.0.
    After binding the connector to the fields, I tried to publish it to the MWS and checked the page.
    But it threw ACCESS DENIED error.

    After a bit of research, I manually changed the web.xml values(wsclient-socketTimeout, wsclient-username, wsclient-password) and it worked. But I think its not a good practice at all.

    How can we fix this issue without manually changing anything?
    Please reply as it is bit urgent.

    Regards
    Jyoti


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine


  • 2.  RE: how to set the environment variables in CAF

    Posted Mon July 27, 2015 01:55 PM

    Hi Jyoti,

    bind these in the designer to variables “${…}”.

    You can then set those values in MWS using sysadmin to the correct values after deployment.

    Administration Dashboard → CAF Application Runtime → → Environment Settings

    You can even modify the endpoint-address here.

    See CAF_Development-Guide for further information.

    Regards,
    Holger


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS


  • 3.  RE: how to set the environment variables in CAF

    Posted Thu July 30, 2015 06:53 AM

    Hello,

    There are multiple ways to set values you use for the IS calls

    1. directly on the property bindings

    private static final String MYISCALL_PROPERTY_BINDINGS = new String {
    { “#{myISCall.authCredentials.userName}”, “Administrator” },
    { “#{myISCall.authCredentials.password}”, “manage” },
    { “#{myISCall.endpointAddress}”, “http://localhost:5555/soap/rpc” },
    { “#{myISCall.socketTimeout}”, “500000” }, };

    1. in the web.xml as you did

    2. in configuration files
      wsclient-endpointAddress=http://localhost:5555/soap/rpc
      wsclient-username=Administrator
      wsclient-password=manage
      wsclient-socketTimeout=500000

    In this case you will need also to have a class that reads the configuration files and saves the values in a Properties object maybe.

    1. As Holger mentioned above.
      However please note that the change you make in this way will require an application restart.

    Hope it helps,
    Vlad


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 4.  RE: how to set the environment variables in CAF

    Posted Thu July 30, 2015 09:43 AM

    Yes Turian. We set the variables in web.xml file. I just wanted to know if that is the correct way.

    Thank You
    Jyoti


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 5.  RE: how to set the environment variables in CAF

    Posted Mon September 14, 2015 11:05 AM

    Hi Turian/All,

    My code has been deployed to UAT IS.
    My doubt is:
    I have my CAF project in the DEV designer, and the connector is referring to the DEV URL right now.
    How to migrate this project to UAT or is there any way to change the end point of the connector to UAT URL so that the UIs work fine in UAT environment.

    Regards
    Jyoti


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 6.  RE: how to set the environment variables in CAF

    Posted Mon September 14, 2015 03:10 PM

    Hi Jyoti,

    when you have assigned the environment variables during design time as described by Vlad, they are pre-populated with the DEV values upon “Build And Upload”.

    After Deployment to UAT MWS you have to change these under the SysAdmin User:

    Application Dashboard → CAF Runtime Configuration → Search
    Search for your application in the list (might not be on the first page)

    You will find the entries under the Tree-Item Environment Settings.

    Change these and apply them to the CAF Application.
    Application will reload after that and from now on will use the modified parameters.

    This only has to be done on the first deployment but should be checked thoroughly on subsequent deployments.

    Regards,
    Holger


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 7.  RE: how to set the environment variables in CAF

    Posted Tue September 15, 2015 09:06 AM

    Hi Holger,

    I had set the environment variables in the web.xml file.
    As you suggested, I tried first in DEV environment.
    What I found is, In Admin Dashboard → CAF Runtime Conf → Environment setting, the values are coming from web.xml only.
    I changed the web.xml values to some other values and the Admin Dashboard → CAF Runtime Conf → Environment setting values are getting changed.
    So it does not work.
    Could you please check.

    Regards
    Jyoti


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 8.  RE: how to set the environment variables in CAF

    Posted Tue September 15, 2015 09:51 AM

    Hi Jyoti,

    as the web.xml gets deployed together with the application it will be overridden by any subsequent deployment forcing you to do the changes again every time after a deployment.

    We prefer the variant to define the variables in designer and assign them to the corresponding bindings.

    What happens if you change the values in the CAF runtime config and restart the application?
    Are the new values persisted or are they reverted to the values in the web.xml?

    Regards,
    Holger


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 9.  RE: how to set the environment variables in CAF

    Posted Tue September 15, 2015 09:58 AM

    Hi Holger,

    Yes.
    The values are getting changed to the values mentioned in web.xml file.
    Can you please suggest something.

    Regards
    Jyoti


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 10.  RE: how to set the environment variables in CAF

    Posted Tue September 15, 2015 10:18 AM

    I have deployed everything on to UAT now.
    The UIs are working fine and showing the results which is because the connectors are still pointing to the DEV server I guess. Please correct me if I am wrong.
    I need to change the URL of the connectors to the STAGE server.

    Regards
    jyoti


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine