Skip to content

Commit bc92440

Browse files
authored
Update processrun.py (#27) to fix process run cancel and start
starting a process run needs to use POST same for cancel and restart
1 parent 5d0121a commit bc92440

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎solvexia_sdk/processrun/processrun.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ def get_process_run(self):
1414
return response.json()
1515

1616
def start_process_run(self):
17-
response = api.api_get(f"processruns/{self.process_run_id}/start")
17+
response = api.api_post_no_payload(f"processruns/{self.process_run_id}/start")
1818
api.status_code_check(response, f"Error starting process run with process_run_id {self.process_run_id}")
1919
return response.json()
2020

2121
def cancel_process_run(self):
22-
response = api.api_get(f"processruns/{self.process_run_id}/cancel")
22+
response = api.api_post_no_payload(f"processruns/{self.process_run_id}/cancel")
2323
api.status_code_check(response, f"Error cancelling process run with process_run_id {self.process_run_id}")
2424
return response.json()
2525

2626
def restart_process_run_from_step(self, step_id):
27-
response = api.api_get(f"processruns/{self.process_run_id}/steps/{step_id}/restartfromhere")
27+
response = api.api_post_no_payload(f"processruns/{self.process_run_id}/steps/{step_id}/restartfromhere")
2828
api.status_code_check(response, f"Error restarting process run with process_run_id {self.process_run_id} from step with step_id {step_id}")
2929
return response.json()
3030

0 commit comments

Comments
 (0)