PLM 360 General Discussion

Reply
Mentor
dkeeley
Posts: 223
Registered: ‎10-04-2012
Message 1 of 6 (242 Views)

Import Script

242 Views, 5 Replies
10-04-2012 02:47 PM

Hi Folks,

 

I am trying to set the workflow state of items that I am importing into a workspace. I can get the items to import correctly but the script does not seem to run on import. I have the following set as an 'Action Script'

 

item.performWorkflowTransition(215, 'DK Test');

 

This script functions exactly as required when configured for workspace behaviour (Create and Edit). It also works when used within a trasition in the workflow (including the 'Start' transition). However no matter what I try I seem unable to get the script to run during workspace import.

 

Any suggestions?

 

Thanks

 

David.

 

 

Product Support
michelle.stone
Posts: 238
Registered: ‎02-21-2012
Message 2 of 6 (238 Views)

Re: Import Script

10-04-2012 03:40 PM in reply to: dkeeley

David - as you've probably guessed, the import tool does not call scripts.  This would make a great suggestion for the Idea Exchange.  Perhaps an optioin in the Import Tool to either run scripts or not. 

 

Michelle



Michelle Stone
PLM Product Manager
Autodesk, Inc.
Mentor
dkeeley
Posts: 223
Registered: ‎10-04-2012
Message 3 of 6 (233 Views)

Re: Import Script

10-04-2012 04:09 PM in reply to: michelle.stone

Hi Michelle,

 

Thanks for the quick reply. I may be able to get round my problem in another way. I'm importing 1200+ items into a basic workflow workspace. The problem is that I can't seem to find a way to change the workflow state at import. There's about 1000 items that I need to change state workflow state for. 

 

Is there a way to edit multiple items at once? This would allow me to use the 'edit' workspace behavior script to update the workflow state. Alternatively is there any way to run a batch script on all items in a workspace?

 

Thanks,

 

David. 

*Expert Elite*
scottmoyse
Posts: 1,696
Registered: ‎06-10-2009
Message 4 of 6 (222 Views)

Re: Import Script

10-04-2012 04:56 PM in reply to: dkeeley

I personally think its essential to be able to bulk modified both workflow & lifecycle states.

 

I believe you can bulk modify Item lifecycle states via the revisioning & revision controlled workspace 'relationships', via a Change order for example.

 

But there are a number of situations where you need to bulk modify item workflow states, on import is certainly one of them. But also if you have 10 or more items changing state at the same time, its desirable.

Cheers
Scott Moyse

Please use Mark Solutions!.Accept as Solution &Give Kudos!Kudos to further enhance the value of these forums. Cheers!

Mentor
dkeeley
Posts: 223
Registered: ‎10-04-2012
Message 5 of 6 (206 Views)

Re: Import Script

10-05-2012 08:01 AM in reply to: dkeeley

Any ideas?

Contributor
jonas.andersson
Posts: 23
Registered: ‎01-29-2013
Message 6 of 6 (99 Views)

Re: Import Script

07-01-2014 05:05 AM in reply to: scottmoyse
Hi threre,

I have the same problem as dkeeley. Any solutions to the problem?
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!