redirect to current step when resetting process instance
This commit is contained in:
parent
d0751235b9
commit
7fde6117f1
|
@ -262,10 +262,14 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||||
return spiffStepLink(<CaretRight />, 1);
|
return spiffStepLink(<CaretRight />, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const returnToLastSpiffStep = () => {
|
||||||
|
window.location.href = `/admin/process-instances/${params.process_model_id}/${params.process_instance_id}`;
|
||||||
|
};
|
||||||
|
|
||||||
const resetProcessInstance = () => {
|
const resetProcessInstance = () => {
|
||||||
HttpService.makeCallToBackend({
|
HttpService.makeCallToBackend({
|
||||||
path: `${targetUris.processInstanceResetPath}/${currentSpiffStep()}`,
|
path: `${targetUris.processInstanceResetPath}/${currentSpiffStep()}`,
|
||||||
successCallback: refreshPage,
|
successCallback: returnToLastSpiffStep,
|
||||||
httpMethod: 'POST',
|
httpMethod: 'POST',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -637,8 +641,7 @@ export default function ProcessInstanceShow({ variant }: OwnProps) {
|
||||||
HttpService.makeCallToBackend({
|
HttpService.makeCallToBackend({
|
||||||
path: `/task-complete/${modifiedProcessModelId}/${params.process_instance_id}/${taskToUse.id}`,
|
path: `/task-complete/${modifiedProcessModelId}/${params.process_instance_id}/${taskToUse.id}`,
|
||||||
httpMethod: 'POST',
|
httpMethod: 'POST',
|
||||||
successCallback: saveTaskDataResult,
|
successCallback: returnToLastSpiffStep,
|
||||||
failureCallback: saveTaskDataFailure,
|
|
||||||
postBody: { execute },
|
postBody: { execute },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue