2 Replies Latest reply: Apr 19, 2013 7:56 AM by Keith Smith AptecLLC RSS

    Use of Incremental Recon Attribute in SearchReconTask

    Keith Smith AptecLLC
      I am attempting to implement Incremental Recon for a custom connector. I am using the oracle.iam.connectors.icfcommon.recon.SearchReconTask and wish to implement an Incremental Recon using the Incremental Recon Attribute. I have added that and Latest Token in the XML when I create my custom Scheduled Task with my custom attributes.

      The JavaDoc for this class states:
      The following task parameters are supported:

      Filter - Filter to be used in SearchApiOp call

      Incremental Recon Date Attribute, Incremental Recon Attribute - if the connector supports some attribute which is a good candidate for usage by incremental reconciliation, the attribute name can be specified by one of these parameters, if specified then the SearchApiOp will be executed with Filter containing GreaterThen(${IncrementalReconAttribute}, ${LatestToken}), the difference between these two paramters is that if Incremental Recon Date Attribute is specified, then Latest Token will be formatted as String

      Latest Token - If Incremental Recon Date Attribute or Incremental Recon Attribute it will be holding the latest value of the attribute which is specified as incremental

      When I define the connector I include the org.identityconnectors.framework.spi.operations.SearchOp interface and the executeQuery as follows:

      public void executeQuery(ObjectClass oclass, Object filter,
      ResultsHandler resultsHandler,
      OperationOptions operationOptions) {

      When I execute, the filter is always null. I have attempted this with valid values for Latest Token. I am not seeing either the Incremental Recon Attribute or the Latest Token in the OperationOptions list. Nothing is coming through in the Filter value either.

      When I look at the FlatFileConnector.java class in the example, I am seeing an attempt to get a value of LatestToken (no space) which I assume is an error?? Was this tested?

      Can anyone provide a real concrete example of using the SearchReconTask with Incremental Recon and explain the process flow?
        • 1. Re: Use of Incremental Recon Attribute in SearchReconTask
          You will have to implement FilterTranslator as well. If you look at SearchOp at http://docs.oracle.com/cd/E21764_01/apirefs.1111/e24834/toc.htm you will see 2 methods to be implemented. One createFilterTranslator and second executeQuery.

          You will have to implement FilterTranslator. ICF provides [AbstractFilterTranslator for you to use. Just extend this class and provide implementation for createGreaterThanExpression and createGreaterThanOrEqualExpression APIs.

          These methods will be called for filter object. See  GreaterThanFilter for more information.

          Your implementation should take the attribute and construct a query in string format which your target can understand and return it. This query will sent to your executeQuery API. Without these only null will be sent.

          Edited by: 855254 on Apr 19, 2013 5:24 PM

          Edited by: 855254 on Apr 19, 2013 5:27 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
          • 2. Re: Use of Incremental Recon Attribute in SearchReconTask
            Keith Smith AptecLLC
            Thanks for the reply, I came to the same conclusion yesterday morning, implemented the FilterTranslator and got the result I was seeking. There were other things that I had to figure out to complete the connector functionality, but the filter is being transmitted properly.