See Xml\Tutorial\0601 Managing document structure\Adding an error diagram\Error diagram.xml


An error diagram is a special diagram that is executed once a run-time error occurs. It provides a way to manage exceptions in your business process.


1. Open the document for which you want to add an error diagram

This guide assumes that you already have a complete document, and you want to add an error diagram to that document.



2. Create a new root diagram

Click the [Add new root diagram] button




3. A new root diagram will be added

ScriptoMate adds a new root diagram



4. Design the new error diagram

Go to Settings, and enter the name of the new diagram in the [Diagram - General] section

Click the [Apply] button



Set the action to [Misc.NotifyText]

Set the title to [Display error message]

Double-click the [Misc.NotifyText] action. This will open the [Set Script Parameters] window.

Set the multi value type to [Expression]

Set the expression to: ['An error occurred in your diagram: '+ __ERRMSG.Message]

Click the [Apply] button




5. Set the error diagram for this document

Go to [Settings], and select the new error diagram

Click the [Apply] button




6. Test the error diagram

To test your error diagram, you need to force a run-time error. An easy way is to put [1/0] as where condition of the [Datatable.Import] action on the first diagram. Click the green [Run] button and the action of the error diagram should be executed.