Quantcast
Viewing all articles
Browse latest Browse all 72043

handle exception in workflow process

Hi,

I have a requirement to perform process on each purchase order lines when purchase order workflow approval process has finished.

I modified the method "\Classes\VersioningPurchaseOrder\approveChangeRequest()" and is looping through all purchase order lines and performing process on them. However, the issue is, if for some reason an exception or throw error("") is thrown for one the line, it is not going to the next purchase order lines and completely exiting the workflow. Following is the pseudocode:

While select * from purchLine
{
  try
  {
    // Perform process on this line
  }
  catch
  {
      warning("exception");
  }
}

What should i do to make sure the while loop doesnt get break for any kind of exception and it process the next
purchase order lines.

TThanks

Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>