Topic
  • 3 replies
  • Latest Post - ‏2013-06-24T21:55:53Z by AndrewPaier
jthiru
jthiru
1 Post

Pinned topic Environment variables in Coach view

‏2013-06-20T13:51:33Z |

Is there an API reference available for accessing environment variable inside a coach view, ie in the events load(), view() etc?

  • AndrewPaier
    AndrewPaier
    795 Posts

    Re: Environment variables in Coach view

    ‏2013-06-20T22:42:41Z  

    As far as I can tell you cannot access anything in a coach view event that wasn't mapped in some manner on the configuration of that coach view.  And in looking at the coaches there is a definite miss here as I can't seem to map an environment variable to any of the config options.  Looks like you would have to make a local variable to pull the value from the environment variable and then hand it to the the coach view that way.

    There is a chance that an eval() statement in the configuration tab might work, but I wouldn't want to depend on that since I doubt it is intentional.

    Andrew Paier  |  Director  |  BP3 Global, Inc.
    BP3 Global's Website  |  Twitter  |  Linkedin  |  Google+  |  Blogs

  • kolban
    kolban
    3316 Posts

    Re: Environment variables in Coach view

    ‏2013-06-22T20:29:21Z  

    As far as I can tell you cannot access anything in a coach view event that wasn't mapped in some manner on the configuration of that coach view.  And in looking at the coaches there is a definite miss here as I can't seem to map an environment variable to any of the config options.  Looks like you would have to make a local variable to pull the value from the environment variable and then hand it to the the coach view that way.

    There is a chance that an eval() statement in the configuration tab might work, but I wouldn't want to depend on that since I doubt it is intentional.

    Andrew Paier  |  Director  |  BP3 Global, Inc.
    BP3 Global's Website  |  Twitter  |  Linkedin  |  Google+  |  Blogs

    One other possible option would be to create a service which takes as a parameter the name of the environment variable and, when called, returns its value.

     

    While writing this, it struck me that maybe there would be a REST service already available and there appears to be .... see:

    http://pic.dhe.ibm.com/infocenter/dmndhelp/v8r5m0/topic/com.ibm.wbpm.ref.doc/rest/bpmrest/rest_bpm_wle_v1_system_env_variable_get.htm

    This can be called from load(), view() etc etc

    Neil

  • AndrewPaier
    AndrewPaier
    795 Posts

    Re: Environment variables in Coach view

    ‏2013-06-24T21:55:53Z  
    • kolban
    • ‏2013-06-22T20:29:21Z

    One other possible option would be to create a service which takes as a parameter the name of the environment variable and, when called, returns its value.

     

    While writing this, it struck me that maybe there would be a REST service already available and there appears to be .... see:

    http://pic.dhe.ibm.com/infocenter/dmndhelp/v8r5m0/topic/com.ibm.wbpm.ref.doc/rest/bpmrest/rest_bpm_wle_v1_system_env_variable_get.htm

    This can be called from load(), view() etc etc

    Neil

    I like that Neil!  Good call.  

    Andrew Paier  |  Director  |  BP3 Global, Inc.
    BP3 Global's Website  |  Twitter  |  Linkedin  |  Google+  |  Blogs