Stop Job

I have an activity in my flow that, if it occurs, is necessary for the process. Which activity to use?
I’m thinking of using Stop Job, but I need help, because I need help with what to include in these fields

1 Like

Hi @lourena.coutinho
I am not cleared with your question

Can u explain it little elaborate?

1 Like

Yes, in the client’s program there is an error that occurs in an application, this process was as a robot attendant and therefore there was a message box for the client to check the error. But now, we will move the robot to unattended, and with that, there will be no more message box. We talked and the client defined that when the error occurs, the robot can stop the process, because when he accesses the activity again he can proceed, because the activity process is ok, even presenting the error. For this reason, when this error occurs, I have to end the process, until the customer resolves the issue and then put the robot to work again.

@lourena.coutinho, you can use a Try Catch block to achieve this. Place your main business logic inside try block and if that fails, it automatically comes to the catch block where you can handle the exception and terminate the process by either sending an email or by updating a Boolean variable which can then be used inside an if condition to stop the process.


Sorry for this question, but to interrupt the process I will not have to use an activity? or in Try Catch does any workflow end without another specific activity? Because I need it for the job, in case the error occurs, because if the robot continues without this activity it will have errors. For this reason, I need to place an activity to stop the client’s process, and when he resolves the issue he will recreate and start the job again.

To blindly stop the process, you can use Terminate Workflow activity but, that will give you a popup which you don’t need since you’re creating an unattended robot.

1 Like

Are you using REF or normal workflow?
If you’re using REF then you can use BusinessRule expression to skip that respective execution.

Sorry for the delay in the response, but I’m using the normal flow, I just went back to this activity at this point. but it includes the stop job, when the process runs, the error occurs:

RemoteException wrapping UiPath.OrchestratorClient.Utilities.ArgumentValueNotSetException: O valor do argumento “Tarefa” não foi definido ou é inválido.
at UiPath.Core.Activities.TaskExtensions.ThrowIfNeeded(Task task, Boolean suppresThrowException)
at UiPath.Core.Activities.Orchestrator.BaseOrchestratorClientActivity.ThrowIfNeeded(AsyncCodeActivityContext ctx, Task task, Boolean suppresThrowException)
at UiPath.Core.Activities.Orchestrator.BaseOrchestratorClientActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.