Skip to main content
10-Marble
January 30, 2024
Question

Changing a state of a WTPart using Import from Spreadsheet

  • January 30, 2024
  • 2 replies
  • 1784 views

I can successfully create new WTParts in Windchill PDMLink using "Import from Spreadsheet" where I set the initial revision and state of those objects.  However, when I go to modify parts using the import functionality, the revision changes according to my spreadsheet, but the state does not.  I am using Windchill 12.0, so the ability to change the state on import is available.  My columns are in the order specified in the help documentation (though even that says that it is not necessary).  

 

The behavior is this:  

- Parts that are changing revision revert the state back to the initial state of the lifecycle, regardless of which state I specify in the spreadsheet.

 

Spreadsheet Import Action: Modify part from Rev A Prototype to Rev B Production

Result:

A.2 PROTOTYPE -> B.1 IN WORK (even though I set the state in the spreadsheet to PRODUCTION)

 

- Parts that are not changing revision will iterate, but keep the state that they currently are at, regardless of which state I specify in the spreadsheet.

 

Spreadsheet Import Action: Modify part currently at Rev A Prototype to Rev A Production

Result:

A.2 PROTOTYPE -> A.3 PROTOTYPE (even though I set the state in the spreadsheet to PRODUCTION)

 

I have confirmed that my internal ID for the state is correct - as I created a bunch of test parts where I set each to a different state in the lifecycle just to confirm that it doesn't have any issues recognizing the state ID.

 

I do have a support call open with PTC, but I am also reaching out here to see if anyone else has encountered this, and found a solution.  Thank you in advance.

2 replies

16-Pearl
January 31, 2024

Hi,

Are you using wcadmin or some other user? pls specify. 

If using normal user, the issue could be that the LC Template State Transitions override the spreadsheet specification. (I think its good in that sense).

Please check the logs on method server, you will find the reason for this.

Rgds

Hari

mdrum10-MarbleAuthor
10-Marble
January 31, 2024

Hello @Hari_Vara ,

 

I was doing the import using an account with Product Manager rights on the container where the objects reside.  I also tried using an Org Admin account.  Finally, I did set the transitions in the lifecycle template to explicitly define "Set State" on the Prototype Phase to go to Production.  None of those made any difference.

 

My parts are currently at Prototype, and I'm using the import to try to change them to Production.  So that should have worked.  Incidentally, I was working with my Windchill Site Admins on this and we checked all logs, and based on our current logging, we found nothing - no errors, warnings, or even events at the time we did the import.  The validation for the import was successful as well - so it didn't throw up any errors.  So I'm at a loss as to why it is not able to do what I can do manually in the product context, unless something about my spreadsheet is incorrect - but I created a bunch of new parts at the various states to make sure that my callout of state was correct, and that worked without any issues.  So it is just modifying them from one state to another that seems to be broken.

 

Thank you for your suggestion regardless.

16-Pearl
January 31, 2024

Hi,

Thanks for a thorough analysis!

Based on your observations , what I can think is that the Import Tool might not be perfectly developed. As MS logs also seems not captured. 

If you really want to change LC states of a hug number of objects (which seems to be the only solution as on today due to import gap), then i think you can move all these objects to a new folder. May be use import to do that !

Then go to that folder and select all and then change the LC using set state in one shot !

 

We can wait for your update from TS., 

Best Regards

Hari

HelesicPetr
22-Sapphire II
22-Sapphire II
January 31, 2024

Hi @mdrum 

My first question would be is your lifecycle template defined to use set state ?

Set state transaction between prototype and production, and inwork and prototype..

If not I can understand why the change state is not done

PetrH

mdrum10-MarbleAuthor
10-Marble
January 31, 2024

Hello @HelesicPetr ,

 

I am using a Product Manager account, which has full rights to everything, and I can manually set the state on the test objects to the desired state (from PROTOTYPE to PRODUCTION).  Just for the heck of it, I also tried it as an Org Admin account, and then, when that too didn't work - I did update the lifecycle template for the "PROTOTYPE" phase to explicitly define "Set State" for Production.  

 

That still didn't fix the problem.  So, it seems permissions is not the issue, nor the lifecycle template.

 

Thank you for the suggestion, however.  It is always worth giving it a shot.