none
Problem Reading projects RRS feed

  • Question

  • Hello all! i need help with some project reading... i really dont know if i call my problem that... but pls bear with me as i describe the scenario...

    I need to figure out WHAT has changed in a project... so i am interrupting the OnPublishing Event on the server, and before i call the "base.OnPublishing" method, i read the project from the WorkingStore (to get the "what is being published") and then i read from the PublishedStore (how the project is so far) and then i compare...

    the problem is that what im getting from the WorkingStore is what is already published... i checked the database and the Draft and everything is ok... it seems that the ReadProject(...,WorkingStore) is returning from the Published one... can anyone help???

    Monday, December 26, 2011 7:19 PM

Answers

  • Actually i worked a little and my assumption was right... when i call ReadProject i am reading the project as the Events Queue user... so the results are indeed correct... and if i impersonate the user that is trying to published i get the expected results!

    Tuesday, December 27, 2011 11:38 AM

All replies

  • I wonder if it has anything to do with the user that is reading the project...
    Tuesday, December 27, 2011 11:05 AM
  • HI there,

    As far as I know "ReadProject(...,WorkingStore) is returning from the Published one..." is not the case, while you make the call to PSI method (you mentioned Readproject from working store) which gets the data from working store, It will definitely read the data from Working store (Draft database).

    It seems that you are capturing the event Onpublishing, which means that data is already updated in Working store (Draft database), You may need to think for a different approch to get the changes. You may like to call OnSaved & get the data which is getting saved, store it & get the data from either calling Publsihed store or reporting db & find the changes.

    Does that help?
    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    Tuesday, December 27, 2011 11:26 AM
  • Actually i worked a little and my assumption was right... when i call ReadProject i am reading the project as the Events Queue user... so the results are indeed correct... and if i impersonate the user that is trying to published i get the expected results!

    Tuesday, December 27, 2011 11:38 AM