By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,203 Members | 1,646 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,203 IT Pros & Developers. It's quick & easy.

State Machine Workflow

P: 3
Hi all,

I have an application that hosts a state machine workflow runtime.

Once the workflow starts running, I want it to send a message to the hosting application each time it finishes a task (but still doesn't complete running).
The application will catch that message, just as it catches the events defined on the workflow runtime (as "WorkflowCompleted" or "WorkflowTerminated"), and will let the WF continue running.

Is there a way to do that?

Thanks.
Nov 25 '08 #1
Share this Question
Share on Google+
4 Replies


Plater
Expert 5K+
P: 7,872
You could create a custom event and fire it when you finish a task.
Then the application can attach a handler to it and listen for that event
Nov 25 '08 #2

P: 3
I thought about this solution too, but I had some problems with it:

In order to add a new event to the WorkflowRuntime class I had to inherit it. Then I added a new event handler in the application. The problem occured when I wanted to raise the event on the workflow itself. I didn't know how to get the current WorkflowRuntime instance. I tried to send it as a parameter from the application, but had some problems with it, so I preferred to ask if anyone knows about an easier way to do that.

If there isn't any built-in solution, I'll continue to try this one.

Thanks!

Orit.
Nov 25 '08 #3

Plater
Expert 5K+
P: 7,872
I am unfamiliar with these object? What is the full name of the object(s) you are using?
i.e. if your are using a socket, System.Net.Sockets.Socket
Nov 25 '08 #4

P: 3
System.Workflow.Runtime.WorkflowRuntime.
Nov 26 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.