Reputation: 1329
Is there a way to subscribe somehow the workflow instance event when my workflow is hosted as a service?
I have created my workflowservicehost and opened, later my client app will call it and new workflow instance is created, completed, idle etc. according the workflow code inside.
But workflowservicehost only has opened, closed events not something related to the instance inside. When i used workflowapplication class for hosting there was no problem because workflowapplication has completed, aborted, idle properties.
I would use this events for custom logging like updating a table about the status of the workflow. To get this from a standard tracking database is not an option because i use custom status codes related to the purpose of my workflow.
Upvotes: 1
Views: 719
Reputation: 27632
You can track individual workflows inside of a WorkflowServiceHost by creating a custom TrackingParticipant. If needed you can add a TrackingProfile to filter the events you are interested in and even extract variables from your workflow.
See here for more info to get started.
Upvotes: 3