I would like to get the workflow info for a Component using the Tridion JavaScript Framework (Anguilla). When I create a new Component and it enters workflow, and then I use the following code it works. But, when I refresh the GUI it does not work any longer. How can I 're-load' this item and make sure getWorkflowInfo always gives me the good stuff?
var item = $models.getItem(selection.getItem(0));
var wfInfo = item.getWorkflowInfo();
if(typeof(wfInfo) != "undefined") {
if(wfInfo.activityPerformedBy() == Tridion.UI.UserSettings.getJsonUserSettings(true).User["@ID"]) {
}
}