469,315 Members | 1,598 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

State Machine Workflow

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?

Nov 25 '08 #1
4 1725
7,872 Expert 4TB
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
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.


Nov 25 '08 #3
7,872 Expert 4TB
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
Nov 26 '08 #5

Post your reply

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

Similar topics

6 posts views Thread by Paolo Losi | last post: by
1 post views Thread by shank | last post: by
3 posts views Thread by Pete | last post: by
4 posts views Thread by nyhetsgrupper | last post: by
1 post views Thread by =?Utf-8?B?Um9iZXJ0IFNsYW5leQ==?= | last post: by
3 posts views Thread by =?Utf-8?B?Um9iZXJ0IFNsYW5leQ==?= | last post: by
1 post views Thread by =?Utf-8?B?bGludXgyazg=?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.