Two useful batch files when testing with Windows Workflow Foundation

The following are two batch files I use a lot when working with WF persistence and or tracking as I find it desirable to clear the out often. Just drop them in the “C:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Workflow Foundation\SQL\EN” directory with the four SQL scripts and recreating the required databases is just a few clicks away.

CreatePersistence.bat

osql -E -S .\sqlexpress -Q “Drop Database WorkflowPersistence”
osql -E -S .\sqlexpress -Q “Create Database WorkflowPersistence”
osql -E -S .\sqlexpress -d WorkflowPersistence -i SqlPersistenceService_Schema.sql
osql -E -S .\sqlexpress -d WorkflowPersistence -i SqlPersistenceService_Logic.sql

 

CreateTracking.bat

osql -E -S .\sqlexpress -Q “Drop Database WorkflowTracking”
osql -E -S .\sqlexpress -Q “Create Database WorkflowTracking”
osql -E -S .\sqlexpress -d WorkflowTracking -i Tracking_Schema.sql
osql -E -S .\sqlexpress -d WorkflowTracking -i Tracking_Logic.sql

 

Of course you could also use my SqlCeWFPersistence as the persistence service, download it from here. I never did create a TrackingService based upon SQL Compact but if enough people are interested I might just do so [:)]

Enjoy!

[f1]
[f2]

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>