}
JahiaContentManagementService.App.getInstance().getWorkflowDefinitions(keys,
new BaseAsyncCallback<Map<String, GWTJahiaWorkflowDefinition>>() {
public void onSuccess(Map<String, GWTJahiaWorkflowDefinition> result) {
EngineContainer container;
if (linker instanceof ManagerLinker) {
container = new EngineWindow();
} else {
container = new EnginePanel();
}
EngineContainer cards = new EngineCards(container, linker);
if (infosListByWorflowGroup.entrySet().isEmpty()) {
new PublicationStatusWindow(linker, null, null, cards);
}
for (Map.Entry<String, List<GWTJahiaPublicationInfo>> entry : infosListByWorflowGroup.entrySet()) {
final List<GWTJahiaPublicationInfo> infoList = entry.getValue();
String workflowDefinition = infoList.get(0).getWorkflowDefinition();
if (workflowDefinition != null) {
final PublicationWorkflow custom = new PublicationWorkflow(infoList);
new WorkflowActionDialog(infoList.get(0).getMainPath(),Messages.getWithArgs("label.workflow.start.message",
"{0} started by {1} on {2} - {3} content items involved",
new Object[]{result.get(workflowDefinition),JahiaGWTParameters.getCurrentUser(),DateTimeFormat.getShortDateFormat().format(new Date()),infoList.size()})
, result.get(workflowDefinition),
linker, custom, cards);
} else {
// Workflow defined
new PublicationStatusWindow(linker, getAllUuids(infoList), infoList, cards);
}
}
cards.showEngine();
}
});
}