Reputation: 4394
Question:
Is there an easy way to find out what Activity Type was used to create a workflow?
Background:
I am writing my own WorkflowApplication
based Windows Workflow 4 hosting engine and I am having some issues trying to load persisted workflows out of the database. I am using the WorkflowApplication.Load(Guid)
method to start the workflow, but this requires me to already create the WorkflowApplication
.
Looking at the SqlWorkflowInstanceStore
databases, I don't see the type name stored anywhere and I don't see an easy to to associate it short of making another table myself just to store that information.
Upvotes: 1
Views: 756
Reputation: 17855
I guess you have 2 options for doing that, neither of them optimal:
Upvotes: 1
Reputation: 27632
When you are using workflow services the relative URL is used to determine if a WorkflowServiceHost owns the workflow instance, this is done through the ServiceDeploymentsTable table in the database. There is no similar mechanism when you are using a WorkflowApplication so you have to roll your own.
One thing you could do is use property promotion to store the type in the InstancePromotedPropertiesTable. It will save you from creating a new table but is hardly an ideal way of solving the problem.
Upvotes: 2