apply filter
This commit is contained in:
parent
e95442434c
commit
7dc2aacfc6
|
@ -59,6 +59,16 @@
|
||||||
"code" : "exec('import xml.etree.ElementTree as ET') or list(map(lambda n: n.text, ET.fromstring(data['xmlstring']).findall('Resource/Profile/Name')))",
|
"code" : "exec('import xml.etree.ElementTree as ET') or list(map(lambda n: n.text, ET.fromstring(data['xmlstring']).findall('Resource/Profile/Name')))",
|
||||||
"xmlstring" : "${query_workspace_clients_on_icproxy.output.body}"
|
"xmlstring" : "${query_workspace_clients_on_icproxy.output.body}"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LAMBDA_TASK",
|
||||||
|
"taskReferenceName": "filtered_workspace_client_names",
|
||||||
|
"type": "LAMBDA",
|
||||||
|
"inputParameters": {
|
||||||
|
"names" : "${extract_workspace_client_names.output.result}",
|
||||||
|
"filter" : "${init.input.filter}",
|
||||||
|
"scriptExpression": "names=Java.from($.names); f=Java.from($.filter); if(f.length === 0) output=names; else { output=[]; for(i=0;i<names.length;i++){ if(filter.indexOf(names[i]) !== -1) output.push(names[i])}} return { 'names' : Java.to(output, 'java.lang.String[]')}"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue