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