Troubleshooting decision export failures caused by deleted objects


A decision can include multiple dependent objects (for example, code files and rule sets). During development, multiple decision versions are often created, and later versions might no longer require some previously used objects. If you permanently delete those objects from the environment (that is, remove them from the Recycle Bin), exporting the decision might fail because the export process still references the missing dependencies.

In SAS® Intelligent Decisioning, when you use Export objects to JSON file from the Decision window, an error dialog box might be displayed:

An error occurred. The selected item "Decision_1" could not be exported.  failed

In SAS® Environment Manager, exporting the decision content with Include dependencies selected might also fail.

Export of selected objects failed.

When you export with the sas-viya CLI (transfer export), the command might fail with an error similar to the following:

running . failed

{

    "items": [

        {

            "contentType": "",

            "message": "The ID specified for use within the URI contains invalid characters. exception: com.sas.commons.rest.exceptions.ResourceException ",

            "name": "ExportTask",

            "state": "failed"

        }

    ]

}

Troubleshooting

  1. If an export error occurs, open the decision and review each version.
  2. For each version, run Validate.
  3. Identify the versions that fail validation and note the specific objects that are reported as problematic. (These objects often correspond to missing or previously deleted dependencies.)

Figure 3. Validating each decision version to identify the failing version and dependency

Workaround