Home > Não categorizado > Windows Workflow Foundation: Hosting workflows, creating machine state workflows (Part I)

Windows Workflow Foundation: Hosting workflows, creating machine state workflows (Part I)

Hi all,

Recently i’ve participated in a project that envolved Windows Workflow Foundation. Some of the issues that the project team had was: how to host a state machine workflow, how to register services, and how to communicate my UI to the workflow that contains the business logic. Well, i’ve developed a little program that execute this tasks.

Let’s explain some nice parts of the solution:

First we have to create the state machine workflow, in this case, i’ve created a workflow that calls itself.

                  WWEx

Basically, the purpose of this program is to simulate the request to the workflow of 300 users at the same time. See that i’m waiting for an event, after that i do something (the code activity represents that) and than set the state of the workflow to itself.

As we know, we have to create an inteface that will be used by the HandleExternalEvent activity. This interface must be visible to the UI and to the workflow. This interface have basically the event signature that will be implemented later.

                   image

This interface uses the ExternalDataExchangeAttribute to marks the inteface as a local service interface. See that my event signature uses  a different type. This type is basically a serializable class that inferits from ExternalDataEventArgs (Represents the data sent along when an event is raised usimg HandleExternalEvent Activity)

                                image

For now it’s all, later i’ll post the rest of the article.

Best Regards

Categories: Não categorizado
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.