I've currently using Tridion 2011 SP1 and would like to create a long running process.
The process receives update by polling a external service till it's done.
Example of this bar:
So what I would like to happen:
- Start the Operation on the Service and receive a token which I can poll.
- Show the multiple operations bar
- The Code does a Poll against the service every x ms / s.
- The status on the multiple operations bar is then updated or a error is shown, if a error was encountered.
- When the status is received as done execute my callback to let me show the results to the user.
I've had a look at how Outbound E-Mail handles this implementation but I'm not able to get a working sample.
What would be the simplest way for my to implement this ? I see that Outbound E-Mail is defining it as a model and then return the model from a Model Factory. Is this the only way ?
Any Help / Advice ?
Ended using Chris Summers's answer and implemented it as follows:
// Create a progress message var progress_msg = $messages.registerProgress('Doing something 1/3', 'Really important'); // For each Update progress_msg.setTitle('Doing something n/3'); // When you are done hide the progress progress_msg.finish(); progress_msg.dispose(); // Show Success or Failure (Error) $messages.registerGoal("Your success"); $messages.registerError("Your error");