60 dateTimeFormat canbt accept NULL

I’m working getting our set of packages working in WM 6.01 and ran into this annoying problem. In 4.6 you can call pub.date:dateTimeFormat with a null value for inString and it returns null without error.

Unfortunantly one of our developers (really, it wasn’t me, I swear! :-)) put roughly 200 identical calls to pub.date:dateTimeFormat in various map steps throughout our code.

My intial idea is to write a wrapper that checks for NULL and makes sure it doesn’t call dateTimeFormat unless there is a valid value.

Now the problem becomes finding and replacing all the calls to my wrapper function which could take a long time and is risk prone since I don’t want to miss one and discover problems at runtime…

Does anyone have any quick workaround for this problem? Thanks!
Mike

In Developer

  1. Right Click on WmPublic pub.date:dateTimeFormat
  2. Select “Find Dependents”
  3. You’ll get a list box of names of all the Flows that call that service and can click in the list box to go to each service.

Also when you do get to the service dont drop the step that calls the dateTimeFormat service. Just right click on it and select Properties (if it is a transformer) or click the Properites tab (if it is a regular invoke). Then just replace pub.date:dateTimeFormat with your service name. If your wrapper has the same inputs and outputs and dateTimeFormat this will make sure that you will not have to remap the inputs and outputs.

I did an automated version of what Ruipinder recommends and did a search/replace in all the flow.xml files in my tree for instances of “pub.date:dateTimeFormat” and replaced it with the path to my wrapper flow script.

That worked great until I ran it and I found it replaced the call to pub.date:dateTimeFormat inside my own wrapper with the string to itself and I ended up calling my own wrapper from within my wrapper :slight_smile: Took me a few tries to realize why I was getting a stack overflow error :wink:

Just had to reload the package from disk after running the script so it would load the new location into memory.

Thanks for the ideas guys! Hopefully this thread will help others who run into this problem.
Mike