Release Automation

 View Only
Expand all | Collapse all

: /get-environment-parameter from the CA Release automation issue in getting response

  • 1.  : /get-environment-parameter from the CA Release automation issue in getting response

    Posted Oct 05, 2017 02:30 AM

    Created a component like -> Default Component ->Actions->CreateFolder

    and from there I am trying to get the parameter names

     

    https://cara.srv.com/get-environment-parameter from the CA Release automation i am getting response like below 

    request :

     

    {"environmentId":"651","parameterPath":"Default Component/CreateFolder"}

    response :

     

    {
        "result": false,
        "description": "The folder [Home] does not contain any folders"
    }

    please help me why i am getting like this, and how to procced further



  • 2.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Broadcom Employee
    Posted Oct 05, 2017 04:51 AM

    Hi,

     

    Please check your hierarchy of parameters. I think you created "CreateFolder" as not parameter hierarchy but action hierarchy.

     

    This is my sample:

    Environment parameter "nDelayTime" is defined under "Default Component/ParamFolder".

    This parameter is set in action and process. After that, the process is assigned to an environment.

    In parameter configuration, I set "999" to the parameter.

    I can get "999" using get-environment-parameter REST API.

     

    I hope my sample helps you.

     

    Regards

    Yas



  • 3.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Posted Oct 05, 2017 05:17 AM

    Hi Thanks for your response.

    But see I have query on "How to make it as parameter hierachery".

    See I did like below

    1)  Go to Designer, Process Design AND + I created a new component

    and from there in the right panel i have parameter tab, there i went to Default Componet and added a new folder name (File Path) with scope as internal.

    And then wifh that folder again i added a new String with value of the file path.

    but still getting the same issue.

    If you could tell me how to create parameter hierachery it will be helpful

    Else can you share me complete screen shot of entire flow how to perform it will thankful....



  • 4.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Posted Oct 05, 2017 03:00 PM

    Have you published a process that uses the component you defined?  It's been my experience that environment parameters are not available in the Paramter Configuration screens until the process was published and assigned to atleast one environment.  I suspect the API may have a similar constraint?



  • 5.  Re: : /get-environment-parameter from the CA Release automation issue in getting response
    Best Answer

    Broadcom Employee
    Posted Oct 05, 2017 10:46 PM

    Hi Salaom,

     

    Advice from Timothy is correct.

    As my thought, conditions to use "get-environment-parameter" REST API are:

    • Scope of parameter is Environment.
    • The parameter is used in published processes.

     

    I'd like to explain 6 cases. You can run only parameter satisfied above conditions.

    1. Create "Test Folder" folder under "Default Component" in Parameters tab.
    2. Create 6 parameters.
      Parameter NameScopeUsage
      nEnvNoActionEnvironmentNot used in any actions.
      nEnvPublishEnvironmentUsed in published process.
      nEnvUnpublishEnvironmentUsed in process, but the process is not published.
      nInternalNoActionInternalNot used in any actions.
      nInternalPublishInternalUsed in published process.
      nInternalUnpublishInternalUsed in process, but the process is not published.
    3. Create 4 actions with each parameters like following. It means nEnvNoAction and nInternalNoAction are not used in any actions.
    4. Create 4 processes with each actions. Published 2 processes with nEnvPublish and nInternalPublish. 
      In the other words, nEnvUnpublish and nInternalUnpublish are not exited in published processes despite they are set in processes.
    5. Assign published processes to an Environment. You can check this screen using menu [Environments]-[Environments and Tags].
    6.  Select menu [Environments]-[Parameter Configuration], and then you can see only nEnvPublish. It mean nInternalPublish is not environment scope.
      Update the value and Save.
    7. Run get-environment-parameter REST API using 6 parameters like following.


      The result is:
      Parameter NameResponse
      nEnvNoAction
      {"result":false,"description":"The folder [Test Folder] does not contain a value for the parameter [nEnvNoAction]"}
      nEnvPublish
      {"result":true,"parameterPath":"Default Component/Test Folder/nEnvPublish","simpleValue":"111"}
      nEnvUnpublish
      {"result":false,"description":"The folder [Test Folder] does not contain a value for the parameter [nEnvUnpublish]"}
      nInternalNoAction
      {"result":false,"description":"The folder [Test Folder] does not contain a value for the parameter [nInternalNoAction]"}
      nInternalPublish
      {"result":false,"description":"The folder [Test Folder] does not contain a value for the parameter [nInternalPublish]"}
      nInternalUnpublish
      {"result":false,"description":"The folder [Test Folder] does not contain a value for the parameter [nInternalUnpublish]"}

    We can get the value when the parameter is environment scope and used in published process.

     

    I hope this will help you understand.

    Thanks

    Yas



  • 6.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Posted Oct 06, 2017 03:21 AM

    Thank you so much...

    It really helped me to complete my task now. Post was really helpful to me.

    Really appreciated.



  • 7.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Broadcom Employee
    Posted Oct 06, 2017 03:32 AM

    Hi Salaom,

     

    I'm happy that I could support you.

    It seems I could answer to your question, so I will mark "Correct" on this thread.

     

    Regards

    Yas



  • 8.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Posted Oct 06, 2017 03:35 AM

    Thanks I am able to get the environment variable.

    Now trying to update the environment variable like below

    datamanagement/a/api/v4/update-environment-parameter

    I am passing request like below :

    {"environmentId":"651","parameterPath":"File_Creation/FileCreate/FileName","simpleValue":"C:\\pradeepruban\\Oct06.txt"}

    Getting respose like below :

    {
        "result": true,
        "description": "The value for the parameter [File_Creation/FileCreate/FileName] is: C:\\pradeepruban\\Oct06.txt"
    }

     

    I think I am getting proper response, but why still i am getting old value in the parameter like C:\\pradeepruban\\Oct062017.txt, actully it need to get updated like C:\\pradeepruban\\Oct06.txt.

    Not sure why it did get updated in the environment parameter.

     

    Please reply me...



  • 9.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Posted Oct 06, 2017 03:43 AM

    Yes you as correct for this thread... so but plese dont close this ticket... since update environment parameter i have small query.

    If you could help me on this it will be greatful...



  • 10.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Broadcom Employee
    Posted Oct 06, 2017 04:21 AM

    Hi Salaom,

     

    # I'd like to ask you to open new thread if you have additional question.  It helps CA members. 

    # Thanks to cooperate in advance.

     

    Which release do you use?

    Please check your version on ROC - menu [Help] - [About].

     

     

    I think it is known problem.

    Fixed on RA 6.5 GA, 6.4.0.10072, 6.3.0.9882, 6.2.0.3165 or later.

     

    https://docops.ca.com/ca-release-automation/6-5/en/release-notes/resolved-issues

    DE293168 Environment Parameter updates not reflected in deployment

     

     

    This is the behavior on RA 6.5.

    1. Set 111 to the parameter.
    2. Check the value using get-environment-parameter REST API. Response is 111.
    3. Update the parameter value to 222 using update-environment-parameter REST API.
    4. Retry to get the value using get-environment-parameter. The value is updated - 222.

     

    It seems no problem.

    So, if you didn't apply latest cumulative patch, please try to apply and verify again.

    If you have applied, please open a support case.

     

    Thanks

    Yas



  • 11.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Broadcom Employee
    Posted Oct 06, 2017 04:25 AM

    For your reference:

     

    You can download cumulative patches from here.

    CA Release Automation Solutions & Patches - CA Technologies 

     

    Regards

    Yas



  • 12.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Posted Oct 06, 2017 05:11 AM

    Sorry to reply in the same thread, since it will better to explain in same page.

    I am and to update environment parameter, but my query how to update componet pararmeter or process parameter, with above REST CALL my environment parameter under parameter configuration got updated.

    But actully i need component parameter and process parameter value need to get updated.

     

    help me on that.. thanks in advance...



  • 13.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Broadcom Employee
    Posted Oct 11, 2017 02:50 AM

    Hi, 

     

    All parameters on previous reply was component parameter. Do you mean parameter with internal scope?

    Note: you can see parameters under [Default Component] tree.

     

    Parameters are combination with following.

     

    Level

    - Application

    - Component

    - Process

     

    Scope

    - Internal

    - User Input

    - Release

    - Environment

     

    If you want to update Internal scope, you can use action type like "Set Parameter Value - String".

    If you want to update parameter values from outside RA, you can use Release scope and manifest file.

     

    Regards

    Yas



  • 14.  Re: : /get-environment-parameter from the CA Release automation issue in getting response

    Posted Oct 06, 2017 04:56 AM

    Sure thanks, this issue i am able to fix from your thread.

    Will open seperate thread for update environment..

     

    Thanks again for your help and Timothy.