Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Script Error - Chain Exception with Nested Scripts

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
BiggePLM
7606 Views, 5 Replies

Script Error - Chain Exception with Nested Scripts

I know this to be user/programmer error but I can't figure out where I am editing the records our of turn.

 

The set-up is:

 

Use a workflow transition script in WS1 to spawn new record in WS2

  - Transition Script

          1. Scans WS1 managed items and identifies the row numbers that need to be transfered to the new Spawed                       Record and stores that info as a delimiated string in the newProperties passed through createNewItem

           2. Stores spawned record in item details field

- Spawned record has a trigger script in the first wf Transition to force the Edit workspace behavior script

          1. if new record has a value in the item details trigger field, Erase and put back the value to trigger the edit script

- Edit Behavior script

          1. updates two item details fields if left blank

          2. Uses the row number string stored in the item details to access WS1 managed items and retrieve the row                    info and adds row to grid tab with that info

 

I am not sure where in that string of nested scripts I am incorrectly out of turn editing. Attached is the error message that is occuring on the third script to execute (edit behavior script)

 

1. All three scripts debug with out errors

2. if I comment out the lines in the first script that pass the row and edit behavior trigger fields the scripts run fine and new record in WS2 is created

3. if I then edit that record and manually put in the trigger fields the grid is populated

3. if I manually create a new record in WS2 and fill in the edit behavior trigger, both the initial WF and edit behavior scripts run fine and the record is created with grid.

 

Sorry for dumping this on the forum but I am truly struck, this method to one degree or another was working for me so I am hoping that my hieracy of execution just needs to be tweaked to match what is now allowed by the server engine.

 

Thanks in advance

 

Bob Donovan

Bigge Crane and Rigging

 

Tags (1)
5 REPLIES 5
Message 2 of 6
BiggePLM
in reply to: BiggePLM

One additional item to mention.

 

I have a similar set of scripts on another set of workspaces that is working. The only differences in the script mechanics is:

 

1. For the one that is working I am passing the full grid row information as a deliminated string through the CreateNewitem to then create the rows in the second workspace grid

2. For the one that is not working I only pass the row number from the first workspace along with the reference to the first workspace through the CreateNewItem to then retreive the managed item info through the picklist field target.

 

I.E. item.SOURCE.workflowItems 

 

Rathern than build the grid from a set of variables in the script.

 

BD

Message 3 of 6
BiggePLM
in reply to: BiggePLM

I can post the scripts if it helps
Message 4 of 6
bastien.mazeran
in reply to: BiggePLM

Hi Bob,

I have created a new support case for you and will contact you by email shortly.

Regards,



Bastien Mazeran

Technical Support Specialist

Message 5 of 6
DonovanJr
in reply to: bastien.mazeran

WIth Bastien's help we found the issue

 

It was due to the inherient restrictions for preventing run-away scripts for spawing records that I was running into. The script engine was treating using the steps to read through an item to it's source record in a nested script as an edit. This was being done to work around the script limitations for adding to tabs other than the item details using the Create new items function.

 

They will be enhancing the Create new Item function to allow spawing records and add to the All the tabs (Grid & Managed etc.) in near future releases.

 

I look forward to that functionaliity soon.

 

BD

Message 6 of 6
nmareis
in reply to: BiggePLM

I need a script to move objects from a layer to another automatically, without selecting ... will that can help me?

 

thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report