workflow catalog task script

suresh51
Tera Contributor

hi guys,

i need script for workflow catalog task when selects any application in i need to automatically  assign to application support group

 

pls help me guys.

Thanks in advance.

 

1 ACCEPTED SOLUTION

Thanks. Try below in the Catalog Task workflow activity.

var selectedapplication= current.variables.application;
var getgrp=new GlideRecord('cmdb_ci_appl');
var getname=getgrp.addQuery('sys_id',selectedapplication);
getname.addOrCondition('name',selectedapplication);
getgrp.query();
if(getgrp.next())
{
 task.assignment_group=getgrp.support_group;
}

View solution in original post

7 REPLIES 7

Sai Kumar B
Mega Sage
Mega Sage

Hi Suresh,

Try the below script in your catalog task activity

if(current.variables.variable_name == 'xyz_application_sys_id');
{
task.assignment_group = current.variables.variable_name.group_field_name; //Dot-walk to get support group

//current.variables is to access variables
//variable_name is your application variable name
//group_field_name is your support group field name in application record
}

not working sai kumar

thanks for your cooperation

Could you please post your script here?

when user selects application active directory i need to task generated automatically to active directory support group.find_real_file.png