CA Service Management

Expand all | Collapse all

ca sd $args value

  • 1.  ca sd $args value

    Posted 10-16-2015 11:43 AM

    Hi All,

    I m working on the change management page and needed some help. The coding has a variable called $args.workflow.length, this variable gets the value as soon as we open the detail_chg page( I checked it using alert() funct). Can some1 please let me know how and from where does the ca sd fetches these args values.(as i understand in java any parameter passed from command line is stored in the args variable, hence this doubt).

     

    Thanks



  • 2.  Re: ca sd $args value

    Posted 10-16-2015 02:19 PM

    $args.atribute_name alows to acess atribute valies in sdm forms e.g. $args.status will return value of status attribute. Since workflow is brel attribute you can not acess values, but you can get how many records (workflow tasks) are related to change, for this you use $args.workflow.lengtg



  • 3.  Re: ca sd $args value

    Posted 10-16-2015 05:27 PM

    Hi Johnny_2302,

     

      Maybe... the oficial documents can clearly

     

    Server Variables - CA Service Management - 14.1 - CA Technologies Documentation

     

    Regards



  • 4.  Re: ca sd $args value

    Posted 10-17-2015 03:32 AM

    Thanks TMACUL for the document.

     

    I went through the document and found setting default value to business object variables, they have mentioned below syntax:

     

    ${args.variable:default}

     

    so as per above syntax i'm trying to set the workflow.length value to zero as shown below:

     

    ${args.workflow.length:0}

     

    Am I doing it right? since this doesnt seem to work.

     

     

    The reason I'm trying to achieve this is , when raising a Change order ticket , even before selecting the category it attaches the workflow to the new ticket and as soon as you save the new change order ticket, the workflow mapped to the selected change order also gets appended to the above workflow task.

     

    I observed that during the page load of the detail_chg.htmpl itself, the args.workflow.length has the value which is greater than zero.



  • 5.  Re: ca sd $args value

    Posted 10-17-2015 03:48 AM

    It will not work this way, workflow is attached by using spel code. I would look for the trigger that atraches workflow tasks on creation. Could you go to pdm_wsp and list here all truggers available for chg object



  • 6.  Re: ca sd $args value

    Posted 10-17-2015 06:15 AM

    Gutis these are the active triggers

    A1.jpgA3.jpg

    A2.jpg

    A3.1.jpg

    A4.jpg

    A5.jpg



  • 7.  Re: ca sd $args value

    Posted 10-17-2015 12:57 PM

    There is one trigger that runs zcategory_concept_note spel code on change order creation. It is not possible to say what he does without the code. If you can, please provide it. It sould be located in spl file in site/mods/majic. Alternatively you can provide whole majic folder.

     

    Sent from my iPhone



  • 8.  Re: ca sd $args value

    Posted 10-19-2015 02:39 AM

    The syntax ${args.variable:default} is used to ensure you get something when accessing the $args variables. If the variable is empty (or NULL, haven't tested which way it is evaluated) you'll get the default value, otherwise you get the actual value. It is not for setting the value on the object itself.

    From your description it is not clear what the actual issue is but I'm going out on a limb here and assuming the workflow you get is wrong. For getting rid of this you'll have to modify the change category, or if the actual workflow tasks are wrong, either modify the existing tasks or create new ones. Either way, this is a global change and will affect all future tickets that use the same category.