Search code examples
siebel

How to manage attachments in Siebel data mappings?


We have a Siebel 7.8 application with two integration objects, and both have an integration component for the attachments. One of them defines the attachment field as DTYPE_ATTACHMENT, while the other defines it as DTYPE_TEXT (it's used in an inbound web service which reads the base64 data string and writes it to a file on disk).

I'm trying to convert data from an IO to the other using UI data mappings and the EAI Data Transformation Engine service, but I have been unsuccesfull so far:

  • If I transform the data from DTYPE_ATTACHMENT to DTYPE_TEXT, it doesn't raise any error, but the attachment base64 data is lost and I only get the row_id in the resulting XML.
  • If I transform the data from DTYPE_TEXT to DTYPE_ATTACHMENT, I get this error:

    Source expression generated attachment ID 'MDEyMzQ1Njc [...] DEy8/W3CDCys7U2w==' but the corresponding attachment cannot be found. (SBL-EAI-04058)

Is there any way in which I can convert data from one of the integration objects to the other, without losing the base64 data? I don't care if the transformation is "attachment to text" or "text to attachment", I can build what I need either way. I can't change the definition of the integration objects, but I can create a new one to use as an intermediate step, if needed.


Solution

  • I give up. It cannot be done. It's impossible and any further attempt to solve it will cause the known universe to implode. Thanks, Siebel!

    However...

    I have found a quite simple workaround for my requeriment. In fact, it's so simple I can't believe it took me 4 days to figure it out.

    Instead of trying to force a DTYPE_TEXT field into a DTYPE_ATTACHMENT one, or viceversa, I have created two versions of the field in the output integration object: content (DTYPE_ATTACHMENT), and contentText (DTYPE_TEXT). Now, the two fields have a different name, but they share the External Name and XMLTag properties (content). For Siebel they're different fields, and I can address them differently in the data mapping; however, once the data transformation has been executed, they both become <content>, and therefore the external system on the other side of the web service won't notice any difference. Done!