new String[] {"Process:", "Instance ID:", "State", "Start Date:", "Activity:"}
);
this.add(grid, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
MosaicPanel buttonPanel = new MosaicPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL) );
if(isRiftsawInstance) {
diagramBtn = new Button("Execution Path",
new ClickHandler()
{
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)
);
}
}
else
{
MessageBox.alert("Incomplete deployment", "No diagram associated with process");
}
}
}
);
diagramBtn.setVisible(!isRiftsawInstance);
}
diagramBtn.setEnabled(false);
buttonPanel.add(diagramBtn, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
instanceDataBtn = new Button("Instance Data",
new ClickHandler()
{
public void onClick(ClickEvent clickEvent)
{
if(currentInstance!=null)
{
createDataWindow(currentInstance);
controller.handleEvent(
new Event(UpdateInstanceDataAction.ID, currentInstance.getId())
);
}
}
}
);
instanceDataBtn.setEnabled(false);
buttonPanel.add(instanceDataBtn, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
this.add(buttonPanel);
// plugin availability
this.hasDiagramPlugin =
ServerPlugins.has("org.jboss.bpm.console.server.plugin.GraphViewerPlugin");