Is it possible to have optional command parameter?
Currently if you want to use a parameter in the command passed into the event you have to inject it and it cannot be undefined. We would like to have optional parameter and if it's not passed give it a default value instead. Is that possible?
And one more question. Aspects have possibility to exchange data with each other using processor. Would it be possible to do the same for commands?
Thank you.
At the moment, you can dispatch an event with a data object in it, so you really don't need to inject the data. There is not feature that allow you to have a optional parameter, but I'm not sure if that is really needed.
To share data between commands in a group or flow you can use de commandModel. It is and object that exits during the command livecycle and can be injected on every command. You can see and example here : https://github.com/yukatan/commangular/blob/master/test/groups/command-model-test.js