Hi everyone,
I'd like to expose a situation we met recently.
The situation :
Suppose a MultiCommand composed of two unique commands :
#- MyMultiCommand :
---- FirstUniqueCommand - run into JTP
---- SecondUniqueCommand - run into JAT
Now suppose than we can send this MyMultiCommand at anytime and several times during the app's lifecycle.
The problem :
Each multicommand can be start only if the previous one is finished, otherwise it will cause some break issues.
But as you can see, the FirstUniqueCommand is running into JTP. So we can't garantee that the second MultiCommand will not be finished before the first one
In a static way (for example with only two MultiCommand), the solution would be to create another MultiCommand composed of these two MyMultiCommand which garantee that the execution is sequential.
But here the command can be sent at anytime, depending on buttons. So it must be dynamic.
We develop our own approach based on wave listeners and commands Queue. Theses commands (and WaveBeans) are added into a queue. Everytime the next command is executed, we listen the wave until its consuming. Then the next one can be send.
But maybe the JRebirth-approach could be different and can be natively integrate into the framework.