Error Handling for Asynchronous Workflow Tasks
When you create an asynchronous workflow task, if an error occurs during the processing of the workflow, NetSuite sends the error details to the owner of the workflow in an email. An error can be a user error or an internal SuiteFlow error. You can use the information in the email message to troubleshoot the workflow.
NetSuite sends an email message for errors that occur with the Asynchronous workflow execution task when initiated using task.WorkflowTriggerTask in SuiteScript 2.x.
NetSuite also sends an email message when an error occurs when a record for a scheduled workflow is loaded or when the record is saved.
The following errors are possible when workflow tasks are processed asynchronously:
-
Errors during workflow execution. For instance, a workflow creates a new record using the Create Record action, however the action doesn’t specify values for all required fields. The Create Record action consequently fails.
-
Skipped record errors. Errors occurring when two asynchronous tasks are processed in parallel that attempt to process the same record. In such cases, NetSuite prevents records from being processed by two or more asynchronous workflow tasks in parallel. When this happens, it is possible for records to be skipped. For instance, if one task starts processing the record and the second task attempts to as well, the second task must wait until the first finishes. The amount of time the second task waits is limited, and there is a chance the task doesn’t have a chance to process the record before the waiting time ends.
-
Infrastructure shutdown. During maintenance, asynchronous tasks might be stopped. The tasks would finish processing the current record, but would be unable to process any more records until the next scheduled workflow execution. The records that were unable to be processed during the infrastructure downtime are reported as skipped.
In the case of any of the listed errors, NetSuite sends an email to the workflow owner to notify of the errors occurrence.