How to Stop Job and Start Again with new version?

Hi!
Imagine that I started 5 jobs in a row with the help of API. After one is completed, it moves to the next one. I want to do following steps.
1- Stop current job using UiPath activities when I catch error with try-catch
2- Program will send me an e-mail
3- I will fix the problem and publish updated version to Orchestrator, update package by manually
4- The waiting jobs will work in updated version automatically and I will restart stopped job by manually

How can I do these steps? Can you show me a way?

Hello @gururaser Here’s a step-by-step guide based on the search results:

1. Stop Current Job When Error Occurs
1.1 Use a Try-Catch block in your workflow to handle exceptions
1.2 In the Catch block, use the “Stop Job” activity to stop the current job. You’ll need to specify the job and the strategy (Stop or Kill)
1.3 Ensure that the Robot has the necessary permissions in Orchestrator to stop jobs

2. Send an Email Notification
2.1 Inside the Catch block, after stopping the job, use an email activity such as “Send SMTP Email” to send an email notification
2.2 Configure the email activity with the necessary server settings, credentials, and message details

3. Fix the Problem and Update the Package
3.1 After receiving the email, fix the issue in your UiPath Studio project.
3.2 Publish the updated version to Orchestrator=
3.3 Manually upload the new package to Orchestrator if needed

4. Update Package and Restart Stopped Job
4.1 In Orchestrator, update the process to use the new package version
4.2 To restart the stopped job, navigate to the Jobs page in Orchestrator, select the job with a final state (Stopped, Faulted, or Successful), and click “Restart” from the More Actions button

Thanks

@gururaser

  1. You can use terminate workflow activity to end the current running process/job
  2. Use send email before terminate and you can include any info as you need in it
  3. This as you said is manual
  4. There is no waiting here as once one of the job is stopped the next job automatically starts …so once package and process updated you can start the job from orchestrator again manually

Hope this helps

Cheers