简体   繁体   中英

Workflow Foundation Separate Schema

I'm working with the persistence and tracking services in Workflow Foundation and I thought it would be a good idea to use a separate schema in SQL Server just for workflow.

Unfortunately, it appears they hard-coded the default dbo schema name into their code. One example is the SqlTrackingService class. Due to the way they wrote the tracking classes, I can't override the methods to provide my own db query code.

I have thought about the following options, but some don't appear to be possible:

  • Re-write tracking from scratch
  • Disassemble and re-write tracking files (Licensing violation?)
  • Some way to intercept and re-write sql query
  • Some way to trick it into using a custom version of SqlCommand that filters CommandText
  • Just go ahead and use the dbo schema for the WF stuff
  • Use a completely separate database for WF.

Does anyone have any suggestions or options I haven't considered? Thanks.

In most cases I just accept the dbo scheme and sometimes move things into a separate database. As far as I know there is no way to intercept the commands and rewrite the scheme or table names but then I never tried either. If you want to rewrite, I did a port, SqlCeWorkflowPersistenceService, to SQLCe and LinqToSql. Feel free to use and/or modify it to fit your needs. See here for the code. It does pretty much the same thing as the default SqlWorkflowPersistenceService except for the ownership part which is broken anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM