Stopping the Activity after particular time

HI Can i get some help for the issue like a particular activity have to run for 15 - 20 mints and if it is running more than given time then activity have to be stopped and throw exception and process next item in the Queue Thank you.

Hi @akshaykumar_yelle ,

Sharing my thought regarding for the requirement you specified above.

  1. Create Datetime variable for the process starting time by using the following expression with the assign activity.

ProcessStartTime = DateTime.Now

  1. We have to keep the assign in important parts of our process to calculate the Intermediate time.

ProcessCurrentTime = DateTime.Now

  1. After each time we are calculating Process current time we have to calculate the difference between current time and process started time.

cdbl(((ProcessCurrentTime.Subtract(ProcessStartTime))).TotalSeconds) > 900

with the above expression we are checking like process running time greater than 15 minutes.

  1. if it is running more than 15 minutes we can send email to business and also we could use terminate flow activity to terminate the process.

i hope the above steps might helpful for your requirement. thanks.

@kirankumar.mahanthi1 Thank you for sharing your thoughts to me,
one activity is already running to get in to other activity current running activity had to be completed how can we do it .
we have ‘N’ number of documents in an application and to get those documents it will take almost 20minutes, so we write the condition to check if the activity takes more than the 15mints to get the documents we will through a BE for that timeout exception.