public void onClick(ClickEvent clickEvent)
{
String diagramUrl = getCurrentDefintion().getDiagramUrl();
if(diagramUrl !=null && !diagramUrl.equals(""))
{
final ProcessInstanceRef selection = getCurrentInstance();
if(selection!=null)
{
createDiagramWindow(selection);
DeferredCommand.addCommand(new Command()
{
public void execute() {
controller.handleEvent(
new Event(LoadInstanceActivityImage.class.getName(), selection)
);
}
}
);
}
}
else
{
MessageBox.alert("Incomplete deployment", "No diagram associated with process");
}
}
}
);
} else if(isjBPMInstance) {
diagramBtn = new Button("Diagram",
new ClickHandler()
{
public void onClick(ClickEvent clickEvent)
{
String diagramUrl = getCurrentDefintion().getDiagramUrl();
if(diagramUrl !=null && !diagramUrl.equals(""))
{
ProcessInstanceRef selection = getCurrentInstance();
if(selection!=null)
{
createDiagramWindow(selection);
controller.handleEvent(
new Event(LoadActivityDiagramAction.ID, selection)