SET_CURRENT_STEP: ofType<number>(),
SET_WORKFLOWS: ofType<WorkflowResource[]>(),
SET_SELECTED_WORKFLOW: ofType<WorkflowResource>(),
- SEARCH_WORKFLOWS: ofType<string>()
+ SEARCH_WORKFLOWS: ofType<string>(),
+ RESET_RUN_PROCESS_PANEL: ofType<{}>(),
});
export interface RunProcessSecondStepDataFormProps {
export const loadRunProcessPanel = () =>
async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
try {
+ dispatch(runProcessPanelActions.RESET_RUN_PROCESS_PANEL());
const response = await services.workflowService.list();
dispatch(runProcessPanelActions.SET_WORKFLOWS(response.items));
} catch (e) {
selectedWorkflow,
inputs: getWorkflowInputs(parseWorkflowDefinition(selectedWorkflow)) || [],
}),
- SET_WORKFLOWS: workflows => ({ ...state, workflows, searchWorkflows: workflows }),
+ SET_WORKFLOWS: workflows => ({ ...state, workflows, searchWorkflows: workflows }),
SEARCH_WORKFLOWS: term => ({ ...state, searchWorkflows: state.workflows.filter(workflow => workflow.name.includes(term)) }),
+ RESET_RUN_PROCESS_PANEL: () => ({ ...initialState, processOwnerUuid: state.processOwnerUuid }),
default: () => state
});
\ No newline at end of file