1

I have an outgoing web service to send data from Siebel 7.8 to an external system. In order for the integration to work, before I send the data, I must change one of the field values, replacing every occurence of "old" with "new". How can I do this with EAI data mappings?


In an ideal world I would just use an integration source expression like Replace([Description], "old", "new"). However Siebel is far from ideal, and doesn't have a replace function (or if it does, it's not documented). I can use all the Siebel query language functions which don't need an execution context. I can also use the functions available for calculated fields (sane people could expect both lists to be the same, but Siebel documentation is also far from ideal).

My first attempt was to use the InvokeServiceMethod function and replace the text myself in eScript. So, this is my field map source expression:

InvokeServiceMethod('MyBS', 'MyReplace', 'In="' + [Description] + '"', 'Out')

After some configuration steps it works fine... except if my description field contains the " character: Error parsing expression 'In="This is a "test" with quotes"' for field '3' (SBL-DAT-00481)

I know why this happens. My double quotes are breaking the expression and I have to escape them by doubling the character, as in This is a ""test"" with quotes. However, how can I replace each " with "" in order to call my business service... if I don't have a replace function? :)

Oracle's support web has only one result for the SBL-DAT-00481 error, which as a workaround, suggests to place the whole parameter inside double quotes (which I already had). There's a linked document in which they acknowledge that the workaround is valid for a few characters such as commas or single quotes, but due to a bug in Siebel 7.7-7.8 (not present in 8.0+), it doesn't work with double quotes. They suggest to pass instead the row id as argument to the business service, and then retrieve the data directly from the BC.

Before I do that and end up with a performance-affecting workaround (pass only the ID) for the workaround (use double quotes) for the workaround (use InvokeServiceMethod) for not having a replace function... Am I going crazy here? Isn't there a simple way to do a simple text replacement in a Siebel data mapping?

AJPerez
  • 3,435
  • 10
  • 61
  • 91

1 Answers1

0

first thing (quite possibly - far from optimal one) which is coming to my mind - is to create at source BC calculated field, aka (NEW_VALUE), which becomes "NEW" for every record, where origin field has a value "OLD". and simply use this field in integration map.

Igor
  • 61
  • 5
  • I don't understand what you're suggesting... unless it's an `IIF` calculated expression? That wouldn't work, my field doesn't have "new" as a value, it contains it. It may be "new hope", or "the newest news in newcastle", or whatever, and I need to change them into "old hope", "the oldest olds in oldcastle", etc. – AJPerez Nov 08 '16 at 08:08
  • I just noticed that I said it backwards in my previous comment. "old hope" would become "new hope" and not the other way around :). Anyway it doesn't matter, it was just a simplified example of what I actually need... – AJPerez Nov 08 '16 at 10:40