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: 

Classification and On_Edit script timing issue

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
489 Views, 4 Replies

Classification and On_Edit script timing issue

Anonymous
Not applicable

Hi guys,

 

I think I'm experiencing a timing issue between when the classification writes to the record.  What I'm trying to do is when I edit an existing record and change the classification, I want it to regenerate my smart number using my on-edit script.  Sometimes it works, sometimes it doesn't work. 

 

It seems like the record will save first, before the classification items save.  If this happens, my script doesn't pick up the new classification changes.  I have to click edit and save one more time before the smart number calculates correctly.

 

In my use case, the existing record is AH6110XX.  I edit the classification and save, but the record still shows AH6110XX even though I can see in the classification, the field has changed.  I click edit and save a secodn time without changes, and it then correctly saves as AH6120XX.

 

Is this a known issue?

 

 

correct.JPGerror.JPG

0 Likes

Classification and On_Edit script timing issue

Hi guys,

 

I think I'm experiencing a timing issue between when the classification writes to the record.  What I'm trying to do is when I edit an existing record and change the classification, I want it to regenerate my smart number using my on-edit script.  Sometimes it works, sometimes it doesn't work. 

 

It seems like the record will save first, before the classification items save.  If this happens, my script doesn't pick up the new classification changes.  I have to click edit and save one more time before the smart number calculates correctly.

 

In my use case, the existing record is AH6110XX.  I edit the classification and save, but the record still shows AH6110XX even though I can see in the classification, the field has changed.  I click edit and save a secodn time without changes, and it then correctly saves as AH6120XX.

 

Is this a known issue?

 

 

correct.JPGerror.JPG

4 REPLIES 4
Message 2 of 5
tony.mandatori
in reply to: Anonymous

tony.mandatori
Autodesk
Autodesk

I think you're right.

 

Classification relies on a separate service at Autodesk.  When the record is saved, this other service is called via rest to update the classification.  So the FLC record is persisted before the classification service is called to store the changes.  If you sniff the post requests in the modern UI, you'll see the classification service being called immediately after posting the payload for the FLC record.

 

To get around this, you can queue a new item in a separate workspace to perform the update, or perform the update as part of a workflow process after the record is no longer updateable by users..

 

Does that help?

 

 

0 Likes

I think you're right.

 

Classification relies on a separate service at Autodesk.  When the record is saved, this other service is called via rest to update the classification.  So the FLC record is persisted before the classification service is called to store the changes.  If you sniff the post requests in the modern UI, you'll see the classification service being called immediately after posting the payload for the FLC record.

 

To get around this, you can queue a new item in a separate workspace to perform the update, or perform the update as part of a workflow process after the record is no longer updateable by users..

 

Does that help?

 

 

Message 3 of 5
gasevsm
in reply to: Anonymous

gasevsm
Alumni
Alumni
Hi Jason,
It is not known issue but it not a desired one either ~ classification saves should be handled by FLC and the script processing should be the last thing that happens to a modified item. This is irrespective if you’ve changed no classification fields i.e. Fields of other sections, changed both non- and classification fields in same edit item operation, or changed only classification fields within that single edit. I recommend you open a ticket with Support against this. The behavior should be deterministic and always run scripting as the very last procedure of a larger edit transaction.
Hope this helps,
Martin

Martin Gasevski | Fusion 360 Team Product Manager
0 Likes

Hi Jason,
It is not known issue but it not a desired one either ~ classification saves should be handled by FLC and the script processing should be the last thing that happens to a modified item. This is irrespective if you’ve changed no classification fields i.e. Fields of other sections, changed both non- and classification fields in same edit item operation, or changed only classification fields within that single edit. I recommend you open a ticket with Support against this. The behavior should be deterministic and always run scripting as the very last procedure of a larger edit transaction.
Hope this helps,
Martin

Martin Gasevski | Fusion 360 Team Product Manager
Message 4 of 5
Anonymous
in reply to: gasevsm

Anonymous
Not applicable
Ok Martin, I'll create a ticket. Thanks.
0 Likes

Ok Martin, I'll create a ticket. Thanks.
Message 5 of 5
Anonymous
in reply to: Anonymous

Anonymous
Not applicable

I ended up creating and forcing users to regenerate the number after edit and save.  This caused me to add pre-conditions before approving the number.  It works for now.

0 Likes

I ended up creating and forcing users to regenerate the number after edit and save.  This caused me to add pre-conditions before approving the number.  It works for now.

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

Post to forums  

Autodesk Design & Make Report