@Test public void testCustomColorFromPreferences() { String completeNodeColor = "#888888"; String completeNodeBorderColor = "#888887"; String activeNodeBorderColor = "#888886"; ProcessInstanceSummary processInstance = ProcessInstanceSummary.builder().withServerTemplateId("serverTemplateId").withDeploymentId("containerId").withProcessInstanceId(1l).withState(ProcessInstance.STATE_ACTIVE).build(); ProcessInstanceDiagramSummary summary = createHumanTaskProcessInstanceDiagramSummary(null); when(preferences.getProcessInstanceDiagramCompletedNodeColor()).thenReturn(completeNodeColor); when(preferences.getProcessInstanceDiagramCompletedNodeBorderColor()).thenReturn(completeNodeBorderColor); when(preferences.getProcessInstanceDiagramActiveNodeBorderColor()).thenReturn(activeNodeBorderColor); when(processService.getProcessInstanceDiagramSummary(eq(processInstance.getProcessInstanceKey()), anyString(), anyString(), anyString())).thenReturn(summary); presenter.setProcessInstance(processInstance); verify(processService).getProcessInstanceDiagramSummary(processInstance.getProcessInstanceKey(), completeNodeColor, completeNodeBorderColor, activeNodeBorderColor); }
@Override public void setProcessInstance(ProcessInstanceSummary processInstance) { view.showBusyIndicator(constants.Loading()); this.processInstance = processInstance; processNodes = emptyList(); view.setProcessNodes(processNodes); nodeInstances = emptyList(); view.setNodeInstances(nodeInstances); timerInstances = emptyList(); view.setTimerInstances(timerInstances); timers = emptyList(); view.setValue(new ProcessNodeSummary()); loadProcessInstanceDetails(); }
ProcessInstanceDiagramPresenter implements ProcessInstanceSummaryAware { @Override public void setProcessInstance(ProcessInstanceSummary processInstance) { view.showBusyIndicator(constants.Loading()); this.processInstance = processInstance; processNodes = emptyList(); view.setProcessNodes(processNodes); nodeInstances = emptyList(); view.setNodeInstances(nodeInstances); timerInstances = emptyList(); view.setTimerInstances(timerInstances); timers = emptyList(); view.setValue(new ProcessNodeSummary()); loadProcessInstanceDetails(); } }
ProcessInstanceDiagramPresenter implements ProcessInstanceSummaryAware { @Override public void setProcessInstance(ProcessInstanceSummary processInstance) { view.showBusyIndicator(constants.Loading()); this.processInstance = processInstance; processNodes = emptyList(); view.setProcessNodes(processNodes); nodeInstances = emptyList(); view.setNodeInstances(nodeInstances); timerInstances = emptyList(); view.setTimerInstances(timerInstances); timers = emptyList(); view.setValue(new ProcessNodeSummary()); loadProcessInstanceDetails(); }  }
ProcessInstanceDiagramPresenter implements ProcessInstanceSummaryAware { @Override public void setProcessInstance(ProcessInstanceSummary processInstance) { view.showBusyIndicator(constants.Loading()); this.processInstance = processInstance; processNodes = emptyList(); view.setProcessNodes(processNodes); nodeInstances = emptyList(); view.setNodeInstances(nodeInstances); timerInstances = emptyList(); view.setTimerInstances(timerInstances); timers = emptyList(); view.setValue(new ProcessNodeSummary()); loadProcessInstanceDetails(); }  @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); }
ProcessInstanceDiagramPresenter implements ProcessInstanceSummaryAware { @Override public void setProcessInstance(ProcessInstanceSummary processInstance) { view.showBusyIndicator(constants.Loading()); this.processInstance = processInstance; processNodes = emptyList(); view.setProcessNodes(processNodes); nodeInstances = emptyList(); view.setNodeInstances(nodeInstances); timerInstances = emptyList(); view.setTimerInstances(timerInstances); timers = emptyList(); view.setValue(new ProcessNodeSummary()); loadProcessInstanceDetails(); }  @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);  }