How can I get the workflow instance, not just the instance id, from inside the running workflow?
You have to build your own workflow server that exposes all types of functionality to your client code. The workflow server or host handles persistence, tracking, and workflow management such as starting and stopping the workflows. The server does most of this through the workflow runtime and a lot of these things have out of the box implementations. In my server, we use an event driven model, which is fed from an MSMQ queue. We read messages from the queue and then either fire events of registered services, which then fire into workflows that subscribe to those events or interact with the runtime and workflow instances for things such as, terminate. So in my server, when we get a terminate event, we terminate the workflow associated with that event by fetching the workflow instance from the workflow runtime and then calling terminate on it. Here is my code to give you and idea. virtual public void RaiseEvent(string applicationEventName, Dictionary
Related Questions
- How do I login to a non-production instance (i.e. Sandbox, Pre-Release, etc.), with a session id, or other API versions?
- Can a running club or other group have their club logo engraved on the front side of the FIXX ID?
- Where is the Product ID that I am supposed to enter when first running the FlipAlbum program?