Discussion:
Reconciliation error in CUSTOM Adapter - Using only Data Flow section to iterate objects
(too old to reply)
Kishore_VJ
2016-11-26 13:48:28 UTC
Permalink
Raw Message
Hello,

I am using a http client connector (passive state) in call reply mode to retrieve httpbodyasstring.I use a json parser to convert this to json and also use hEntry for getting the attributes.

I am using two conditional while loops

Conditional loop one ---> for getting pages (1 to 50)
Conditional loop two ---> to iterate the users in each page and generate work object.


The assembly line always ends up in a infinite loop, even while i used system.exitFlow() and processerror().

The code works fine when i run it standalone. Can you please help me with this problem.

I have captured the below error

2016-11-26 07:44:50,622 INFO [AssemblyLine.AssemblyLines/Reconcile Accounts_TestAdapter_2353801792425172291_18589ea0-2b48-11b2-dbff-00000a646482.2] - Iterated pages--->5------>Ending AL
2016-11-26 07:44:50,622 INFO [ITIM_Dispatcher] - RequestID:2353801792425172291 ,status=2, reason=100, TerminateConnectors=false, reasonMessage=com.ibm.di.dispatcher.AL_INVALID_RESULT,SEARCH_FINISHED=false
Eddie Hartman
2016-11-28 12:37:02 UTC
Permalink
Raw Message
Post by Kishore_VJ
Hello,
I am using a http client connector (passive state) in call reply mode to retrieve httpbodyasstring.I use a json parser to convert this to json and also use hEntry for getting the attributes.
I am using two conditional while loops
Conditional loop one ---> for getting pages (1 to 50)
Conditional loop two ---> to iterate the users in each page and generate work object.
The assembly line always ends up in a infinite loop, even while i used system.exitFlow() and processerror().
The code works fine when i run it standalone. Can you please help me with this problem.
I have captured the below error
2016-11-26 07:44:50,622 INFO [AssemblyLine.AssemblyLines/Reconcile Accounts_TestAdapter_2353801792425172291_18589ea0-2b48-11b2-dbff-00000a646482.2] - Iterated pages--->5------>Ending AL
2016-11-26 07:44:50,622 INFO [ITIM_Dispatcher] - RequestID:2353801792425172291 ,status=2, reason=100, TerminateConnectors=false, reasonMessage=com.ibm.di.dispatcher.AL_INVALID_RESULT,SEARCH_FINISHED=false
As I responded to your comment in my blog, Kishore:

Remember that for an adapter you have to send back data to ISIM (ISIG) with the success flag for each entry, as described in the RMI Adapter Development guide. E.g.

work.setProperty(Packages.com.ibm.di.dispatcher.Defs.STATUSCODE,
new Packages.java.lang.Integer (Packages.com.ibm.itim.remoteservices.provider.Status.SUCCESSFUL));

So you would replace the logmsg with logic to all the AL to exit instead. If system.exitFlow() is not working correctly, then maybe you need to restructure your AL so that it can be called multiple times, each time continuing where it left off (1 cycle runs).

Now I am no Adapter dev expert, so hopefully of them can answer more fully here :)

-Eddie
k***@gmail.com
2016-11-28 13:38:08 UTC
Permalink
Raw Message
Post by Eddie Hartman
Post by Kishore_VJ
Hello,
I am using a http client connector (passive state) in call reply mode to retrieve httpbodyasstring.I use a json parser to convert this to json and also use hEntry for getting the attributes.
I am using two conditional while loops
Conditional loop one ---> for getting pages (1 to 50)
Conditional loop two ---> to iterate the users in each page and generate work object.
The assembly line always ends up in a infinite loop, even while i used system.exitFlow() and processerror().
The code works fine when i run it standalone. Can you please help me with this problem.
I have captured the below error
2016-11-26 07:44:50,622 INFO [AssemblyLine.AssemblyLines/Reconcile Accounts_TestAdapter_2353801792425172291_18589ea0-2b48-11b2-dbff-00000a646482.2] - Iterated pages--->5------>Ending AL
2016-11-26 07:44:50,622 INFO [ITIM_Dispatcher] - RequestID:2353801792425172291 ,status=2, reason=100, TerminateConnectors=false, reasonMessage=com.ibm.di.dispatcher.AL_INVALID_RESULT,SEARCH_FINISHED=false
Remember that for an adapter you have to send back data to ISIM (ISIG) with the success flag for each entry, as described in the RMI Adapter Development guide. E.g.
work.setProperty(Packages.com.ibm.di.dispatcher.Defs.STATUSCODE,
new Packages.java.lang.Integer (Packages.com.ibm.itim.remoteservices.provider.Status.SUCCESSFUL));
So you would replace the logmsg with logic to all the AL to exit instead. If system.exitFlow() is not working correctly, then maybe you need to restructure your AL so that it can be called multiple times, each time continuing where it left off (1 cycle runs).
Now I am no Adapter dev expert, so hopefully of them can answer more fully here :)
-Eddie
Hi Eddie,

I am sending the success flag for each entry as per the adapter development guide. Still it goes in to infinite loop.

I have changed the reconciliation approach & now using the script connector from your post (http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-5.html).

Now, it works like a charm!!! Thank you for the post.

Thanks,
Kishore
Eddie Hartman
2016-11-28 17:45:44 UTC
Permalink
Raw Message
Post by k***@gmail.com
Post by Eddie Hartman
Post by Kishore_VJ
Hello,
I am using a http client connector (passive state) in call reply mode to retrieve httpbodyasstring.I use a json parser to convert this to json and also use hEntry for getting the attributes.
I am using two conditional while loops
Conditional loop one ---> for getting pages (1 to 50)
Conditional loop two ---> to iterate the users in each page and generate work object.
The assembly line always ends up in a infinite loop, even while i used system.exitFlow() and processerror().
The code works fine when i run it standalone. Can you please help me with this problem.
I have captured the below error
2016-11-26 07:44:50,622 INFO [AssemblyLine.AssemblyLines/Reconcile Accounts_TestAdapter_2353801792425172291_18589ea0-2b48-11b2-dbff-00000a646482.2] - Iterated pages--->5------>Ending AL
2016-11-26 07:44:50,622 INFO [ITIM_Dispatcher] - RequestID:2353801792425172291 ,status=2, reason=100, TerminateConnectors=false, reasonMessage=com.ibm.di.dispatcher.AL_INVALID_RESULT,SEARCH_FINISHED=false
Remember that for an adapter you have to send back data to ISIM (ISIG) with the success flag for each entry, as described in the RMI Adapter Development guide. E.g.
work.setProperty(Packages.com.ibm.di.dispatcher.Defs.STATUSCODE,
new Packages.java.lang.Integer (Packages.com.ibm.itim.remoteservices.provider.Status.SUCCESSFUL));
So you would replace the logmsg with logic to all the AL to exit instead. If system.exitFlow() is not working correctly, then maybe you need to restructure your AL so that it can be called multiple times, each time continuing where it left off (1 cycle runs).
Now I am no Adapter dev expert, so hopefully of them can answer more fully here :)
-Eddie
Hi Eddie,
I am sending the success flag for each entry as per the adapter development guide. Still it goes in to infinite loop.
I have changed the reconciliation approach & now using the script connector from your post (http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-5.html).
Now, it works like a charm!!! Thank you for the post.
Thanks,
Kishore
So glad to hear it, Kishore! I have plans for more post on this theme, for example on authentication and automatically importing client certs (like browsers do). However, in this latter case you still have to recycle your TDI server... But your component can auto-import the cert and then throw the 'Must restart TDI' error up.
Eddie Hartman
2016-11-28 17:50:13 UTC
Permalink
Raw Message
Post by k***@gmail.com
Post by Eddie Hartman
Post by Kishore_VJ
Hello,
I am using a http client connector (passive state) in call reply mode to retrieve httpbodyasstring.I use a json parser to convert this to json and also use hEntry for getting the attributes.
I am using two conditional while loops
Conditional loop one ---> for getting pages (1 to 50)
Conditional loop two ---> to iterate the users in each page and generate work object.
The assembly line always ends up in a infinite loop, even while i used system.exitFlow() and processerror().
The code works fine when i run it standalone. Can you please help me with this problem.
I have captured the below error
2016-11-26 07:44:50,622 INFO [AssemblyLine.AssemblyLines/Reconcile Accounts_TestAdapter_2353801792425172291_18589ea0-2b48-11b2-dbff-00000a646482.2] - Iterated pages--->5------>Ending AL
2016-11-26 07:44:50,622 INFO [ITIM_Dispatcher] - RequestID:2353801792425172291 ,status=2, reason=100, TerminateConnectors=false, reasonMessage=com.ibm.di.dispatcher.AL_INVALID_RESULT,SEARCH_FINISHED=false
Remember that for an adapter you have to send back data to ISIM (ISIG) with the success flag for each entry, as described in the RMI Adapter Development guide. E.g.
work.setProperty(Packages.com.ibm.di.dispatcher.Defs.STATUSCODE,
new Packages.java.lang.Integer (Packages.com.ibm.itim.remoteservices.provider.Status.SUCCESSFUL));
So you would replace the logmsg with logic to all the AL to exit instead. If system.exitFlow() is not working correctly, then maybe you need to restructure your AL so that it can be called multiple times, each time continuing where it left off (1 cycle runs).
Now I am no Adapter dev expert, so hopefully of them can answer more fully here :)
-Eddie
Hi Eddie,
I am sending the success flag for each entry as per the adapter development guide. Still it goes in to infinite loop.
I have changed the reconciliation approach & now using the script connector from your post (http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-5.html).
Now, it works like a charm!!! Thank you for the post.
Thanks,
Kishore
As I keep disclaiming, I am new to Identity Brokerage Adapters (ISIM/ISIG), but from what little I've seen, it's great when your ALs can be kept simple, as with a single Connector in the right mode. Scripting this Connector let's you hide the complexity of forging your response behind the Connector modes. And you can debug your scripted Connector directly and easily in the AL debugger - albeit only when you are testing it yourself via the CE.
g***@gmail.com
2017-03-27 23:49:43 UTC
Permalink
Raw Message
Hi Eddie,

I have the same issue with the "dispatcher.AL_INVALID_RESULT,SEARCH_FINISHED=false ", let me explain my aproach:

i have a DB with the information of two distincs profiles ( ej: account hartmane -> account A: profile "c" account B: profile "a") this make that every account can appear on de DB 2 times.

1. i start an AL and execute and jdbc with a select distinc, after this i add this users to an array.
2. with a loop connector i start to iterate the array and search for every user if they have account A, B or A/B
3. I send on the loop the attributes and this property for every entry


work.setProperty(Packages.com.ibm.di.dispatcher.Defs.STATUSCODE, new Packages.java.lang.Integer (Packages.com.ibm.itim.remoteservices.provider.Status.SUCCESSFUL));

4. on the end of the loop i set property like this

work.setProperty(Packages.com.ibm.di.dispatcher.Defs.STATUSCODE,
new Packages.java.lang.Integer (Packages.com.ibm.itim.remoteservices.provider.Status.SUCCESSFUL));
Post by Eddie Hartman
Post by k***@gmail.com
Post by Eddie Hartman
Post by Kishore_VJ
Hello,
I am using a http client connector (passive state) in call reply mode to retrieve httpbodyasstring.I use a json parser to convert this to json and also use hEntry for getting the attributes.
I am using two conditional while loops
Conditional loop one ---> for getting pages (1 to 50)
Conditional loop two ---> to iterate the users in each page and generate work object.
The assembly line always ends up in a infinite loop, even while i used system.exitFlow() and processerror().
The code works fine when i run it standalone. Can you please help me with this problem.
I have captured the below error
2016-11-26 07:44:50,622 INFO [AssemblyLine.AssemblyLines/Reconcile Accounts_TestAdapter_2353801792425172291_18589ea0-2b48-11b2-dbff-00000a646482.2] - Iterated pages--->5------>Ending AL
2016-11-26 07:44:50,622 INFO [ITIM_Dispatcher] - RequestID:2353801792425172291 ,status=2, reason=100, TerminateConnectors=false, reasonMessage=com.ibm.di.dispatcher.AL_INVALID_RESULT,SEARCH_FINISHED=false
Remember that for an adapter you have to send back data to ISIM (ISIG) with the success flag for each entry, as described in the RMI Adapter Development guide. E.g.
work.setProperty(Packages.com.ibm.di.dispatcher.Defs.STATUSCODE,
new Packages.java.lang.Integer (Packages.com.ibm.itim.remoteservices.provider.Status.SUCCESSFUL));
So you would replace the logmsg with logic to all the AL to exit instead. If system.exitFlow() is not working correctly, then maybe you need to restructure your AL so that it can be called multiple times, each time continuing where it left off (1 cycle runs).
Now I am no Adapter dev expert, so hopefully of them can answer more fully here :)
-Eddie
Hi Eddie,
I am sending the success flag for each entry as per the adapter development guide. Still it goes in to infinite loop.
I have changed the reconciliation approach & now using the script connector from your post (http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-5.html).
Now, it works like a charm!!! Thank you for the post.
Thanks,
Kishore
As I keep disclaiming, I am new to Identity Brokerage Adapters (ISIM/ISIG), but from what little I've seen, it's great when your ALs can be kept simple, as with a single Connector in the right mode. Scripting this Connector let's you hide the complexity of forging your response behind the Connector modes. And you can debug your scripted Connector directly and easily in the AL debugger - albeit only when you are testing it yourself via the CE.
Eddie Hartman
2017-03-28 16:15:32 UTC
Permalink
Raw Message
Post by k***@gmail.com
Hi Eddie,
i have a DB with the information of two distincs profiles ( ej: account hartmane -> account A: profile "c" account B: profile "a") this make that every account can appear on de DB 2 times.
1. i start an AL and execute and jdbc with a select distinc, after this i add this users to an array.
2. with a loop connector i start to iterate the array and search for every user if they have account A, B or A/B
3. I send on the loop the attributes and this property for every entry
work.setProperty(Packages.com.ibm.di.dispatcher.Defs.STATUSCODE, new Packages.java.lang.Integer (Packages.com.ibm.itim.remoteservices.provider.Status.SUCCESSFUL));
4. on the end of the loop i set property like this
work.setProperty(Packages.com.ibm.di.dispatcher.Defs.STATUSCODE,
new Packages.java.lang.Integer (Packages.com.ibm.itim.remoteservices.provider.Status.SUCCESSFUL));
Post by Eddie Hartman
Post by k***@gmail.com
Post by Eddie Hartman
Post by Kishore_VJ
Hello,
I am using a http client connector (passive state) in call reply mode to retrieve httpbodyasstring.I use a json parser to convert this to json and also use hEntry for getting the attributes.
I am using two conditional while loops
Conditional loop one ---> for getting pages (1 to 50)
Conditional loop two ---> to iterate the users in each page and generate work object.
The assembly line always ends up in a infinite loop, even while i used system.exitFlow() and processerror().
The code works fine when i run it standalone. Can you please help me with this problem.
I have captured the below error
2016-11-26 07:44:50,622 INFO [AssemblyLine.AssemblyLines/Reconcile Accounts_TestAdapter_2353801792425172291_18589ea0-2b48-11b2-dbff-00000a646482.2] - Iterated pages--->5------>Ending AL
2016-11-26 07:44:50,622 INFO [ITIM_Dispatcher] - RequestID:2353801792425172291 ,status=2, reason=100, TerminateConnectors=false, reasonMessage=com.ibm.di.dispatcher.AL_INVALID_RESULT,SEARCH_FINISHED=false
Remember that for an adapter you have to send back data to ISIM (ISIG) with the success flag for each entry, as described in the RMI Adapter Development guide. E.g.
work.setProperty(Packages.com.ibm.di.dispatcher.Defs.STATUSCODE,
new Packages.java.lang.Integer (Packages.com.ibm.itim.remoteservices.provider.Status.SUCCESSFUL));
So you would replace the logmsg with logic to all the AL to exit instead. If system.exitFlow() is not working correctly, then maybe you need to restructure your AL so that it can be called multiple times, each time continuing where it left off (1 cycle runs).
Now I am no Adapter dev expert, so hopefully of them can answer more fully here :)
-Eddie
Hi Eddie,
I am sending the success flag for each entry as per the adapter development guide. Still it goes in to infinite loop.
I have changed the reconciliation approach & now using the script connector from your post (http://www.tdiingoutloud.com/2016/11/json-and-xml-tutorial-part-5.html).
Now, it works like a charm!!! Thank you for the post.
Thanks,
Kishore
As I keep disclaiming, I am new to Identity Brokerage Adapters (ISIM/ISIG), but from what little I've seen, it's great when your ALs can be kept simple, as with a single Connector in the right mode. Scripting this Connector let's you hide the complexity of forging your response behind the Connector modes. And you can debug your scripted Connector directly and easily in the AL debugger - albeit only when you are testing it yourself via the CE.
From my understanding you cannot use Loops in your AL. The recon logic in ISIM (and IB for IGI) uses the AL's end-of-flow feature to report back data. So you will need to either put your logic into a scripted component, or via Hooks in a standard Iterator. I have sometimes used the FormEntry Connector as a dummy Iterator and then put all my logic in the Hooks.
Loading...