I am currently working on a cameo model, trying to make it executable. For this we need a data exchange from action to action and interaction with that data.
You can imagine it like this: The user inputs values "Mission 1" 100 "Task 1" Depending on those values, there should be decisions made in the execution and those values should be changed. I imagined doing it using decisions and opaque actions. Unfortunately it turns out that it's harder than expected.
Here's my approaches:
I created a datatype that includes a String (this property is called P1) and an Integer (this property is called P2) and then created an instance of it: Datatype and Instance Then I tried to access one of those two values by setting up an opaque action with an input called "input" and the body as "x = input.P1". "x" is the name of the output of the opaque action. Like this, I just wanted to seperate P1 from the data: Diagram with instance and opaque action This didn't work, as an Undefined object is the result i end up with.
I thought, well, using a datatype might be better but i can find a workaround and tried to define an array as the output of an opaque action and access it in another opaque action. I figured out that if i do it like "result = ["Test",1]" The opaque action will just send "Test" and in the next iteration send 1, but not at the same time as an array as i wished. Then I thought, well, not too bad, let's just make a decision that checks if the value is a String, like this we can seperate the data as well, but turns out the "Test" will not be sent as a string and my setup doesnt work either: This approach
Then i tried something else, here an NativeArray Object is sent, but then when i try to access it via "x = input[0]" the result is "o", as this is the first letter of the name of the object starting with "org.javascript....": Third approach
I could not find any way to get what I want and therefore hope that someone can help me with my issue as I can not imagine that what I want is not possible at all. I use Cameo Systems Modeler 2021x and UAF Architecture. Thanks in Advance.

