Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-2410

Support of 'document' type

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    Description

      tRESTclient is able to return 'document' attribute. When it is replaced by a tck/tHTTPClient, we have to add a tMap to transform the XML string to a 'document' with this routine call:

      ParserUtils.parseTo_Document(incomingRow.body)
      

      It could be great if, when a tck connector send a record with String attribute and if this attribute is mapped to an attribute of the rwoStruct that have the 'document' type to directly call the 'parseTo_Document' routine.

      (maybe need to be discussed first since it will be a the first time the studio TCK integration will depends on a routine.)

      https://talend.slack.com/archives/C03DZP3A3EJ/p1679585835794769?thread_ts=1679557904.989739&cid=C03DZP3A3EJ
      ( Currently, when a tck connector receive a studio record with and attribute of document type, it generates a java exception with root cause:
      Caused by: java.lang.IllegalArgumentException: Unexpected class: routines.system.Document
      We was able to remove the document input attribute (it was not use finally).
      For the output, the tHTTPClient returns the XML payload as a String. We had to introduce a tMap to transform the String to a document using :
      ParserUtils.parseTo_Document(incomingRow.body)
      And it was ok after.)

      Solution 1: serialize/deserialize from/to record the document as an object, and parse the document in in rowstruct/record visitors of component-runtime-di. With the talend type id_document.

      Support case 2:
      if we've a string value and rowstruct destination field is a document , we need to create a document and assign it to the rowstruct field.

      Support case 3:
      handle document type in dynamic

      Attachments

        Activity

          People

            emmanuel_g emmanuel gallois
            ypiel Yves Piel
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: