IBM Verify

 View Only

 TDIAdd response with attributes update

Nicola Montibelli's profile image
Nicola Montibelli posted Tue April 15, 2025 08:14 AM

Hi,

I've created a full working connector with IBM SDI for IBM SVG 10.x.x based on HTTPclient standard connector for Target interaction.

The AL has these functionalities: Add, Modify, Search, Test

All test are working fine but for the Add operation I need to use the response received from target in order to upload immediately the attributes generated on target (like GUID).
I tested two kind of Add configuration:

  1. first with "onlyADD" component that doesn't have input map
  2. second with "CallReply" component that has input map that has been correctly populated with response received by RestApi call from the target with all additional fields.

I there any methods to retrieve the additional field from "response rule" ?

Thanks you support

Franz Wolfhagen's profile image
Franz Wolfhagen

I am not sure I understand your questions fully - but let me try to give some answers...

When you are doing a REST call it is not a given what the REST server is returning to you - it may give you a very short "200" answer (OK) or it may return data to you - that has nothing to do with SDI but only with the REST API implementation.

If you are doing an ADD via an HTTPClient connector POST action you will get a response - that response may or may not contain what you need - here is what I do get the response : 

	//Perform call
	httpReply = myHttpConn.queryReply(httpcall);
	//return the JSON
	return(httpReply.getString("http.bodyAsString"));

basically this means that the json response you need to parse in the http.bodyAsString attribute on the response Entry.

If that does not contain what you need you must do another call to find/get you data record and add that the entry in your putEntry()  - you should be able to do that utilizing your connectors findEntry() with a SearchCriteria...

I do not know if this helps you - but this is how I would do it...

Nicola Montibelli's profile image
Nicola Montibelli

Hi Franz, 

thanks for your reply.
I've correctly parse the response and I've mapped these values on InputMap of CallReply component. 

the log of the TDI component is this:

2025-04-14 23:45:38,269 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - [addEmployee] CTGDIS506I The 'work' object
2025-04-14 23:45:38,269 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - [addEmployee] CTGDIS003I *** Start dumping Entry
2025-04-14 23:45:38,269 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - Operation: generic 
2025-04-14 23:45:38,269 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - Entry attributes:
2025-04-14 23:45:38,269 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBvip (replace): 'false'
2025-04-14 23:45:38,269 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - http.bodyAsString (replace): '{"@odata.context":"https://mycompany-amc-stg.cloud.com/api/odata/$metadata#organizationalunits(RecId,Name)","@odata.count":1,"value":[{"RecId":"30BF214FCBB64ADBB7773214240115DC","Name":"Unknow"}]}'
2025-04-14 23:45:38,269 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - $dn (replace): 'eruid=TEST-AbdlajadS@mycompany.it'
2025-04-14 23:45:38,269 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBstatus (replace): 'Active'
2025-04-14 23:45:38,269 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBorgunitlinkrecid (replace): '30BF214FCBB64ADBB7773214240115DC'
2025-04-14 23:45:38,269 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - ericmdbidentityid (Add): 'abb0336d-fc60-4030-a35c-7f332d5be8df'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBrecid (replace): 'B96CD6BECAE541BD9B0016454520089F'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - eruid (replace): 'B96CD6BECAE541BD9B0016454520089F'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBlastname (replace): 'Abdlajad'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - eraccountstatus (Add): '0'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBloginid (replace): 'TEST-AbdlajadS@mycompany.it'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBemployeelocation (replace): 'City'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBdepartmentvalid (replace): '0B640649A828499098D26A8FA55FF797'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erCMDBcontactid (replace): 'd37917cd-7919-f011-b8af-0022489add7f'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBprimaryemail (replace): 'TEST-AbdlajadS@mycompany.it'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBnetworkusername (replace): 'TEST-AbdolnejadS@mycompany.it'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBloginidname (replace): 'TEST-AbdlajadS@mycompany.it - Saeed Abdlajad'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBemployeelocationvalid (replace): '8A74E89F401840AAA4F2194FBCB56A70'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBfirstname (replace): 'Saeed'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erpassword (Add): 'password123!'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - objectclass (replace): 'erTDICustomAccount'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - erICMDBdepartment (replace): 'Adm'
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - [addEmployee] CTGDIS004I *** Finished dumping Entry
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - [addEmployee] CTGDIS350I Hook callreply_ok [1].
2025-04-14 23:45:38,270 INFO  [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - [addEmployee] CTGDIS353I Script is: task.logmsg("DEBUG","Before Execution Start");
resCallReply = checkHttpResponse(conn);
if (resCallReply["http.responseCode"]!=201) {
errorProcess();
} else {
setStatusSuccessful();
2025-04-14 23:45:38,270 DEBUG [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - Before Execution Start
2025-04-14 23:45:38,270 DEBUG [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - addEmployee:responseCode=201
2025-04-14 23:45:38,271 DEBUG [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - [addEmployee] CTGDIS057I Hook default_ok not enabled.
2025-04-14 23:45:38,275 DEBUG [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - CTGDIS075I Trying to exit TaskCallBlock.
2025-04-14 23:45:38,275 DEBUG [AssemblyLine.AssemblyLines/TDIAdd_null_978604805609903_0c1dfce8-2db0-11b2-e824-0000ac11b47a] - CTGDIS076I Succeeded exiting TaskCallBlock.
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - Before checking for result if null
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - alname=TDIAdd:oprtype=add
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - In Set Defaults
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - default SEARCH_FINISHED=false
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - default CACHE_CONNECTORS=true
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - default REASONCODE=100
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - default REASON_MESSAGE=
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - default REASON_MESSAGE_ARGS=[TDIAdd]
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - >>>>> BEGIN DUMP ENTRY
AttributeNames: {erICMDBvip = false,http.bodyAsString = {"@odata.context":"https://mycompany-amc-stg.cloud.com/api/odata/$metadata#organizationalunits(RecId,Name)","@odata.count":1,"value":[{"RecId":"30BF214FCBB64ADBB7773214240115DC","Name":"Unknow"}]},erICMDBemployeelocationvalid = 8A74E89F401840AAA4F2194FBCB56A70,erICMDBdepartmentvalid = 0B640649A828499098D26A8FA55FF797,erICMDBstatus = Active,erICMDBfirstname = Saeed,erICMDBnetworkusername = TEST-AbdlajadS@mycompany.it,objectclass = erTDICustomAccount,erICMDBlastname = Abdolnejad,erICMDBloginidname = TEST-AbdlajadS@mycompany.it - Saeed Abdolnejad,erICMDBemployeelocation = City,erICMDBrecid = B96CD6BECAE541BD9B0016454520089F,erICMDBorgunitlinkrecid = 30BF214FCBB64ADBB7773214240115DC,$dn = eruid=TEST-AbdlajadS@mycompany.it,eruid = B96CD6BECAE541BD9B0016454520089F,ericmdbidentityid = abb0336d-fc60-4030-a35c-7f332d5be8df,erpassword = *****,eraccountstatus = 0,erICMDBloginid = TEST-AbdlajadS@mycompany.it,erICMDBprimaryemail = TEST-AbdlajadS@mycompany.it,erICMDBorganizationalunit = Unknow,erCMDBcontactid = d37917cd-7919-f011-b8af-0022489add7f,erICMDBdepartment = Adm}
PropertyNames: {REASON_MESSAGE=,STATUSCODE=1,REASONCODE=100,SEARCH_FINISHED=false,REASON_MESSAGE_ARGS=[TDIAdd],CACHE_CONNECTORS=true}
>>>>> END DUMP ENTRY
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - Inside resultEntryToExecStatus
2025-04-14 23:45:38,275 DEBUG [ITIM_Dispatcher] - In Set Defaults
2025-04-14 23:45:38,275 INFO  [ITIM_Dispatcher] - Request ID: 978604805609903, status=1, reason=100, reasonMessage=
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - After calling new AlInfo
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - Current al details removed from AltimeHtable
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] -  *************************** Add AL to Cache Start ***************************
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] -  Cache size limit = 100
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] -  Total cached AL count = 0
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - creating new Link List node
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - Adding AL Object in List acc: Mon Apr 14 23:45:38 CEST 2025 com.ibm.di.dispatcher.rmi.AlInfo@5ff09791
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] -  *************************** Add AL to Cache End ***************************
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - ************ Before calling release() method *********** 
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - Terminating AL for this resource : null
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - Waiting request count = 0
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - Total Number of ALs that can be run at this time (Available Global RunALCount) = 100
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - There is no waiting request that can be started due to termination of this request.
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - ************ After calling release() method  ************
2025-04-14 23:45:38,276 DEBUG [ITIM_Dispatcher] - END Executing the assembly line (ADDONLY,UPDATE,DELETE,LOOKUP). RequestID: 978604805609903:  FunctionName: executeALRequest() AssemblyLineName: <<TDIAdd>>

but from Connector log there's no evidence that these values returned correctly on SVG.




Nicola Montibelli's profile image
Nicola Montibelli

When ADD operation has been closed successfully by connector, I'm searching a way to send this result:

http.bodyAsString = {"@odata.context":"https://mycompany-amc-stg.cloud.com/api/odata/$metadata#organizationalunits(RecId,Name)","@odata.count":1,"value":[{"RecId":"30BF214FCBB64ADBB7773214240115DC","Name":"Unknow"}]},erICMDBemployeelocationvalid = 8A74E89F401840AAA4F2194FBCB56A70,erICMDBdepartmentvalid = 0B640649A828499098D26A8FA55FF797,erICMDBstatus = Active,erICMDBfirstname = Saeed,erICMDBnetworkusername = TEST-AbdlajadS@mycompany.it,objectclass = erTDICustomAccount,erICMDBlastname = Abdolnejad,erICMDBloginidname = TEST-AbdlajadS@mycompany.it - Saeed Abdolnejad,erICMDBemployeelocation = City,erICMDBrecid = B96CD6BECAE541BD9B0016454520089F,erICMDBorgunitlinkrecid = 30BF214FCBB64ADBB7773214240115DC,$dn = eruid=TEST-AbdlajadS@mycompany.it,eruid = B96CD6BECAE541BD9B0016454520089F,ericmdbidentityid = abb0336d-fc60-4030-a35c-7f332d5be8df,erpassword = *****,eraccountstatus = 0,erICMDBloginid = TEST-AbdlajadS@mycompany.it,erICMDBprimaryemail = TEST-AbdlajadS@mycompany.it,erICMDBorganizationalunit = Unknow,erCMDBcontactid = d37917cd-7919-f011-b8af-0022489add7f,erICMDBdepartment = Adm}

to SVG.where using ResponseRule I can update the Account attributes on SVG, because some data are generate by SVG when the ADD operation starts and some data are generated by the target when the account is successfully created.

Franz Wolfhagen's profile image
Franz Wolfhagen

As you refer to a response rule I am assuming this is the IGI component - not ISVG/ISIM ? 

I am not an expert in IGI but AFAIK when an ADD operation is performed in an adapter that will return back to brokerage/ISVG what is in the work entry - you may need to ensure that OP codes of the attribute and attribute values are correctly set. 

But how this is then supposed to be processed in IGI I have no idea - my recommendation is to verify that the data IS returned by the adapter to brokerage and then raise a case to get an understanding of how that should be detected in event queues.

Ali Malik Gürbüz's profile image
Ali Malik Gürbüz IBM Champion

Hello, 


If this is a custom adapter and you want to return a field/attribute that generated on target during add operation, you have to use dispatcher parameters and work entries to achieve this. It doesn't matter it's IGI or ISIM this is a dispatcher feature. 

Have you checked custom adapter development guide? https://www.ibm.com/support/pages/node/6372574 -> Part number M0D47EN If you haven't It's good practice to read it beforehand. 

There is one very specific example in it, I think it was in assembly line section, that examples how to do this. Here is that section ;

Returning Implicit Attributes

On some resources, after an add operation, values of attributes that were not in the add request are set to some default by the resource itself. To return these attributes to ITIM, include them in the return entry and set the attribute operation to ATTRIBUTE_ADD and attribute value operation to AV_ADD. For example,

retWorkAttribute.addValue(retLookupAttr.getValue(j));

retWorkAttribute.setOper(Packages.com.ibm.di.entry.Attribute.ATTRIBUTE_ADD); retWorkAttribute.setValueOper(j,Packages.com.ibm.di.entry.AttributeValue.AV_ADD);

 Since your target operates with web services,  you have to parse your json/response to work attributes any way, after you achieve that you can add this to a hook and return any extra attributes that you didn't sent but target generated. 

Hope it helps. 

Franz Wolfhagen's profile image
Franz Wolfhagen

Thanks for pointing out the correct documentation - I could not remember where it was - but this is the correct example.

The adapter guide may feel somewhat difficult to read - I always jokes that it is not understandable until you have finished you first adapter :-)  

Nicola Montibelli's profile image
Nicola Montibelli

Thanks Franz and Ali,

the Ali's suggestion works perfectly. My first custom adapter is finally completed.

In the CallReply connection I added in the CallReply_ok:

work["myAdapterField"].setOper(Packages.com.ibm.di.entry.Attribute.ATTRIBUTE_ADD);
work["myAdapterField"].setValueOper(0,Packages.com.ibm.di.entry.AttributeValue.AV_ADD)

where "myAdapterField" is correctly mapped in InputMap.

Thanks for you support
Franz Wolfhagen's profile image
Franz Wolfhagen

Thanks for the confirmation - I hope it will work well for you !