Scripting summary
About scripting
Server-side scripting is a powerful and versatile feature that extends Fusion 360 Manage workflow functionality and lifecycle management capabilities. Scripts are written in JavaScript and the scripting engine supports JavaScript 1.5, which conforms to Edition 3 of Standard ECMA-262, ECMAScript Language Specification.
Scripting basics
Learn about script types and triggers, access to item fields, permissions and security considerations. This page covers the four main script types (Condition, Validation, Action, and Library) and how they are triggered, as well as important security considerations for script implementation.
Script invocation behavior and constraints
Understand script invocation behavior and the constraints applied by the scripting engine to prevent loops in script triggering chains. The system enforces rules to prevent infinite loops and ensures scripts don't violate invocation branch constraints when creating, modifying, or transitioning workspace items.
Writing scripts
Write scripts using Fusion 360 Manage's Script Editor and Debugger through the Administration menu's System Configuration section. The Script Editor provides features like Code Complete for contextual assistance, workspace selection for context determination, and various command buttons for saving, testing, and debugging scripts.
Importing library scripts
The Fusion 360 Manage scripting engine supports Library scripts containing functions that can be used in Action, Condition, and Validation scripts. You can import multiple Library scripts into a single script, and the same Library script can be imported into multiple scripts to promote code reuse and modular development.
Managing scripts
Use the Scripting page to edit and delete scripts, and to see where a script is used throughout your system. The management interface provides tools to track script usage across workflow transitions, escalations, workspace behaviors, and Library scripts to help maintain your scripting environment.
Running scripts
Scripts in Fusion 360 Manage are triggered in several ways: performing workflow transitions, escalating workflows, workspace behaviors, and script importing. Each trigger type supports different script types and serves specific purposes in automating and extending system functionality.
Testing and debugging
To perform basic testing and debugging of your code, use the debug utility. For more advanced testing and debugging, use the real-time Script Debugger.
Basic testing
Perform a basic test of your code within the Script Editor using the built-in test functionality. The testing interface allows you to specify parameters like dmsID, userID, and workspaceID to simulate script execution and view results, with success and failure messages providing feedback on script performance.
Advanced debugging
Use the Script Debugger to debug your script using single-stepping, breaking, and other advanced debugging features. The debugger provides dynamic highlighting, breakpoints, inspection areas for variables and expressions, and navigation capabilities for imported Library scripts to enable comprehensive code analysis.
Run-time error tracking
Any time a script fails at run time, the error is logged and an Alert icon appears next to the script on the Scripting page. You can view detailed error logs to get more information about failures and purge the log once issues have been resolved.
Scripting examples
View examples of Condition, Validation, Action, and Library scripts that demonstrate common scripting scenarios. The examples cover workflow control, data validation, file attachment checks, item lifecycle management, and various other practical implementations to help developers understand scripting best practices.
Scripting reference
Comprehensive reference documentation for the scripting API including top-level functions, preset parameters, field types, and object models. This reference covers the item object structure, Security object methods, Email functionality, Sequencer operations, and all available properties and methods for working with workspace items, relationships, attachments, BOMs, and workflow actions.