Hi ,
In the flow services(Mapping service ) i would like to compare a String variable with an initialised variable using a transformer …I have checked the pub.String folder and i could not find a CompareTo Util in it …
IS there something like compareTo() function that we use in java …
Hi Mark,
You are right i need a look uo function for Transformer inorder to compare an IS-Doc variable with a constant varible …
I do not want to use a Java Service for the same do i am trying to explore the functions in the Web-Methods package …The built-In pub.String utility has limited functionalities…
Hi VS,
I have tried Java service for the same but i wanted to explore the Flow service for the same as Java service has to be used to the mininal as per architiecture …
Is there a tranformer which compared 2 Strings…
Its not a thirdparty tool,it is developed by webMethods Professional services and these are not avail in WmPublic.This is gone thru by almost everyone.
Just copy the service into your package/folder and invoke it in your flow service and test end to end,you can customize the service at your own risk.
Also you can invoke java services as a transformer same you do for built-in service which accomplishes the same.
The built-in service provided by webMethods are just java services (and occasionally Flow services). Creating a simple service to act as a transformer that compares two strings is a perfect example of when it is OK to use a java service instead of a Flow. That is, what you want to create is a small, discrete piece of functionality that does not already exist in the IS built-in services.
Your only Flow option is to use a BRANCH statement to evaluate your variable and multiple (redundant) MAP statements to perform the conditional mapping. As an architect, I would much prefer writing a java service to provide this utlity function over having redundante MAP steps. Both approaches will work, one is “brute force” and one is elegant.
I was reading through this post and I was trying to understand what exactly you are trying to accomplish with this service, but I’m not sure if I was able to. Somewhere along the post, I saw that all you are trying to do is a look-up of some sort. Is that correct?
If so, then have you looked into the pub.string:lookupTable service?