Aggregate Exception while killing process

Hi All,

I am getting an exception called Aggregate exception while killing the process.
Inside the try block I am performing all the required actions of an application and closing the application. If anything failed then I am handling the exception in catch block and I am killing the process in the finally block. Everytime it is throwing me aggregate exception. I am unable to resolve this. Please help me!!!

Thanks a lot in advance!!

Hi,
How about keeping Kill Process Activity outside Try/Catches Container.

I have kept it in Finally block!! But still throwing error:(

Could you please send an screenshot of that kill application and its properties?

Hello,

One “Quick and dirty” approach for potential strange exception throw by kill process is to Set Continue on Error to true.
It not recommend in general to use it but for the current case, if you don’t have any specific recovery plan, it would be equivalent to surround it by a Try Catch without logging anything.

Cheers.

Please see the code and properties and help me out to solve the issue!!!

Why do you have 3 kill process activity .
Isn’t it suppose to be 1 as it’s inside for each loop and name of the process is “Process” in your case .

I have to kill EXCEL, SAP and Iexplorer. So I have used 3 kill process inside the for loop. But its throwing me error.

If you know the process name, you don’t need to keep them in foreach loop and you don’t need Get processes as well.Jus keep them within Try catch or @Florent_Salendres advice .

If you want to use for each, keep one Kill Process inside if condition (Process.ProcessName = EXCEL OR Process.ProcessName = SAP OR Process.ProcessName= Iexplorer)
and pass “Process” in Process parameter.

1 Like

HI please keep the Kill process sequence in the try catch block so that it will not give error.

Thanks,
shaik azmal

Hello, Im facing same problem. Inner exception says its access denied at system.diagnostics.process.kill().
I have a question @swaroopm . Did you used a terminate workflow activity before kill process activity?

Hey,

Did u get a solution for this? I am facing the same problem. Kill process activity is throwing error.

Thanks,
Pratiksha S

Please use get process and kill process in the try block and take simple exception in the catch then u will get no error.please see the below attachment

killprocee.xaml (9.6 KB)