StrataFrame Forum

DDT Asynchronous

http://forum.strataframe.net/Topic28908.aspx

By Melvin Xuereb - 11/4/2010

Hi,

I noticed that the DatabaseMigrator.DeployMetaData & Database.Migrator.Deploydata methods are both Asynchronous.

Is there a way to call the methods synchronous instead? 

I need this as I need to call different methods depending on whether the database deployment was successfull or not.

Thanks,
Melvin
By Ivan George Borges - 11/5/2010

Hi Melvin.

Have a look at this whole thread and see if it helps:

http://forum.strataframe.net/FindPost20760.aspx
By Melvin Xuereb - 11/7/2010

Hi Ivan,
Thanks for your reply but unfortunately placing the code in the 'Build Complete' event does not solve my problem. I have the following scenario:

I am developing a deployment tool which can execute both .Net websites package and database package. The following process is in used at the moment:

1. I execute the database package through strataframe API.
2. If successfull, deploy the .Net website files.


There might be times that the update will consist only of .Net website files, thus the Build Complete event is never fired. This is why i need to run this method synchronously.

Any suggestions?

Thanks,
Melvin
By Ivan George Borges - 11/7/2010

Then at this point I don't know, Melvin. Just wondering, wouldn't you be able to flag your application showing that there is no need to run the DDT? In that case, you would skip this step and go directly to your website deployment.
By Melvin Xuereb - 11/7/2010

That would be a work around, but would not be optimal for maintainability.

Thanks,
Melvin
By Ivan George Borges - 11/10/2010

OK, but can't you always send a DDT package? Do you mean that sometimes there won't be any? If you can send the package, maybe you could have a different DDT project that wouldn't do anything, but this way you would get a Build Complete being called and carry on from there. And maybe I am saying a lot of nonsenses and if so, I am really sorry. Hehe
By Melvin Xuereb - 11/14/2010

Thanks for your feedback,

I solved the problem by Sleeping the thread for a second if the Build Complete event is not yet fired.

Thanks again and good day Smile
By Ivan George Borges - 11/14/2010

Glad you got it working. Wink