maqsood1

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-10
15:08
1673 views
NetIQ REST driver - Issue Http Get on Pub ITP
NetiQ IDM 4.5.x
REST driver shim
Hello
I have NETIQ Rest driver shim where subscriber channel policy issues http get as part of driver-operaton-data custom commands
as part of the reply from the service i get some data from the service on the publisher input
and now based on the data I recieved from the service i want to issue another http get from the publisher input, How to do that like query back??, Any examples would be great.
Regards,
Maqsood.
REST driver shim
Hello
I have NETIQ Rest driver shim where subscriber channel policy issues http get as part of driver-operaton-data custom commands
<nds dtdversion="4.0">
<source>
<product version="4.5.6.0">Identity Manager</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<driver-operation-data api="targetURL:SOMEURL" class-name="User" command="custom-IDM-JOB-POLL-EMPLOYEE" event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210145639#0#0" src-dn="">
<request method="GET" url="SOMEURL">
<header accept="application/json" content-type="application/json"/>
<value>{}</value>
</request>
</driver-operation-data>
</input>
</nds>
as part of the reply from the service i get some data from the service on the publisher input
<nds dtdversion="3.0">
<source>
<product build="20170130_0359" version="1.0.0.1">Identity Manager REST Driver</product>
<contact>NetIQ Corporation.</contact>
</source>
<output>
<status event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" level="success" type="driver-general">
<driver-operation-data api="targetURL:somurl" class-name="User" command="custom-IDM-JOB-POLL-EMPLOYEE" dest-dn="" event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" src-dn="">
<response method="GET" url="SOMEURL">
<header accept="application/json" content-type="application/json"/>
<value message="OK" status="200">SOMEDATA</value>
</response>
</driver-operation-data>
</status>
</output>
</nds>
and now based on the data I recieved from the service i want to issue another http get from the publisher input, How to do that like query back??, Any examples would be great.
Regards,
Maqsood.
13 Replies
maqsood1

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-16
15:13
Guys any feedback?
maqsood;2492261 wrote:
NetiQ IDM 4.5.x
REST driver shim
Hello
I have NETIQ Rest driver shim where subscriber channel policy issues http get as part of driver-operaton-data custom commands<nds dtdversion="4.0">
<source>
<product version="4.5.6.0">Identity Manager</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<driver-operation-data api="targetURL:SOMEURL" class-name="User" command="custom-IDM-JOB-POLL-EMPLOYEE" event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210145639#0#0" src-dn="">
<request method="GET" url="SOMEURL">
<header accept="application/json" content-type="application/json"/>
<value>{}</value>
</request>
</driver-operation-data>
</input>
</nds>
as part of the reply from the service i get some data from the service on the publisher input<nds dtdversion="3.0">
<source>
<product build="20170130_0359" version="1.0.0.1">Identity Manager REST Driver</product>
<contact>NetIQ Corporation.</contact>
</source>
<output>
<status event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" level="success" type="driver-general">
<driver-operation-data api="targetURL:somurl" class-name="User" command="custom-IDM-JOB-POLL-EMPLOYEE" dest-dn="" event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" src-dn="">
<response method="GET" url="SOMEURL">
<header accept="application/json" content-type="application/json"/>
<value message="OK" status="200">SOMEDATA</value>
</response>
</driver-operation-data>
</status>
</output>
</nds>
and now based on the data I recieved from the service i want to issue another http get from the publisher input, How to do that like query back??, Any examples would be great.
Regards,
Maqsood.


Knowledge Partner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-16
18:08
On 12/16/2018 10:14 AM, maqsood wrote:
>
> @geoff any idea?
>
>
> maqsood;2492261 Wrote:
>> NetiQ IDM 4.5.x
>> REST driver shim
>>
>> Hello
>>
>> I have NETIQ Rest driver shim where subscriber channel policy issues
>> http get as part of driver-operaton-data custom commands
>>
>>
>>>
> Code:
> --------------------
> > > <nds dtdversion="4.0">
> > <source>
> > <product version="4.5.6.0">Identity Manager</product>
> > <contact>NetIQ Corporation</contact>
> > </source>
> > <input>
> > <driver-operation-data api="targetURL:SOMEURL" class-name="User" command="custom-IDM-JOB-POLL-EMPLOYEE" event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210145639#0#0" src-dn="">
> > <request method="GET" url="SOMEURL">
> > <header accept="application/json" content-type="application/json"/>
> > <value>{}</value>
> > </request>
> > </driver-operation-data>
> > </input>
> > </nds>
> >
> >
> --------------------
>>>
>>
>> as part of the reply from the service i get some data from the service
>> on the publisher input
>>
>>
>>
>>>
> Code:
> --------------------
> > > <nds dtdversion="3.0">
> > <source>
> > <product build="20170130_0359" version="1.0.0.1">Identity Manager REST Driver</product>
> > <contact>NetIQ Corporation.</contact>
> > </source>
> > <output>
> > <status event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" level="success" type="driver-general">
> > <driver-operation-data api="targetURL:somurl" class-name="User" command="custom-IDM-JOB-POLL-EMPLOYEE" dest-dn="" event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" src-dn="">
> > <response method="GET" url="SOMEURL">
> > <header accept="application/json" content-type="application/json"/>
> > <value message="OK" status="200">SOMEDATA</value>
> > </response>
> > </driver-operation-data>
> > </status>
> > </output>
> > </nds>
> >
> --------------------
>>>
>>
>> and now based on the data I recieved from the service i want to issue
>> another http get from the publisher input, How to do that like query
>> back??, Any examples would be great.
So you query for {} (I assume you cleaned up the exmple). You get back
SOMEDATA.
So out of the box, the shim should reformat any JSON into XML as it
passes through the Input Transform.
Then you can XPATH it out.
If not, at this point you could test for:
if operation = status
if XPATH true driver-operation-data/response/value
set local variable MY-DATA driver-operation-data/response/value
Or something like that.
>
> @geoff any idea?
>
>
> maqsood;2492261 Wrote:
>> NetiQ IDM 4.5.x
>> REST driver shim
>>
>> Hello
>>
>> I have NETIQ Rest driver shim where subscriber channel policy issues
>> http get as part of driver-operaton-data custom commands
>>
>>
>>>
> Code:
> --------------------
> > > <nds dtdversion="4.0">
> > <source>
> > <product version="4.5.6.0">Identity Manager</product>
> > <contact>NetIQ Corporation</contact>
> > </source>
> > <input>
> > <driver-operation-data api="targetURL:SOMEURL" class-name="User" command="custom-IDM-JOB-POLL-EMPLOYEE" event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210145639#0#0" src-dn="">
> > <request method="GET" url="SOMEURL">
> > <header accept="application/json" content-type="application/json"/>
> > <value>{}</value>
> > </request>
> > </driver-operation-data>
> > </input>
> > </nds>
> >
> >
> --------------------
>>>
>>
>> as part of the reply from the service i get some data from the service
>> on the publisher input
>>
>>
>>
>>>
> Code:
> --------------------
> > > <nds dtdversion="3.0">
> > <source>
> > <product build="20170130_0359" version="1.0.0.1">Identity Manager REST Driver</product>
> > <contact>NetIQ Corporation.</contact>
> > </source>
> > <output>
> > <status event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" level="success" type="driver-general">
> > <driver-operation-data api="targetURL:somurl" class-name="User" command="custom-IDM-JOB-POLL-EMPLOYEE" dest-dn="" event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" src-dn="">
> > <response method="GET" url="SOMEURL">
> > <header accept="application/json" content-type="application/json"/>
> > <value message="OK" status="200">SOMEDATA</value>
> > </response>
> > </driver-operation-data>
> > </status>
> > </output>
> > </nds>
> >
> --------------------
>>>
>>
>> and now based on the data I recieved from the service i want to issue
>> another http get from the publisher input, How to do that like query
>> back??, Any examples would be great.
So you query for {} (I assume you cleaned up the exmple). You get back
SOMEDATA.
So out of the box, the shim should reformat any JSON into XML as it
passes through the Input Transform.
Then you can XPATH it out.
If not, at this point you could test for:
if operation = status
if XPATH true driver-operation-data/response/value
set local variable MY-DATA driver-operation-data/response/value
Or something like that.
maqsood1

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-16
21:09
Hello
Actualy i have no issues reading data in Itp (json, xml, text, whatever) - Actually based on the data i recieved from service i wanna issue another query back (http get) to the service from Itp? how do i do it?
In other normal NetIQ drivers, you do something Query-Source or source-attribute while staying on publisher channel, but i dont know how do it the similar on REST driver
Regards,
Maqsood.
Actualy i have no issues reading data in Itp (json, xml, text, whatever) - Actually based on the data i recieved from service i wanna issue another query back (http get) to the service from Itp? how do i do it?
In other normal NetIQ drivers, you do something Query-Source or source-attribute while staying on publisher channel, but i dont know how do it the similar on REST driver
Regards,
Maqsood.


Knowledge Partner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-16
22:14
On 12/16/2018 4:14 PM, maqsood wrote:
>
> Hello
>
> Actualy i have no issues reading data in Itp (json, xml, text, whatever)
> - Actually based on the data i recieved from service i wanna issue
> another query back (http get) to the service from Itp? how do i do it?
>
> In other normal NetIQ drivers, you do something Query-Source or
> source-attribute while staying on publisher channel, but i dont know
> how do it the similar on REST driver
If you issue a query to Source in the ITP it won't go through the OTP
and the OTP has the XML to JSON conversion policies. Which is probably
what you are thinking of.
You could build it yourself in XML if needed.
>
> Hello
>
> Actualy i have no issues reading data in Itp (json, xml, text, whatever)
> - Actually based on the data i recieved from service i wanna issue
> another query back (http get) to the service from Itp? how do i do it?
>
> In other normal NetIQ drivers, you do something Query-Source or
> source-attribute while staying on publisher channel, but i dont know
> how do it the similar on REST driver
If you issue a query to Source in the ITP it won't go through the OTP
and the OTP has the XML to JSON conversion policies. Which is probably
what you are thinking of.
You could build it yourself in XML if needed.
maqsood1

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-17
08:06
How to build XML on publisher that sends http GET to service , any examples?
geoffc;2492653 wrote:
On 12/16/2018 4:14 PM, maqsood wrote:
>
> Hello
>
> Actualy i have no issues reading data in Itp (json, xml, text, whatever)
> - Actually based on the data i recieved from service i wanna issue
> another query back (http get) to the service from Itp? how do i do it?
>
> In other normal NetIQ drivers, you do something Query-Source or
> source-attribute while staying on publisher channel, but i dont know
> how do it the similar on REST driver
If you issue a query to Source in the ITP it won't go through the OTP
and the OTP has the XML to JSON conversion policies. Which is probably
what you are thinking of.
You could build it yourself in XML if needed.


Knowledge Partner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-17
10:09
On 12/17/2018 3:14 AM, maqsood wrote:
>
> How to build XML on publisher that sends http GET to service , any
> examples?
>
>
>
> geoffc;2492653 Wrote:
>> On 12/16/2018 4:14 PM, maqsood wrote:
>>>
>>> Hello
>>>
>>> Actualy i have no issues reading data in Itp (json, xml, text,
>> whatever)
>>> - Actually based on the data i recieved from service i wanna issue
>>> another query back (http get) to the service from Itp? how do i do
>> it?
>>>
>>> In other normal NetIQ drivers, you do something Query-Source or
>>> source-attribute while staying on publisher channel, but i dont know
>>> how do it the similar on REST driver
>>
>> If you issue a query to Source in the ITP it won't go through the OTP
>> and the OTP has the XML to JSON conversion policies. Which is probably
>> what you are thinking of.
>>
>> You could build it yourself in XML if needed.
Show some trace, of your Sub channel event to the service, then the
response, and where you want to do something with it. Context really
matters here.
>
> How to build XML on publisher that sends http GET to service , any
> examples?
>
>
>
> geoffc;2492653 Wrote:
>> On 12/16/2018 4:14 PM, maqsood wrote:
>>>
>>> Hello
>>>
>>> Actualy i have no issues reading data in Itp (json, xml, text,
>> whatever)
>>> - Actually based on the data i recieved from service i wanna issue
>>> another query back (http get) to the service from Itp? how do i do
>> it?
>>>
>>> In other normal NetIQ drivers, you do something Query-Source or
>>> source-attribute while staying on publisher channel, but i dont know
>>> how do it the similar on REST driver
>>
>> If you issue a query to Source in the ITP it won't go through the OTP
>> and the OTP has the XML to JSON conversion policies. Which is probably
>> what you are thinking of.
>>
>> You could build it yourself in XML if needed.
Show some trace, of your Sub channel event to the service, then the
response, and where you want to do something with it. Context really
matters here.
maqsood1

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-17
11:31
This is what you get on the publisher channel in trace as result of trigger command from subscriber
<nds dtdversion="3.0">
<source>
<product build="20170130_0359" version="1.0.0.1">Identity Manager REST Driver</product>
<contact>NetIQ Corporation.</contact>
</source>
<output>
<status event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" level="success" type="driver-general">
<driver-operation-data api="targetURL:somurl" class-name="User" command="custom-IDM-JOB-POLL-EMPLOYEE" dest-dn="" event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" src-dn="">
<response method="GET" url="SOMEURL">
<header accept="application/json" content-type="application/json"/>
<value message="OK" status="200">SOMEDATA</value>
</response>
</driver-operation-data>
</status>
</output>
</nds>
This is how i read the data on pub itp
<rule>
<description>(CUSTOM)(ShimJSONtoNETIQ) EMPLOYEE POLL</description>
<conditions>
<and>
<if-class-name mode="nocase" op="not-equal">DirXML-Driver</if-class-name>
<if-operation mode="regex" op="equal">status</if-operation>
</and>
</conditions>
<actions>
<do-if>
<arg-conditions>
<or>
<if-operation mode="regex" op="equal">status</if-operation>
</or>
</arg-conditions>
<arg-actions>
<do-if>
<arg-conditions>
<or>
<if-xpath op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE"]</if-xpath>
<if-xpath op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE-NEW"]</if-xpath>
</or>
</arg-conditions>
<arg-actions>
<do-set-local-variable name="getDN" scope="policy">
<arg-string>
<token-xpath expression="./driver-operation-data/@src-dn"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="StatusValue" scope="policy">
<arg-string>
<token-xpath expression="./driver-operation-data/response/value/@status"/>
</arg-string>
</do-set-local-variable>
<do-trace-message>
<arg-string>
<token-text xml:space="preserve">Status value => </token-text>
<token-local-variable name="StatusValue"/>
</arg-string>
</do-trace-message>
<do-set-local-variable name="MessageValue" scope="policy">
<arg-string>
<token-xpath expression="./driver-operation-data/response/value/@message"/>
</arg-string>
</do-set-local-variable>
<do-trace-message>
<arg-string>
<token-text xml:space="preserve">Status value => </token-text>
<token-local-variable name="MessageValue"/>
</arg-string>
</do-trace-message>
<do-set-local-variable name="MessageValueText" scope="policy">
<arg-string>
<token-xpath expression="./driver-operation-data/response/value/text()"/>
</arg-string>
</do-set-local-variable>
</arg-actions>
<arg-actions/>
</do-if>
</arg-actions>
<arg-actions/>
</do-if>
</actions>
</rule>
and then read the payload:
<rule>
<description>Successfull poll-employees command handler actions for changes</description>
<conditions>
<or>
<if-operation mode="regex" op="equal">status</if-operation>
</or>
<or>
<if-local-variable mode="nocase" name="StatusValue" op="equal">200</if-local-variable>
</or>
<or>
<if-xpath op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE"]</if-xpath>
</or>
</conditions>
<actions>
<do-for-each>
<arg-node-set>
<token-local-variable name="entry"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="user-entry" scope="policy">
<arg-node-set>
<token-local-variable name="current-node"/>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="user-entry-id" scope="policy">
<arg-string>
<token-xpath expression="$user-entry/*[local-name()='id']/text()"/>
</arg-string>
</do-set-local-variable>
<do-trace-message>
<arg-string>
<token-text xml:space="preserve">============================</token-text>
</arg-string>
</do-trace-message>
<do-trace-message>
<arg-string>
<token-text xml:space="preserve">USER ENTRY ID => </token-text>
<token-local-variable name="user-entry-id"/>
</arg-string>
</do-trace-message>
<do-set-local-variable name="user-entry-lastModifiedWithTZ" scope="policy">
<arg-string>
<token-xpath expression="$user-entry/*//*[local-name()='lastModifiedWithTZ']/text()"/>
</arg-string>
</do-set-local-variable>
<do-trace-message>
<arg-string>
<token-text xml:space="preserve">USER ENTRY LASTMODIFIED => </token-text>
<token-local-variable name="user-entry-lastModifiedWithTZ"/>
</arg-string>
</do-trace-message>
</arg-actions>
</do-for-each>
<do-strip-xpath expression="./driver-operation-data"/>
</actions>
</rule>
Now I want to issue another http get for ID recieved here => <token-xpath expression="$user-entry/*[local-name()='id']/text()"/>
<nds dtdversion="3.0">
<source>
<product build="20170130_0359" version="1.0.0.1">Identity Manager REST Driver</product>
<contact>NetIQ Corporation.</contact>
</source>
<output>
<status event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" level="success" type="driver-general">
<driver-operation-data api="targetURL:somurl" class-name="User" command="custom-IDM-JOB-POLL-EMPLOYEE" dest-dn="" event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0" src-dn="">
<response method="GET" url="SOMEURL">
<header accept="application/json" content-type="application/json"/>
<value message="OK" status="200">SOMEDATA</value>
</response>
</driver-operation-data>
</status>
</output>
</nds>
This is how i read the data on pub itp
<rule>
<description>(CUSTOM)(ShimJSONtoNETIQ) EMPLOYEE POLL</description>
<conditions>
<and>
<if-class-name mode="nocase" op="not-equal">DirXML-Driver</if-class-name>
<if-operation mode="regex" op="equal">status</if-operation>
</and>
</conditions>
<actions>
<do-if>
<arg-conditions>
<or>
<if-operation mode="regex" op="equal">status</if-operation>
</or>
</arg-conditions>
<arg-actions>
<do-if>
<arg-conditions>
<or>
<if-xpath op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE"]</if-xpath>
<if-xpath op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE-NEW"]</if-xpath>
</or>
</arg-conditions>
<arg-actions>
<do-set-local-variable name="getDN" scope="policy">
<arg-string>
<token-xpath expression="./driver-operation-data/@src-dn"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="StatusValue" scope="policy">
<arg-string>
<token-xpath expression="./driver-operation-data/response/value/@status"/>
</arg-string>
</do-set-local-variable>
<do-trace-message>
<arg-string>
<token-text xml:space="preserve">Status value => </token-text>
<token-local-variable name="StatusValue"/>
</arg-string>
</do-trace-message>
<do-set-local-variable name="MessageValue" scope="policy">
<arg-string>
<token-xpath expression="./driver-operation-data/response/value/@message"/>
</arg-string>
</do-set-local-variable>
<do-trace-message>
<arg-string>
<token-text xml:space="preserve">Status value => </token-text>
<token-local-variable name="MessageValue"/>
</arg-string>
</do-trace-message>
<do-set-local-variable name="MessageValueText" scope="policy">
<arg-string>
<token-xpath expression="./driver-operation-data/response/value/text()"/>
</arg-string>
</do-set-local-variable>
</arg-actions>
<arg-actions/>
</do-if>
</arg-actions>
<arg-actions/>
</do-if>
</actions>
</rule>
and then read the payload:
<rule>
<description>Successfull poll-employees command handler actions for changes</description>
<conditions>
<or>
<if-operation mode="regex" op="equal">status</if-operation>
</or>
<or>
<if-local-variable mode="nocase" name="StatusValue" op="equal">200</if-local-variable>
</or>
<or>
<if-xpath op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE"]</if-xpath>
</or>
</conditions>
<actions>
<do-for-each>
<arg-node-set>
<token-local-variable name="entry"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="user-entry" scope="policy">
<arg-node-set>
<token-local-variable name="current-node"/>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="user-entry-id" scope="policy">
<arg-string>
<token-xpath expression="$user-entry/*[local-name()='id']/text()"/>
</arg-string>
</do-set-local-variable>
<do-trace-message>
<arg-string>
<token-text xml:space="preserve">============================</token-text>
</arg-string>
</do-trace-message>
<do-trace-message>
<arg-string>
<token-text xml:space="preserve">USER ENTRY ID => </token-text>
<token-local-variable name="user-entry-id"/>
</arg-string>
</do-trace-message>
<do-set-local-variable name="user-entry-lastModifiedWithTZ" scope="policy">
<arg-string>
<token-xpath expression="$user-entry/*//*[local-name()='lastModifiedWithTZ']/text()"/>
</arg-string>
</do-set-local-variable>
<do-trace-message>
<arg-string>
<token-text xml:space="preserve">USER ENTRY LASTMODIFIED => </token-text>
<token-local-variable name="user-entry-lastModifiedWithTZ"/>
</arg-string>
</do-trace-message>
</arg-actions>
</do-for-each>
<do-strip-xpath expression="./driver-operation-data"/>
</actions>
</rule>
Now I want to issue another http get for ID recieved here => <token-xpath expression="$user-entry/*[local-name()='id']/text()"/>


Knowledge Partner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-17
12:26
On 12/17/2018 6:34 AM, maqsood wrote:
>
> This is what you get on the publisher channel in trace as result of
> trigger command from subscriber
>
> <nds dtdversion="3.0">
> <source>
> <product build="20170130_0359" version="1.0.0.1">Identity Manager
> REST Driver</product>
> <contact>NetIQ Corporation.</contact>
> </source>
> <output>
> <status
> event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0"
> level="success" type="driver-general">
> <driver-operation-data api="targetURL:somurl" class-name="User"
> command="custom-IDM-JOB-POLL-EMPLOYEE" dest-dn=""
> event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0"
> src-dn="">
> <response method="GET" url="SOMEURL">
> <header accept="application/json"
> content-type="application/json"/>
> <value message="OK" status="200">SOMEDATA</value>
> </response>
> </driver-operation-data>
> </status>
> </output>
> </nds>
>
>
> This is how i read the data on pub itp
>
>
> <rule>
> <description>(CUSTOM)(ShimJSONtoNETIQ) EMPLOYEE POLL</description>
> <conditions>
> <and>
> <if-class-name mode="nocase"
> op="not-equal">DirXML-Driver</if-class-name>
> <if-operation mode="regex" op="equal">status</if-operation>
> </and>
> </conditions>
> <actions>
> <do-if>
> <arg-conditions>
> <or>
> <if-operation mode="regex" op="equal">status</if-operation>
> </or>
> </arg-conditions>
> <arg-actions>
> <do-if>
> <arg-conditions>
> <or>
> <if-xpath
> op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE"]</if-xpath>
> <if-xpath
> op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE-NEW"]</if-xpath>
> </or>
> </arg-conditions>
> <arg-actions>
> <do-set-local-variable name="getDN" scope="policy">
> <arg-string>
> <token-xpath expression="./driver-operation-data/@src-dn"/>
> </arg-string>
> </do-set-local-variable>
> <do-set-local-variable name="StatusValue" scope="policy">
> <arg-string>
> <token-xpath
> expression="./driver-operation-data/response/value/@status"/>
> </arg-string>
> </do-set-local-variable>
> <do-trace-message>
> <arg-string>
> <token-text xml:space="preserve">Status value => </token-text>
> <token-local-variable name="StatusValue"/>
> </arg-string>
> </do-trace-message>
> <do-set-local-variable name="MessageValue" scope="policy">
> <arg-string>
> <token-xpath
> expression="./driver-operation-data/response/value/@message"/>
> </arg-string>
> </do-set-local-variable>
> <do-trace-message>
> <arg-string>
> <token-text xml:space="preserve">Status value => </token-text>
> <token-local-variable name="MessageValue"/>
> </arg-string>
> </do-trace-message>
> <do-set-local-variable name="MessageValueText" scope="policy">
> <arg-string>
> <token-xpath
> expression="./driver-operation-data/response/value/text()"/>
> </arg-string>
> </do-set-local-variable>
> </arg-actions>
> <arg-actions/>
> </do-if>
> </arg-actions>
> <arg-actions/>
> </do-if>
> </actions>
> </rule>
>
>
> and then read the payload:
>
>
>
> <rule>
> <description>Successfull poll-employees command handler actions for
> changes</description>
> <conditions>
> <or>
> <if-operation mode="regex" op="equal">status</if-operation>
> </or>
> <or>
> <if-local-variable mode="nocase" name="StatusValue"
> op="equal">200</if-local-variable>
> </or>
> <or>
> <if-xpath
> op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE"]</if-xpath>
> </or>
> </conditions>
> <actions>
> <do-for-each>
> <arg-node-set>
> <token-local-variable name="entry"/>
> </arg-node-set>
> <arg-actions>
> <do-set-local-variable name="user-entry" scope="policy">
> <arg-node-set>
> <token-local-variable name="current-node"/>
> </arg-node-set>
> </do-set-local-variable>
> <do-set-local-variable name="user-entry-id" scope="policy">
> <arg-string>
> <token-xpath
> expression="$user-entry/*[local-name()='id']/text()"/>
> </arg-string>
> </do-set-local-variable>
> <do-trace-message>
> <arg-string>
> <token-text
> xml:space="preserve">============================</token-text>
> </arg-string>
> </do-trace-message>
> <do-trace-message>
> <arg-string>
> <token-text xml:space="preserve">USER ENTRY ID => </token-text>
> <token-local-variable name="user-entry-id"/>
> </arg-string>
> </do-trace-message>
> <do-set-local-variable name="user-entry-lastModifiedWithTZ"
> scope="policy">
> <arg-string>
> <token-xpath
> expression="$user-entry/*//*[local-name()='lastModifiedWithTZ']/text()"/>
> </arg-string>
> </do-set-local-variable>
> <do-trace-message>
> <arg-string>
> <token-text xml:space="preserve">USER ENTRY LASTMODIFIED =>
> </token-text>
> <token-local-variable name="user-entry-lastModifiedWithTZ"/>
> </arg-string>
> </do-trace-message>
> </arg-actions>
> </do-for-each>
> <do-strip-xpath expression="./driver-operation-data"/>
> </actions>
> </rule>
>
>
>
> Now I want to issue another http get for ID recieved here =>
> <token-xpath expression="$user-entry/*[local-name()='id']/text()"/>
Can you instead of dealing with it in the ITP, deal with it in the ETP?
I.e. <trigger> comes in, sub-ETP reacts, makes query into variable.
Then once you have th evariable, test with XPATH or whatever. Finally do
the query you want from the current rule in sub-ETP and then query dest
as needed? Will go through OTP so should be good.
>
> This is what you get on the publisher channel in trace as result of
> trigger command from subscriber
>
> <nds dtdversion="3.0">
> <source>
> <product build="20170130_0359" version="1.0.0.1">Identity Manager
> REST Driver</product>
> <contact>NetIQ Corporation.</contact>
> </source>
> <output>
> <status
> event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0"
> level="success" type="driver-general">
> <driver-operation-data api="targetURL:somurl" class-name="User"
> command="custom-IDM-JOB-POLL-EMPLOYEE" dest-dn=""
> event-id="trigger-job:IDM-JOB-POLL-EMPLOYEE#20181210143916#0#0"
> src-dn="">
> <response method="GET" url="SOMEURL">
> <header accept="application/json"
> content-type="application/json"/>
> <value message="OK" status="200">SOMEDATA</value>
> </response>
> </driver-operation-data>
> </status>
> </output>
> </nds>
>
>
> This is how i read the data on pub itp
>
>
> <rule>
> <description>(CUSTOM)(ShimJSONtoNETIQ) EMPLOYEE POLL</description>
> <conditions>
> <and>
> <if-class-name mode="nocase"
> op="not-equal">DirXML-Driver</if-class-name>
> <if-operation mode="regex" op="equal">status</if-operation>
> </and>
> </conditions>
> <actions>
> <do-if>
> <arg-conditions>
> <or>
> <if-operation mode="regex" op="equal">status</if-operation>
> </or>
> </arg-conditions>
> <arg-actions>
> <do-if>
> <arg-conditions>
> <or>
> <if-xpath
> op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE"]</if-xpath>
> <if-xpath
> op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE-NEW"]</if-xpath>
> </or>
> </arg-conditions>
> <arg-actions>
> <do-set-local-variable name="getDN" scope="policy">
> <arg-string>
> <token-xpath expression="./driver-operation-data/@src-dn"/>
> </arg-string>
> </do-set-local-variable>
> <do-set-local-variable name="StatusValue" scope="policy">
> <arg-string>
> <token-xpath
> expression="./driver-operation-data/response/value/@status"/>
> </arg-string>
> </do-set-local-variable>
> <do-trace-message>
> <arg-string>
> <token-text xml:space="preserve">Status value => </token-text>
> <token-local-variable name="StatusValue"/>
> </arg-string>
> </do-trace-message>
> <do-set-local-variable name="MessageValue" scope="policy">
> <arg-string>
> <token-xpath
> expression="./driver-operation-data/response/value/@message"/>
> </arg-string>
> </do-set-local-variable>
> <do-trace-message>
> <arg-string>
> <token-text xml:space="preserve">Status value => </token-text>
> <token-local-variable name="MessageValue"/>
> </arg-string>
> </do-trace-message>
> <do-set-local-variable name="MessageValueText" scope="policy">
> <arg-string>
> <token-xpath
> expression="./driver-operation-data/response/value/text()"/>
> </arg-string>
> </do-set-local-variable>
> </arg-actions>
> <arg-actions/>
> </do-if>
> </arg-actions>
> <arg-actions/>
> </do-if>
> </actions>
> </rule>
>
>
> and then read the payload:
>
>
>
> <rule>
> <description>Successfull poll-employees command handler actions for
> changes</description>
> <conditions>
> <or>
> <if-operation mode="regex" op="equal">status</if-operation>
> </or>
> <or>
> <if-local-variable mode="nocase" name="StatusValue"
> op="equal">200</if-local-variable>
> </or>
> <or>
> <if-xpath
> op="true">./driver-operation-data[@command="custom-IDM-JOB-POLL-EMPLOYEE"]</if-xpath>
> </or>
> </conditions>
> <actions>
> <do-for-each>
> <arg-node-set>
> <token-local-variable name="entry"/>
> </arg-node-set>
> <arg-actions>
> <do-set-local-variable name="user-entry" scope="policy">
> <arg-node-set>
> <token-local-variable name="current-node"/>
> </arg-node-set>
> </do-set-local-variable>
> <do-set-local-variable name="user-entry-id" scope="policy">
> <arg-string>
> <token-xpath
> expression="$user-entry/*[local-name()='id']/text()"/>
> </arg-string>
> </do-set-local-variable>
> <do-trace-message>
> <arg-string>
> <token-text
> xml:space="preserve">============================</token-text>
> </arg-string>
> </do-trace-message>
> <do-trace-message>
> <arg-string>
> <token-text xml:space="preserve">USER ENTRY ID => </token-text>
> <token-local-variable name="user-entry-id"/>
> </arg-string>
> </do-trace-message>
> <do-set-local-variable name="user-entry-lastModifiedWithTZ"
> scope="policy">
> <arg-string>
> <token-xpath
> expression="$user-entry/*//*[local-name()='lastModifiedWithTZ']/text()"/>
> </arg-string>
> </do-set-local-variable>
> <do-trace-message>
> <arg-string>
> <token-text xml:space="preserve">USER ENTRY LASTMODIFIED =>
> </token-text>
> <token-local-variable name="user-entry-lastModifiedWithTZ"/>
> </arg-string>
> </do-trace-message>
> </arg-actions>
> </do-for-each>
> <do-strip-xpath expression="./driver-operation-data"/>
> </actions>
> </rule>
>
>
>
> Now I want to issue another http get for ID recieved here =>
> <token-xpath expression="$user-entry/*[local-name()='id']/text()"/>
Can you instead of dealing with it in the ITP, deal with it in the ETP?
I.e. <trigger> comes in, sub-ETP reacts, makes query into variable.
Then once you have th evariable, test with XPATH or whatever. Finally do
the query you want from the current rule in sub-ETP and then query dest
as needed? Will go through OTP so should be good.
maqsood1

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-17
14:32
You mean the response from the service i will have back available on Etp? Never done this before, but i can try..


Knowledge Partner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-17
15:20
On 12/17/2018 9:34 AM, maqsood wrote:
>
> You mean the response from the service i will have back available on
> Etp? Never done this before, but i can try..
I mean, if you do your query in a policy set (ETP, CTP) to source/Dest
as needed, into a local variable, then you can continue processing in
the policy you started it from.
Now if in order to properly reformat a value so that merge/optimize
modify works and keeps data consistent, you need to query for a second
piece of information then ya, that is a problem, but it did not seem
like that
>
> You mean the response from the service i will have back available on
> Etp? Never done this before, but i can try..
I mean, if you do your query in a policy set (ETP, CTP) to source/Dest
as needed, into a local variable, then you can continue processing in
the policy you started it from.
Now if in order to properly reformat a value so that merge/optimize
modify works and keeps data consistent, you need to query for a second
piece of information then ya, that is a problem, but it did not seem
like that
maqsood1

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-12-18
18:39
Can you show me some code snippet how do you want me to test this from Etp ?..
geoffc;2492695 wrote:
On 12/17/2018 9:34 AM, maqsood wrote:
>
> You mean the response from the service i will have back available on
> Etp? Never done this before, but i can try..
I mean, if you do your query in a policy set (ETP, CTP) to source/Dest
as needed, into a local variable, then you can continue processing in
the policy you started it from.
Now if in order to properly reformat a value so that merge/optimize
modify works and keeps data consistent, you need to query for a second
piece of information then ya, that is a problem, but it did not seem
like that