Using a Catch block for the Get Customer List Sequence

Let's handle any exceptions within the Catch block:

  1. In the Catch block, we will handle system exceptions. So, let's choose Exception as System.Exception. Click on Add Activity in the Finally part and add a Log Message of Log Level set to Error with a message stating "Not able to Extract Customer list. Due to this Error: "+exception.Message.
  2. If there is an exception while we extract the customer list from CRM, then Automation won't be able to proceed. Let's add a Terminate Workflow activity to handle this. Within the properties for the Terminate activity, set Exception to exception (start typing and the list should pop up) and add "Cannot Extract Customer list from CRM, so terminating the Automation." as a reason, as shown in the following screenshot:

  1. Now, we have completed the first part of extracting the customer list from CRM. To test this Sequence, let's add a Message box activity with the message dtCompanyList.Rows.Count at the end of the Try block, after the Extract Structure Data activity.
  1. Let's run and test the Automation we have so far. Ensure that Apptivo is open in Chrome. Go ahead and click the Run button on the Studio ribbon. If the message box returns your number of customers (3, in our case), then we have successfully completed this part of the main workflow.
  2. Please ensure you remove the message box after the unit test has completed.

Next, we will use the customer's names to look up their information from the Crunchbase website. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.9.115