Make a generic updateStateAction

in ResourceController
Resolve Order states on OrderAware changes
Replace shipment/item events
Merge pull request #1526 from winzou/state-machine

[State machine] Replace shipment and item events
Add composer replace section