It was just my understanding.
rephrasing: what happens when the catch message event, or the receive message task, receive a message? do they persist as variable or what?
for the second part:
what i'm trying to do is to check if parallel subprocess can receive messages and do computation on the value they get without having problems of writing on the same variable.
the script task (process is shown in the png of the first post) are like this
<code>
println "t1: " + execution.getVariable("mydata")
</code>
<code>
println "t2: " + execution.getVariable("mydata")
</code>
<code>
println "t3: " + execution.getVariable("mydata")
</code>
and the execution of the process is done via the Java u see in the first post.
now:
the subprocess has 2 parallel instances, i send a message (containing a variable name "mydata") to the first loop with value "loop 1", and to the second instance with value "loop 2", the first script task prints the values correctly "t1:loop 1" for first instance and "t1:loop 2" for the second.
Till here everything is fine.
Then after 10 seconds the process calls the second script task which, to me, should print "t2:loop 1" for the first instance, since the first instance of the parallel process received "loop 1", and "t2: loop 2" for the second instance.
Instead, it prints "t2: loop 2" for both, which seem that the catch event stored a global variable named "mydata" as global and accessible by both subprocess. in fact, the third script task prints "loop 2". instead it should have no access to that.
to sum, the ouput is like this
<code>
t1: loop 1
t1: loop 2
t2: loop 2
t2: loop 2
t3: loop 2
</code>
this is why to me seemed that the message that arrives is stored as a setVariable(). but probably i miss some part.
What i need is: how can i have model/set the process in a way that the message received by the subprocess can be accessed only by the subprocess? thus have an output like this
<code>
t1: loop 1
t1: loop 2
t2: loop 1
t2: loop 2
t3: <nothing/error>
</code>