ProcessInstanceDiagramPresenter implements ProcessInstanceSummaryAware { protected Boolean isProcessNodeTypeTriggerAllowed(final ProcessNodeSummary nodeSummary) { if (nodeSummary == null || nodeSummary.getType() == null) { return false; } if ("StartNode".equals(nodeSummary.getType()) || "Join".equals(nodeSummary.getType())) { return false; } return true; }  @PostConstruct void init(); @Override void setProcessInstance(ProcessInstanceSummary processInstance); void onProcessInstanceSelectionEvent(@Observes final ProcessInstanceSelectionEvent event); void displayImage(final String svgContent, final String containerId); void onDiagramNodeSelected(final String nodeId); void onProcessNodeTrigger(final ProcessNodeSummary node); void listenParentProcessInstanceSelected(); void onNodeInstanceReTrigger(final NodeInstanceSummary node); void onNodeInstanceCancel(final NodeInstanceSummary node); void onTimerInstanceReschedule(final TimerInstanceSummary summary); void onShow(); @WorkbenchPartTitle String getName(); @WorkbenchPartView IsWidget getView(); @Inject void setProcessService(final Caller<ProcessRuntimeDataService> processService); void onProcessDiagramExpandEvent(@Observes ProcessDiagramExpandEvent event);  }
@Test public void testIsProcessNodeTypeTriggerAllowed() { assertFalse(presenter.isProcessNodeTypeTriggerAllowed(null)); assertFalse(presenter.isProcessNodeTypeTriggerAllowed(new ProcessNodeSummary())); assertFalse(presenter.isProcessNodeTypeTriggerAllowed(new ProcessNodeSummary(1l, "", "StartNode", "_1"))); assertFalse(presenter.isProcessNodeTypeTriggerAllowed(new ProcessNodeSummary(1l, "", "Join", "_1"))); assertTrue(presenter.isProcessNodeTypeTriggerAllowed(new ProcessNodeSummary(1l, "", "Split", "_1"))); assertTrue(presenter.isProcessNodeTypeTriggerAllowed(new ProcessNodeSummary(1l, "", "HumanTaskNode", "_1"))); assertTrue(presenter.isProcessNodeTypeTriggerAllowed(new ProcessNodeSummary(1l, "", "TimerNode", "_1"))); }