E9.2 Create orch connector with input array

rmartone

Member
Hello everyone,

I need to implement a process in which one orchestration call another one.
I have orchA that call orchB. The input of orchB is something like the following:

{
"TRANSACTIONID": "0000000001",
"FIELD1": "XXX",
"FIELD2": "YYY",
"ARRAY": [
{
"A": "ZZZ",
"B": "RRR"
},
{
"A": "ZZZ2",
"B": "RRR2"
}
]
}

I have created a connector (connector of type Orchestration connector) on the orchB in order to call it from orchA, but when the connector read automatically the orchB parameters, it doesn't recognize the array.
So the json suggested by the connector is the following:

{
"TRANSACTIONID": "",
"FIELD1": "",
"FIELD2": "",
"ARRAY": "",
"A": "",
"B": "RRR"
}

Alternately, I try to create both a Open API connector both REST connector, but seems impossible to create an input that contains an array.
Everyone has some suggestion?

Thankyou
Roberto
 
Map system variable Orchestration input ( it will send entire orchestration input(including array) to connector )
1690807917863.png
 
Yup! This is the SUPER DUPER fun stuff with orchs.

If you are calling an orch (sub-orch) from an orch (parent-orch), and the sub-orch includes array, you need to switch to "Use Object for Input" in the transformation of the sub-orch. In the parent orch, you build your JSON input (likely using a scripting step just prior to the sub-orch call) into a single string variable, and then pass that and only that to the input of the sub-orch "jde__object".

Have fun!
1690810040023.png
 
Yup! This is the SUPER DUPER fun stuff with orchs.

If you are calling an orch (sub-orch) from an orch (parent-orch), and the sub-orch includes array, you need to switch to "Use Object for Input" in the transformation of the sub-orch. In the parent orch, you build your JSON input (likely using a scripting step just prior to the sub-orch call) into a single string variable, and then pass that and only that to the input of the sub-orch "jde__object".

Have fun!
View attachment 19748

What???

If I am passing an array from Parent (The Array is coming from another application we are integrating) to Child, I have to convert the Array in the Parent into a String then pass the String into the Child Orch with jde_object then consume the string and convert it back into an Array in the Child??

If I have to create a String out of the Array (and by string I am guessing you maybe referring to a JSON Object) then why pass it into jde_object and not a regular String?

This seems overkill.

This is incredibly strange. IF that is the case, then how can the Parent Orch accept an Array if the Child cant accept the Array. The Child is a regular Orchestration like others what makes the child special?

This is odd.
 
Last edited:
This is how I was able to load a grids-worth of data without iteration, which makes for a very performant form request. It's what worked for me, but I often say smarter people than me probably have better ways to do it!
 
What???

If I am passing an array from Parent (The Array is coming from another application we are integrating) to Child, I have to convert the Array in the Parent into a String then pass the String into the Child Orch with jde_object then consume the string and convert it back into an Array in the Child??

If I have to create a String out of the Array (and by string I am guessing you maybe referring to a JSON Object) then why pass it into jde_object and not a regular String?

This seems overkill.

This is incredibly strange. IF that is the case, then how can the Parent Orch accept an Array if the Child cant accept the Array. The Child is a regular Orchestration like others what makes the child special?

This is odd.
You cannot map arrays in transformations when you call an orchestration from another orchestration. What the jde__object allows you to do is pass the entire json object in at once.
{
"TRANSACTIONID": "0000000001",
"FIELD1": "XXX",
"FIELD2": "YYY",
"ARRAY": [
{
"A": "ZZZ",
"B": "RRR"
},
{
"A": "ZZZ2",
"B": "RRR2"
}
]
}

There is nothing special you need to do in Orchestration B if the json you pass in matches the input mapping. What tools release are you on? If you need to use a connector to call Orchestration B, @DaveWagoner's suggestion might not be an option for you.

Kevin
 
Tools release 9.2.7.4

I'm trying the same, I passed in a value jde_object in the transformation.

First is Passing a value "Orchestration input" for testing
the second is the inputs and values for the child
The third is back again at the Parent.

I added jde_object as type object in the child input and values

How is the Child Orch able to consume the "jde_object"? I do not see it as an option in the dropdown in the Child's Form Request

This is the scenario. Our Ticketing System is going to make REST call to this Parent Orch. If a conditional is met then it will call a Child. This Child Orch contains 3 components: Add resource at Pxxx1 application, updates an *Array* of Grid Records for the newly create resource at a Pxxx2 application. Then send an Email.

I want this Array of Grid Records to come in from the Payload of the Parent to the Child and iterate or insert the Grid in the Pxxx2 update application.

I *do not* want to Iterate over this Child Orchestration. Doing so will create a new resource/email for each grid record which is not what I want.

1710350731217.png


1710350835576.png
1710351140828.png
Best
 
Ok. Configure the second orchestration’s inputs match the values you wish to pass in. Do not configure jde_object as an input. jde__object is a way of passing in the json object without mapping individual values in the transformations. Think of using jde__object as the equivalent of posting json to the second orchestration just like your time system posts json to the first orchestration. The second orchestration will parse the json and use what it needs.
 
i'm def missing something. My Computer Science background is having me over think this minor situation.

I just want to verify,

Am I passing in "Orchestration Input" into jde_object or the Array? for the Array I dont see Array, I see Array.field? I see what you said about not being able to pass the array, it passes in the json obj. The way i'm interpreting that is it passes {"array":[{"c1":"a","c2":"b"},{"c1":"a","c2":"b"}]} (json obj) vs "array":[{"c1":"a","c2":"b"},{"c1":"a","c2":"b"}]. But we don't have that granularity without a Groovy/JRuby Script

Do I include the Array and the Grid Fields as the Input and Values in Child?

Which one of these combinations is correct?

1710364506145.png
1710364565997.png
1710364623375-png.20122

1710364714604.png

1710364991635.png


"The second orchestration will parse the json and use what it needs." So I don't need to explicitly consume (Groovy input/output) it in the Child, just select Roles.Role for my role array in the child's Form Request?

So then why doesn't Roles.Role show up?

Thank you for being patient.
 

Attachments

  • 1710364982682.png
    1710364982682.png
    90.3 KB · Views: 1
  • 1710364623375.png
    1710364623375.png
    89.3 KB · Views: 115
Last edited:
The Orchestration inputs in orchestration B should include the array, otherwise it will not be available to map in the form request. From what I can tell, the inputs into orchestration B should match the inputs into orchestration A. You would pass in the orchestration inputs from A into the jde__object. You do not need to map the two other fields in Transformations as they are included in the orchestration inputs you are passing using jde__object. Orchestration B will parse the json passed in from A just like it would if you ran it directly.
 
That is exactly what I am doing in this instance yet no success.
This works if I iterate over the Child Orchestration. But the goal is trying to pass the arrray into the child so the child Form Request can consume.

What am I doing wrong???

In the Child Form Request, User and Role are QBE
1710451102209.png
1710451073744.png
1710451138609.png
1710451175209.png
 
The name of the grid in the Form Request needs to match the array name in order to pass in the entire array to the grid. Make sure the name of your grid is Roles.
 
You sir, random person on the internet deserve several rounds of drinks.

My Goodness. That actually worked. Wow. Maybe I need to remove my Computer Science degree from the wall

I took what you described and applied it to another Orch that I am working on and it cleaned up alot.

for(int i = 0; i<10000; i++){
System.out.println("Thanks a Bunch")
}
 
Last edited:
Back
Top