Anonymous_User Absent Member.
Absent Member.
244 views

Not able to store multiple User CN into Nodeset


Hi All,

I am trying to search within vault(from the publisher channel of
delimited text driver) for a particular CN Pattern and store those
user's CN into a Node set.

Here is my Action

<do-set-local-variable name="tentetiveCN" scope="policy">
<arg-node-set>
<token-query class-name="User" max-result-count="2000">
<arg-match-attr name="CN">
<arg-value type="string">
<token-text xml:space="preserve">T*</token-text>
</arg-value>
</arg-match-attr>
<arg-string>
<token-dest-attr class-name="User" name="CN"/>
</arg-string>
</token-query>
</arg-node-set>
</do-set-local-variable>

But It is not working for me. Though as a output of the query it fetch
multiple user whose CN=T* .When I am trying to trace each current-node
value its print ""

Any Idea how to store multiple user CN into node set variable.


Thanks
Joydeep


--
joydeep9j
------------------------------------------------------------------------
joydeep9j's Profile: https://forums.netiq.com/member.php?userid=4754
View this thread: https://forums.netiq.com/showthread.php?t=51445

Labels (1)
0 Likes
6 Replies
Knowledge Partner
Knowledge Partner

Re: Not able to store multiple User CN into Nodeset

joydeep9j wrote:

> Here is my Action
>
><do-set-local-variable name="tentetiveCN" scope="policy">
> <arg-node-set>
> <token-query class-name="User" max-result-count="2000">
> <arg-match-attr name="CN">
> <arg-value type="string">
> <token-text xml:space="preserve">T*</token-text>
> </arg-value>
> </arg-match-attr>
> <arg-string>
> <token-dest-attr class-name="User" name="CN"/>
> </arg-string>
> </token-query>
> </arg-node-set>
></do-set-local-variable>
>
> But It is not working for me. Though as a output of the query it fetch
> multiple user whose CN=T* .When I am trying to trace each current-node
> value its print ""


because you are not requesting to return the CN attribute but an attribute
that's named after the CN of the current object. Have a look at how the query
send to Edir looks in detail in a level 3 trace and rather try:

<do-set-local-variable name="tentativeCN" scope="policy">
<arg-node-set>
<token-query class-name="User" max-result-count="2000">
<arg-match-attr name="CN">
<arg-value type="string">
<token-text xml:space="preserve">T*</token-text>
</arg-value>
</arg-match-attr>
<arg-string>
<token-text xml:space="preserve">CN</token-text>
</arg-string>
</token-query>
</arg-node-set>
</do-set-local-variable>
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
Knowledge Partner
Knowledge Partner

Re: Not able to store multiple User CN into Nodeset

On 7/31/2014 10:05 AM, Lothar Haeger wrote:
> joydeep9j wrote:
>
>> Here is my Action
>>
>> <do-set-local-variable name="tentetiveCN" scope="policy">
>> <arg-node-set>
>> <token-query class-name="User" max-result-count="2000">
>> <arg-match-attr name="CN">
>> <arg-value type="string">
>> <token-text xml:space="preserve">T*</token-text>
>> </arg-value>
>> </arg-match-attr>
>> <arg-string>
>> <token-dest-attr class-name="User" name="CN"/>
>> </arg-string>
>> </token-query>
>> </arg-node-set>
>> </do-set-local-variable>
>>
>> But It is not working for me. Though as a output of the query it fetch
>> multiple user whose CN=T* .When I am trying to trace each current-node
>> value its print ""

>
> because you are not requesting to return the CN attribute but an attribute
> that's named after the CN of the current object. Have a look at how the query
> send to Edir looks in detail in a level 3 trace and rather try:
>
> <do-set-local-variable name="tentativeCN" scope="policy">
> <arg-node-set>
> <token-query class-name="User" max-result-count="2000">
> <arg-match-attr name="CN">
> <arg-value type="string">
> <token-text xml:space="preserve">T*</token-text>
> </arg-value>
> </arg-match-attr>
> <arg-string>
> <token-text xml:space="preserve">CN</token-text>
> </arg-string>
> </token-query>
> </arg-node-set>
> </do-set-local-variable>


Good point. Missed that.

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Not able to store multiple User CN into Nodeset


Thanks a lot Ihaeger !!!

Its working now fine. Really a good observation.


--
joydeep9j
------------------------------------------------------------------------
joydeep9j's Profile: https://forums.netiq.com/member.php?userid=4754
View this thread: https://forums.netiq.com/showthread.php?t=51445

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Not able to store multiple User CN into Nodeset


Thanks a lot Ihaeger. Really a good observation.

Its working now fine!!

Thanks once again.


--
joydeep9j
------------------------------------------------------------------------
joydeep9j's Profile: https://forums.netiq.com/member.php?userid=4754
View this thread: https://forums.netiq.com/showthread.php?t=51445

0 Likes
Knowledge Partner
Knowledge Partner

Re: Not able to store multiple User CN into Nodeset

On 7/31/2014 9:45 AM, joydeep9j wrote:
>
> Hi All,
>
> I am trying to search within vault(from the publisher channel of
> delimited text driver) for a particular CN Pattern and store those
> user's CN into a Node set.
>
> Here is my Action
>
> <do-set-local-variable name="tentetiveCN" scope="policy">
> <arg-node-set>
> <token-query class-name="User" max-result-count="2000">
> <arg-match-attr name="CN">
> <arg-value type="string">
> <token-text xml:space="preserve">T*</token-text>
> </arg-value>
> </arg-match-attr>
> <arg-string>
> <token-dest-attr class-name="User" name="CN"/>
> </arg-string>
> </token-query>
> </arg-node-set>
> </do-set-local-variable>
>
> But It is not working for me. Though as a output of the query it fetch
> multiple user whose CN=T* .When I am trying to trace each current-node
> value its print ""
>
> Any Idea how to store multiple user CN into node set variable.


So you just want a nodeset of values of CN's that start with T?

SO take that nodeset here, since that returns one <instance> op for each
matched User, and make a second variable, a nodeset, based on teh XPATH
of something like:
$tentetiveCN/attr[@attr-name='CN']/value/text()

I think should do it.

That would select out of the first nodeset, the values you want. You
could probably do this in a single op using the Java query command, but
not a big deal to do it in two passes.


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Not able to store multiple User CN into Nodeset


Hi geoffc,

I was trying with xpath since it was returning instances. I thing I
missed something in my my xpath expression.

Though by changing my read attribute in query

from

<arg-string>

<token-dest-attr class-name="User" name="CN"/>
</arg-string>


to

<arg-string>
<token-text xml:space="preserve">CN</token-text>
</arg-string>

It is working fine and can retrieve CN.


--
joydeep9j
------------------------------------------------------------------------
joydeep9j's Profile: https://forums.netiq.com/member.php?userid=4754
View this thread: https://forums.netiq.com/showthread.php?t=51445

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.