Different ending states in EventDriven

Hello,

I am programming a document approval workflow using Beta1. I'm using a state machine workflow to model the different states the document goes on.

Sometimes after the occurrence of an event I need to go in different states according to determinate conditions as for example after teh response of an approver according to the content of this response.

I noticed that the designer doesn't allow me to put a SetState if not as the last activity of my EventDriven. So I cannot simply have an IfElse choosing which state to go next.

Is it possible to obtain this functionality (maybe in beta2?) or I should think the workflow in different ways, as for example to have the caller generate different events according to the content?

I find this less elegant as moves a part of the workflow logic out of the workflow, and more it doesn't solve the problem when the state to which switch must be decided on informations that the caller may not have.

Thanks.

[1000 byte] By [Massy] at [2007-12-18]
# 1

Hi,

You can certainly model different set states within an event driven. The only condition we have is that the Set State must be the last executing activity. So for example in you document approval case depending on the reply from the reviewer (approved or rejected) you can go to two different states. The event driven structure will look the following

Event Driven

Receive Activity (for the response from the reviewer)

If Else

Set State (Approved)

Set State (Rejected)

As you can see each individual set states are the last executing activity within the event driven so it is permissible.

Thanks

Pravin Indurkar

PravinIndurkar at 2007-9-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2
You could add to SetState activities in each branch of an IfElse activity, even in Beta 1. They had to be the last one of each branch, though. In beta 2, you can put SetState activities anywhere, but you must be aware of the fact that the last one to be executed will win. The reason that we removed this validation was that there is no way to reliably validate 3rd party composite activities to check if they have a sequential or parallel behavior.
MarceloUemura at 2007-9-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified