I'm wondering whether I'll run into issues generating another event in the fault handler? This must have been solved before! - but I've read through the Cairngorm docs, searched the forums and can't find any mention of it. All Command Fault Handler examples I've found either do nothing or generate an Alert.
I'm also having trouble simulating the timeout if anyone has any suggestions? - I'm using Zend PHP server side.
1 person found this helpful
What you are attempting to do is tricky with standard Cairngorm. You will need to extend the architecture a bit to accomplish this.
What my team has done is create a callback feature on the Event, so after the Command is executed, the View knows if it succeeded or failed. The View can then be responsible (and it is the View's responsiblity, not the Command's) to attempting the Event again n number of times before failing to the user.
To get a high level concept of what this means, you can read some of my articles about using Abstract Classes in Cairngorm.
Hope that helps
Thanks for the tip Steve.
Not quite as easy as I hoped it was but your code certainly helps.