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:

enter image description here

So what I would like to happen:

  1. Start the Operation on the Service and receive a token which I can poll.
  2. Show the multiple operations bar
  3. The Code does a Poll against the service every x ms / s.
  4. The status on the multiple operations bar is then updated or a error is shown, if a error was encountered.
  5. 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 ?

===== Update

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

// Show Success or Failure (Error)
$messages.registerGoal("Your success");
$messages.registerError("Your error");

1 Answer 1


Take a look at the PowerTools Example Tool. The JS for the tool is visible at http://code.google.com/p/tridion-2011-power-tools/source/browse/trunk/PowerTools.Editor/PowerTools/Client/Example/Example.js - It has a progress bar which polls a background service, take a look at the PowerTools.Popups.Example.prototype._onExecuteButtonClicked() method. If you want this info in the message center (as shown in your graphic) rather than the default powertool bar, just output your message to the message center instead. You can use something like the following:

$messages.registerNotification("Your message");
$messages.registerGoal("Your success");
$messages.registerError("Your error");

Generally creating a model is the easiest way to achieve this, as the Anguilla Framework will generate all of your JavaScript proxies for your services for you.

  • Thanks for the link ! Currently looking at it. So the method you recommend is precisely the same that happens when copy / pasting a items ? It logs using the methods mentioned above ? Feb 20, 2013 at 15:03
  • Correct - If you use firefox you will see all the methods on the $messages object Feb 20, 2013 at 18:55
  • Thanks for pointing me the right way, ended up creating a single progress item with $messages.registerProgress and changing the title of it after each poll. And then closing it and showing a error or success. Feb 21, 2013 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.