extracting Custom Attribute from TN_parms in xml document

Hi Experts,

We have a requirement for sending xml file to TN where we are passing senderID and filename in TN_parms in service wm.tn:receive. These values are not coming in the xml data, so i have to pass them as TN_parms.

I need to view these values in Transaction analysis as an attribute.

In the Document Type defined in TN , I have set the root tag of xml in TN document type and i am trying to extract the filename value as an attribute using query TN_parms/filename but attribute value is showing as blank in transaction analysis.

While debugging processing rule action service , I can see that TN_parms do have the filename value in it.
Am i using the correct query to fetch filename or is there any other way of achieving this.

As a workaround, I have used setAttribute and updateAttribute service in processingRule action service and there only I have fetched TN_parms data and mapped it to Bizdoc attribute.

Thanks,
Amit

You cannot set TN_params in the tn:receive directly to set custom attributes.

Basically if you want to update the bizdoc attributes for a transaction you are in the right direction to use the

tn.doc:view (map bizdoc id from the pipeline and set getcontent = true)
tn.doc:setAttribute (map attributeName and attributeValue)
tn.doc:updateAttributes

HTH,
RMG

Hi RMG,

Thanks for the quick reply.
I was able to set and update the custom attribute “filename” successfully but I am not able to set System Attribute “SenderID”.
I want sender to be visible in TN Transaction analysis but right now it is coming as blank.

My xml file is not having sender details so I am explicitly setting it in TN_parms but don’t know how to extract/set System attribute to the value available in TN_parms.

Thanks,
Amit

Hi Amit,

Earlier I met with same requirement to update system attributes of bizdoc and I sucessfully updated system attributes by using wm.tn.doc:updateSystemAttributes service but for using this service you need to extract partner profile value first by using wm.tn.profile:getInternalID then map this value in bizdoc then use wm.tn.doc:updateSystemAttributes service.

You can follow these steps

  1. wm.tn.profile:getInternalID :-use TN_parms/SenderID as input parameter to id.
  2. map output of above service to bizdoc’s SenderID then
  3. use wm.tn.doc:updateSystemAttributes

Let us know if your requirement resolved by following these steps.

Regards,
Kuldeep Gupta

Amit,

As kuldeep mentioned below try those steps if that works as expected via tn:receive TN_params

Definitely you need partners internal id to make this work.

HTH,
RMG

Hi ,

We are also having same requirement like incoming xmlInput does not have any partner details like SenderID and ReceiverID,
I have manuallu created partner profile same the username and defined doc type.
I have tried with the solution suggested by Kuldeep, as mark mentioned it is not able to identify the partnerId.
getting error as
0003.4089
Could not get internal ID for partner

Please help me to log the custom SenderId and ReceiverId to TN along with document.

Please follow the comments above or create a customer wrapper to the inbound XML data via CDATA and add the identifiers to it before routing it to TN will this option work for you?

HTH,
RMG

Hi RMG,

Currently I am facing this in wM95 version.
I tried to created wrapper , but not working in wM95.
Could you please suggest me if any other way I can log custom SenderID , ReceiverID and Document into TN for the request and response transactions.

Thanks
Veena