Topic
  • 11 replies
  • Latest Post - ‏2013-02-05T08:04:34Z by SystemAdmin
SystemAdmin
SystemAdmin
9855 Posts

Pinned topic TDI: Help with Link Criteria

‏2013-01-28T19:24:30Z |
Hello,

I'm trying to do a simple read of one iTIM database and then update another iTIM database (Syncing my Dev tier from Prod).

I'm not sure how to configure the link criteria, specifically syntax.

Thanks!
Updated on 2013-02-05T08:04:34Z at 2013-02-05T08:04:34Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    9855 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-01-29T07:04:13Z  
    You are not giving us any chance to help you - you really need to give us much more information about what EXACTLY you are trying to do e.g. what ITIM data you are trying to move.

    In general for a synch application you need to have a unique key which you want to use as the link criteria. If you do not have a unique key you will need to insert the individual entries one by one using an add connector (or similar scripted methods).

    As you do not seem to have much experience in doing this kind of things I would recommend going through some of the tutorials on the tdi users dite . http://www.tdi-users.org/twiki/bin/view/Integrator/WebHome - you will also find a lot of other materials there.

    The IBM redbook site also lists a couple a good materials - especially I would recommend starting with this : http://www.redbooks.ibm.com/redbooks/pdfs/sg246164.pdf

    HTH
    Regards
    Franz Wolfhagen
  • SystemAdmin
    SystemAdmin
    9855 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-01-30T22:18:32Z  
    You are not giving us any chance to help you - you really need to give us much more information about what EXACTLY you are trying to do e.g. what ITIM data you are trying to move.

    In general for a synch application you need to have a unique key which you want to use as the link criteria. If you do not have a unique key you will need to insert the individual entries one by one using an add connector (or similar scripted methods).

    As you do not seem to have much experience in doing this kind of things I would recommend going through some of the tutorials on the tdi users dite . http://www.tdi-users.org/twiki/bin/view/Integrator/WebHome - you will also find a lot of other materials there.

    The IBM redbook site also lists a couple a good materials - especially I would recommend starting with this : http://www.redbooks.ibm.com/redbooks/pdfs/sg246164.pdf

    HTH
    Regards
    Franz Wolfhagen
    Sorry. I'm not sure how well I can articulate my needs based on my lack of experience with the product.

    I have configured a connector that can iterate my Production iTIM database. What I want to do is read all iTIM persons, selecting certain attributes ($DN, givenName, l, etc.) and then update my Development iTIM database so that in the end, whatever persons exist in Production also exist in Development. I have the iterator connector component configured, I have the update connector component configured.

    For link criteria I am using "match any" and "companyID = companyID". These are attributes that exist in both iTIM databases.

    Below is the error I get when I run the AssemblyLine:

    3:14:36 PM GMT-07:00 com.ibm.dsml2.jndi.DSML2NamingException: invalidCredentials:com.ibm.itim.remoteservices.exception.RemoteServicesException: com.ibm.itim.remoteservices.ejb.mediation.EventManagerBean.SERVICE_NOT_FOUND

    I verified that the IDI Feed(Service)I'm using does work with an already working TDI configuration. In other words, the Service does exist and my credentials are good.

    Thanks for the links. I'll look through them.
  • jmdennis
    jmdennis
    52 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-01-31T05:56:05Z  
    Sorry. I'm not sure how well I can articulate my needs based on my lack of experience with the product.

    I have configured a connector that can iterate my Production iTIM database. What I want to do is read all iTIM persons, selecting certain attributes ($DN, givenName, l, etc.) and then update my Development iTIM database so that in the end, whatever persons exist in Production also exist in Development. I have the iterator connector component configured, I have the update connector component configured.

    For link criteria I am using "match any" and "companyID = companyID". These are attributes that exist in both iTIM databases.

    Below is the error I get when I run the AssemblyLine:

    3:14:36 PM GMT-07:00 com.ibm.dsml2.jndi.DSML2NamingException: invalidCredentials:com.ibm.itim.remoteservices.exception.RemoteServicesException: com.ibm.itim.remoteservices.ejb.mediation.EventManagerBean.SERVICE_NOT_FOUND

    I verified that the IDI Feed(Service)I'm using does work with an already working TDI configuration. In other words, the Service does exist and my credentials are good.

    Thanks for the links. I'll look through them.
    While you are perusing the links, check the sections on link criteria. Your "companyID = companyID" won't work (it's like saying 1=1). You need the link criteria in the form:

    {Connector Attribute} equals {value}

    To get the first value of the companyID in the work entry you need to prepend a '$' to it, so use:

    companyID equals $companyID
    jdennis
  • SystemAdmin
    SystemAdmin
    9855 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-01-31T06:59:46Z  
    Sorry. I'm not sure how well I can articulate my needs based on my lack of experience with the product.

    I have configured a connector that can iterate my Production iTIM database. What I want to do is read all iTIM persons, selecting certain attributes ($DN, givenName, l, etc.) and then update my Development iTIM database so that in the end, whatever persons exist in Production also exist in Development. I have the iterator connector component configured, I have the update connector component configured.

    For link criteria I am using "match any" and "companyID = companyID". These are attributes that exist in both iTIM databases.

    Below is the error I get when I run the AssemblyLine:

    3:14:36 PM GMT-07:00 com.ibm.dsml2.jndi.DSML2NamingException: invalidCredentials:com.ibm.itim.remoteservices.exception.RemoteServicesException: com.ibm.itim.remoteservices.ejb.mediation.EventManagerBean.SERVICE_NOT_FOUND

    I verified that the IDI Feed(Service)I'm using does work with an already working TDI configuration. In other words, the Service does exist and my credentials are good.

    Thanks for the links. I'll look through them.
    You are doing MUCH better now :-)

    Now I have a much clearer understanding of what your are trying to do - namely syncronizing people from one ITIM instance to another using an ldap iterator and a JNDI update connector (parts of this is still guessing).

    First - you must have a unique ID - and that is what you need in your link criteria - then you also need to set the $dn attribute on the output map - this is a little more tricky as it uses a special syntax.

    I normally have something like this for the $dn (assuming companyID is your unique id) :

    ret.value="companyID=" + work.getString("companyID") + "," + thisConnector.getConnectorParam("jndiSearchBase"); //jndiSearchBase is the Naming Context of your ITIM ITDI service

    Your ITDI Service in ITIM should have the companyID as Name Attribute.
    Link criteria should also be companyID = $companyID

    There is an example in the ITIM examples library you can follow.

    HTH (code without warranties for typos)

    Regards
    Franz Wolfhagen
  • SystemAdmin
    SystemAdmin
    9855 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-02-04T20:11:42Z  
    You are doing MUCH better now :-)

    Now I have a much clearer understanding of what your are trying to do - namely syncronizing people from one ITIM instance to another using an ldap iterator and a JNDI update connector (parts of this is still guessing).

    First - you must have a unique ID - and that is what you need in your link criteria - then you also need to set the $dn attribute on the output map - this is a little more tricky as it uses a special syntax.

    I normally have something like this for the $dn (assuming companyID is your unique id) :

    ret.value="companyID=" + work.getString("companyID") + "," + thisConnector.getConnectorParam("jndiSearchBase"); //jndiSearchBase is the Naming Context of your ITIM ITDI service

    Your ITDI Service in ITIM should have the companyID as Name Attribute.
    Link criteria should also be companyID = $companyID

    There is an example in the ITIM examples library you can follow.

    HTH (code without warranties for typos)

    Regards
    Franz Wolfhagen
    For link criteris, I have as follows:

    ret.value="companyID=" + work.getString("companyID") + "," + thisConnector.getConnectorParam("dc=Dev_Test_Sync");

    In the logs I can see a successful read, but then it errors:

    13:05:25 CTGDIS669I ScriptEngine RegEx library: java regex library.
    13:05:25 CTGDIS670I ScriptEngine Engine last modified date: Tue Jan 23 13:08:12 MST 2007 (C:\Program Files\IBM\TDI\V6.1.1\jars\3rdparty\IBM\ibmjs.jar).
    13:05:25 Update CTGDIS495I handleException , update, com.ibm.jscript.InterpretException: Script interpreter error, line=2, col=10
    Unknown member 'value' in Java Class 'com.ibm.di.server.SearchCriteria'
    13:05:25 Update CTGDIS810E handleException - cannot handle exception , update
    com.ibm.jscript.InterpretException: Script interpreter error, line=2, col=10
    Unknown member 'value' in Java Class 'com.ibm.di.server.SearchCriteria'
    at com.ibm.jscript.types.JavaAccessObject.put(JavaAccessObject.java:586)
    at com.ibm.jscript.types.FBSReferenceByName.putValue(FBSReferenceByName.java:52)
    at com.ibm.jscript.ASTTree.ASTAssign.interpret(ASTAssign.java:102)
    at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:95)
    at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:86)
    at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:476)
    at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:324)
    at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:335)
    at com.ibm.jscript.JSInterpreter.interpret(JSInterpreter.java:51)
    at com.ibm.di.script.ScriptEngine.interpret(Unknown Source)
    at com.ibm.di.script.ScriptEngine.interpret(Unknown Source)
    at com.ibm.di.server.SearchCriteria.buildCriteriaScript(Unknown Source)
    at com.ibm.di.server.SearchCriteria.buildCriteria(Unknown Source)
    at com.ibm.di.server.AssemblyLineComponent.update(Unknown Source)
    at com.ibm.di.server.AssemblyLine.msExecuteNextConnector(Unknown Source)
    at com.ibm.di.server.AssemblyLine.executeMainStep(Unknown Source)
    at com.ibm.di.server.AssemblyLine.executeMainLoop(Unknown Source)
    at com.ibm.di.server.AssemblyLine.executeMainLoop(Unknown Source)
    at com.ibm.di.server.AssemblyLine.executeAL(Unknown Source)
    at com.ibm.di.server.AssemblyLine.run(Unknown Source)
    1:05:26 PM GMT-07:00 com.ibm.jscript.InterpretException: Script interpreter error, line=2, col=10
    Unknown member 'value' in Java Class 'com.ibm.di.server.SearchCriteria'
    1:05:32 PM GMT-07:00 java.net.SocketException: Connection reset
    ************************

    Process exit code = 1
  • SystemAdmin
    SystemAdmin
    9855 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-02-04T21:49:42Z  
    For link criteris, I have as follows:

    ret.value="companyID=" + work.getString("companyID") + "," + thisConnector.getConnectorParam("dc=Dev_Test_Sync");

    In the logs I can see a successful read, but then it errors:

    13:05:25 CTGDIS669I ScriptEngine RegEx library: java regex library.
    13:05:25 CTGDIS670I ScriptEngine Engine last modified date: Tue Jan 23 13:08:12 MST 2007 (C:\Program Files\IBM\TDI\V6.1.1\jars\3rdparty\IBM\ibmjs.jar).
    13:05:25 Update CTGDIS495I handleException , update, com.ibm.jscript.InterpretException: Script interpreter error, line=2, col=10
    Unknown member 'value' in Java Class 'com.ibm.di.server.SearchCriteria'
    13:05:25 Update CTGDIS810E handleException - cannot handle exception , update
    com.ibm.jscript.InterpretException: Script interpreter error, line=2, col=10
    Unknown member 'value' in Java Class 'com.ibm.di.server.SearchCriteria'
    at com.ibm.jscript.types.JavaAccessObject.put(JavaAccessObject.java:586)
    at com.ibm.jscript.types.FBSReferenceByName.putValue(FBSReferenceByName.java:52)
    at com.ibm.jscript.ASTTree.ASTAssign.interpret(ASTAssign.java:102)
    at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:95)
    at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:86)
    at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:476)
    at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:324)
    at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:335)
    at com.ibm.jscript.JSInterpreter.interpret(JSInterpreter.java:51)
    at com.ibm.di.script.ScriptEngine.interpret(Unknown Source)
    at com.ibm.di.script.ScriptEngine.interpret(Unknown Source)
    at com.ibm.di.server.SearchCriteria.buildCriteriaScript(Unknown Source)
    at com.ibm.di.server.SearchCriteria.buildCriteria(Unknown Source)
    at com.ibm.di.server.AssemblyLineComponent.update(Unknown Source)
    at com.ibm.di.server.AssemblyLine.msExecuteNextConnector(Unknown Source)
    at com.ibm.di.server.AssemblyLine.executeMainStep(Unknown Source)
    at com.ibm.di.server.AssemblyLine.executeMainLoop(Unknown Source)
    at com.ibm.di.server.AssemblyLine.executeMainLoop(Unknown Source)
    at com.ibm.di.server.AssemblyLine.executeAL(Unknown Source)
    at com.ibm.di.server.AssemblyLine.run(Unknown Source)
    1:05:26 PM GMT-07:00 com.ibm.jscript.InterpretException: Script interpreter error, line=2, col=10
    Unknown member 'value' in Java Class 'com.ibm.di.server.SearchCriteria'
    1:05:32 PM GMT-07:00 java.net.SocketException: Connection reset
    ************************

    Process exit code = 1
    Looks like you have an attribute map and link criteria mixed together.

    try:

    *ret.filter*="(companyID=" + work.getString("companyID") + "," + thisConnector.getConnectorParam("dc=Dev_Test_Sync") + ")";

    for your reference please see:

    http://pic.dhe.ibm.com/infocenter/tivihelp/v2r1/topic/com.ibm.IBMDI.doc_7.1/advancedlinkcriteria.htm
    I have run into this simple oversite many times.
  • SystemAdmin
    SystemAdmin
    9855 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-02-04T21:52:25Z  
    Looks like you have an attribute map and link criteria mixed together.

    try:

    *ret.filter*="(companyID=" + work.getString("companyID") + "," + thisConnector.getConnectorParam("dc=Dev_Test_Sync") + ")";

    for your reference please see:

    http://pic.dhe.ibm.com/infocenter/tivihelp/v2r1/topic/com.ibm.IBMDI.doc_7.1/advancedlinkcriteria.htm
    I have run into this simple oversite many times.
    ret.filter = "(companyID=" + work.getString("companyID") + "," + thisConnector.getConnectorParam("dc=Dev_Test_Sync") + ")";
  • HomerJSimpson
    HomerJSimpson
    157 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-02-04T21:59:30Z  
    ret.filter = "(companyID=" + work.getString("companyID") + "," + thisConnector.getConnectorParam("dc=Dev_Test_Sync") + ")";
    Also, you have a mistake in the script below.
    unless you have a parameter on your connector called "dc=Dev_Test_Sync", this will not work.
    you need to do as was suggested earlier in the thread and use thisConnector.getConnectorParam("jndiSearchBase")...as "jndiSearchBase" IS a parameter on the JDNI Connector.
    Or just hardcode the value of that parameter into your script (not recommended, since you'd have to modify your script if you change the value of the search base).

    so either:
    ret.filter = "(companyID=" + work.getString("companyID") + "," + thisConnector.getConnectorParam("jndiSearchBase") + ")";

    or
    ret.filter = "(companyID=" + work.getString("companyID") + ",dc=Dev_Test_Sync)"

    that is, assuming you have an attribute called companyID in ITIM on your User records.
  • SystemAdmin
    SystemAdmin
    9855 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-02-04T23:48:33Z  
    Also, you have a mistake in the script below.
    unless you have a parameter on your connector called "dc=Dev_Test_Sync", this will not work.
    you need to do as was suggested earlier in the thread and use thisConnector.getConnectorParam("jndiSearchBase")...as "jndiSearchBase" IS a parameter on the JDNI Connector.
    Or just hardcode the value of that parameter into your script (not recommended, since you'd have to modify your script if you change the value of the search base).

    so either:
    ret.filter = "(companyID=" + work.getString("companyID") + "," + thisConnector.getConnectorParam("jndiSearchBase") + ")";

    or
    ret.filter = "(companyID=" + work.getString("companyID") + ",dc=Dev_Test_Sync)"

    that is, assuming you have an attribute called companyID in ITIM on your User records.
    I have tried every example of link criteria and I get the same error:

    4:40:42 PM GMT-07:00 com.ibm.dsml2.jndi.DSML2NamingException: invalidCredentials:com.ibm.itim.remoteservices.exception.RemoteServicesException: com.ibm.itim.remoteservices.ejb.mediation.EventManagerBean.SERVICE_NOT_FOUND

    I very much appreaciate everyone's efforts. I'm just not sure what I am missing. I know that "companyID" is the unique attribute we use versus UID. I see it in every other feed.
  • HomerJSimpson
    HomerJSimpson
    157 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-02-05T00:01:35Z  
    I have tried every example of link criteria and I get the same error:

    4:40:42 PM GMT-07:00 com.ibm.dsml2.jndi.DSML2NamingException: invalidCredentials:com.ibm.itim.remoteservices.exception.RemoteServicesException: com.ibm.itim.remoteservices.ejb.mediation.EventManagerBean.SERVICE_NOT_FOUND

    I very much appreaciate everyone's efforts. I'm just not sure what I am missing. I know that "companyID" is the unique attribute we use versus UID. I see it in every other feed.
    If you're getting SERVICE_NOT_FOUND that typically means your jndiSearchBase ("Search Base") doesn't match the "Naming context" on your datafeed Service in ITIM....OR that you might have more than one Service in ITIM with the same Naming Context value.

    I would confirm that you have created an IDI DataFeed Service in ITIM, and that the "Naming context" on the data feed service form matches what you have in the jndiSearchBase on your JDNI Connector (ie. dc=Dev_Test_Sync). You also need to ensure the Login username and Login password on your JNDI Connector match the User ID/Password on your DataFeed Service in ITIM.
  • SystemAdmin
    SystemAdmin
    9855 Posts

    Re: TDI: Help with Link Criteria

    ‏2013-02-05T08:04:34Z  
    If you're getting SERVICE_NOT_FOUND that typically means your jndiSearchBase ("Search Base") doesn't match the "Naming context" on your datafeed Service in ITIM....OR that you might have more than one Service in ITIM with the same Naming Context value.

    I would confirm that you have created an IDI DataFeed Service in ITIM, and that the "Naming context" on the data feed service form matches what you have in the jndiSearchBase on your JDNI Connector (ie. dc=Dev_Test_Sync). You also need to ensure the Login username and Login password on your JNDI Connector match the User ID/Password on your DataFeed Service in ITIM.
    And another common error - you password on the jndi connector should match the password on the service :-)

    HTH

    Regards
    Franz Wolfhagen