Integration

Get Involved. Join the Conversation.

Topic

    Vitor Souza
    Array variable OIC (ICS)
    Topic posted October 10, 2019 by Vitor SouzaGreen Ribbon: 100+ Points, tagged Cloud, Connection, Integration, Mapping, Orchestration, Process 
    90 Views, 6 Comments
    Title:
    Array variable OIC (ICS)
    Summary:
    Array variable OIC (ICS)
    Content:

    Hello,

    We have a "foreach integration" and I would like to create an array variable with the result of that integration.
    After that, I'd like to go through this array and call another connection (another mapping).

    How is this done? I looked in documentation and we have no examples like that. "Assign variables" are text only.

    Thanks.

     

    Comment

     

    • Ankur Jain

      Hi Vitor,

      As per my knowledge, OIC doesn't allow you to create array type variables. But here is the workaround:

      • Use Stage activity to write data on OIC staging location
      • Use Stage activity to read the data from OIC staging location
      • Call another connection
      • Do the source (stage read)and target mapping (another connection)

      Have a look into https://www.techsupper.com/ for more blogs over OIC

      Regards,

      Ankur

      • Vitor Souza

        Hello,

        Many thanks for the reply.

        When you say "Stage activity", is it about creating a "file" connection? If so, I create the file and consume it in the same integration? Would it be two connections? From file creation and reading file?
        Is this file generates temporary? Is it deleted later?

        Thanks again.

        • Ankur Jain

          Stage is a activity which doesn't require a separate connection to be created. It create a file temporarily on the oic server and delete automatically once instance is completed.

    • Monish Munot

      As of now complex variables is not supported in OIC and should be available in near time. For now you may create a schema and use is to write data in Using stage write activity with "append" option checked.

      Next you may read the file in chunks or complete based on volume to send out records for the next integration one by one or all based on integration design.

    • Rajan Modi

      A feature called "Data Stitch" is in works and should be out soon.  Keep an eye on https://blogs.oracle.com/integration

    • KAMAL HOSSEN

      Hi Victor,

      If it's a single/few variables you can use concat within Assing in the loop as below-

      • Before loop: Assign:  $varResult=""
      • In Loop: Assign: concat("$varResult,"<result>",[ Value ],"</result>")
      • After End of Loop: Assing: concat("<resultSet>",$varResult,"</resultSet>")

      But you have to use stage Write and Read to convert this to xml (end of the loop) so that you can use in another loop as needed.

      I would say the preferred approach is the stage write in the loop as CSV because xml write with append option does not work.

      Regards,

      Kamal