Asynchronous processing

You can choose whether your script runs immediately when triggered or is scheduled to run in the background.

  • Synchronous processing: Users must wait while the script runs. Synchronous processing is ideal when you want users to see the results of the script before taking more action in the DAM. For example, if a user clicks a custom button to send information to an AI service and generate an image, you would want the user to see the result right away, even if they need to wait a few seconds.
  • Asynchronous processing: Activate this option to have the script scheduled to run as a background task when triggered. When the script runs asynchronously, it runs outside of the user’s session, and you can specify a number of retries. For example, if a script will send a large number of assets to an external content management system (CSM), that task can run in the background while the user continues to work in the DAM.
Run the Call external API automation asynchronously

Run the custom script automation asynchronously

If you leave Max Retries empty, Orange Logic retries a failed run up to 10 times.

The wait between retries grows with each attempt. Orange Logic reschedules the first retry about one minute after the failed run. Each following attempt waits longer, reaching 24 hours before the last one.

A run is retried when it ends with ScriptResult.Success set to false. The [IS_LAST_RETRY] placeholder tells the script that it is on its final attempt, and a NOT_FOUND return cancels the remaining retries.

Caution

Retries are a recovery mechanism, not a polling mechanism. Because the wait grows to hours, do not use retries to check on an external job that finishes in seconds. Poll inside the script instead. Go to Wait for an external job to finish for more information.


Did this page help you?