Custom Transformation for Bizdoc attributes

Hi

I am facing an issue in TN. I am trying to extract DateTime attribute from Bizdoc and which is coming in format yyyy-MM-dd’T’HH:mm:ss:SSZ. TN is not supporting this format by default so need to use custom transformation. I am not able to understand how custom transformation works in background…how does it take value and give back required output of transforming service. Can someone please help me here?

What is the error you getting and can you elaborate on your flow steps for map extraction that you got stuck?

HTH,
RMG

Attribute transformation for DateTimeEventOccurred of doctype Event generated an exception. The query is /ns:event[0]/ns:header[0]/ns:dateTimeEventOccurred[0] . The original exception message is: java.lang.NullPointerException: null.

Flow Service:

Input: dateTime (String)
service called:pub.date:dateTimeFormat
Input for above service:
inString: dateTime, currentPattern:yyyy-MM-dd’T’HH:mm:ss:SSZ, newPattern:yyyy-MM-dd HH:mm:ss:SS
Output: formattedDateTime

Not sure, how to get this output formatted date back to TN, as my understanding is that TN internally will set this new value for extracted attributed. Correct me if I am wrong.

Thanks.

How are you passing input date mapping from? Is that date object or string in the pipeline?

I am setting input as XQL query from Set Input Tab when I am selecting custom transformation.

Could be issue with path and extraction failed.Please validate your XQL path/query using xmlsply or similar tool:

HTH,
RMG

XQL query looks correct, but is there any other way to pass the input? Because when I am checking the attribute transformation after saving it, XQL query is not getting set as input.

Am I missing something or everything :frowning: ? If there is any other way of using custom transformation, please suggest!

Please check these threads for XQL help:

[url]wmusers.com
[url]wmusers.com
[url]wmusers.com

If you’re trying to use a custom transformation service within the TN document recognition setup, you cannot use pub.date:dateTimeFormat. The services that are called must have a specific input/output signature as defined in the TN documentation. You will need a wrapper service that accepts and returns the proper outputs, and it can call pub.date:dateTimeFormat within if desired.

hi,

I am beginner to the webMethods , is anybody help me to create a customer names as a stringlist and output sholud be a string …

Hi Venky,

Use built in service pub.string:makeString to get a string from string list.
Check IS Built in service reference guide to get more details on this service …