- store.dispatch(subprocessPanelActions.REQUEST_ITEMS());
- store.dispatch(allProcessesPanelActions.REQUEST_ITEMS());
- if (message.objectOwnerUuid === getProjectPanelCurrentUuid(store.getState())) {
+ if (matchProcessRoute(location)) {
+ // refresh only if this is a subprocess of the currently displayed process.
+ const subproc = getSubprocesses(state.processPanel.containerRequestUuid)(state.resources);
+ for (const sb of subproc) {
+ if (sb.containerRequest.uuid === message.objectUuid || (sb.container && sb.container.uuid === message.objectUuid)) {
+ store.dispatch(subprocessPanelActions.REQUEST_ITEMS());
+ break;
+ }
+ }
+ }
+ if (matchAllProcessesRoute(location)) {
+ store.dispatch(allProcessesPanelActions.REQUEST_ITEMS());
+ }
+ if (matchProjectRoute(location) && message.objectOwnerUuid === getProjectPanelCurrentUuid(state)) {