Handling Error Records
You can handle the error records of an activity by the property Error Record in the Process Designer. You can handle error records either by:
- Saving the error records into a repository file.
- Ignoring the error records.
- Further processing the error records.
- Aborting the process flow.
The property Error Record has following four options:
- File: On selecting this option, all the correct records are processed by the schema activity and all the error records are saved in an XML file. Adeptia Suite uses the following naming convention for this file:
ErrorRecord<name of the Schema Activity>.xml.
     This XML file is saved within the folder where the respective process flow repository is created. You can also view this repository file from the Process Flow Logs (History > Process Flow Log).
      Select the required process flow, click Details, and then click Repository.
- Ignore: On selecting this option, on the execution of the process flow, Adeptia Server ignores the error records, processes the correct records, and successfully executes the process flow for the Schema activity.
- Process: On selecting this option, the error records are processed as defined. For example, you can save the error records in a folder using File Target activity or you can send the error records to someone using a mail notification activity.
- Abort: On selecting this option, on an encounter with the very first error record, execution of the process flow is immediately aborted and the process flow is not executed.
To handle the error records when you want to process them:
To understand the same, consider a scenario where you have a process flow to concatenate employee records. You have a Text Schema that is mapped to an Excel Schema. While mapping, you want the error records to be saved in a different File Target activity. Therefore, you want to create an error stream. Perform the following steps to handle the error records:
In the Process Designer window, double-click the schema activity for which you want to handle the error records. Properties of the Schema activity are displayed in the Properties Panel.
In the Properties Panel, select 'Process' from the Error Record.
- Create a new target activity or drag and drop an existing target activity from the Repository View panel on the Graph Canvas area. This target activity will be used to write the error records in the target file. For example, create a new target activity EvalScript_ErrorRecords.
Connect this new target activity with the end event. To connect the same, place the new target activity at the end of the process flow.
Â
Right-click the activity in the Graph Canvas from which error stream is to be generated and then select Multiple Streams.Â
On the Multiple Stream Dialog window, in the Stream Information Table, the existing stream appears. To add an error stream, you need to delete the existing default stream. An application message box is displayed if you do not delete the default stream.
- Select the stream to be deleted and then click .
- Type the name of the new stream in the Stream name, for example, Data and then click Add Stream. This stream will be used to record all the correct records.
- Select the mapping activity, which was earlier connected to this schema activity from the Activities drop-down list. For example, before creating a new target activity, this schema activity was mapped with EvalScript_Mapping.
Click Map. This will create a stream between schema and mapping activity. An entry for this stream will be added in the Stream Information Table.
- By default, the Explicit Stream checkbox is selected.
- To add an error stream, type the name of the new stream in the Stream name, for example, ErrorRecord and then click Add Stream. This stream will be used to record all the error records.
- Select the File Target activity, which will be used to write the error record into the file, from the Activities drop-down list.
- Click Map to map the error stream with the activity.
Select Error Stream checkbox.
Click Done to return to the Graph Canvas. The created streams are displayed in the Graph canvas by data objects Artifact.
On execution of this process flow, the following error record file will be created in the Repository folder - ErrorRecordEvalScript_TextSchema.xml.