ASP.NET and WWF

Hi,

I need to build anything like this :-)

Scenario:

1) The user clicks in a button and start the workflow.
2) The workflow executes an activity and stop waiting for a action user.
3) In any moment the user access a asp.net page and list all workflows pendent and approve and cancel the workflow.
4) The stoped workflow is notified and resume the flow.

I'm thinking in use the mechanism to save and track workflows in database, but I don't have idea about how to do this communication between asp.net page and workflow already started.

May I to do it using events ?

Thanks in advance.

Andr

[656 byte] By [AndrDias] at [2007-12-22]
# 1

Hello, Andr.

As I understood, you create a workflow and then want to access it by another host (e.g. an ASP.NET application). So you will have to persist the workflow in host #1 and then load it in host #2.

IrisStern at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2

For more about ASP.NET tracking and persistence, read the follow blogs

http://blogs.msdn.com/tomlake/archive/2006/05/17/600143.aspx

and

http://blogs.msdn.com/tomlake/archive/2006/05/02/588617.aspx

Andy Ho

AndyHo at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3

For more about ASP.NET tracking and persistence, read the follow blogs of Tom Lake:

http://blogs.msdn.com/tomlake/archive/category/13216.aspx

Many workable examples there.

Andy Ho

AndyHo at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 4

Hmm... its pretty hard for me to understand how wf can cooperate with asp.net

i need to make a webpage with next functions:

on button pressed (on *.aspx page) SendMailActivity (of workflow) sends an e-mail with information takken from web site database.

i.e.: someone uploads file on my website and WF sends me an email with filename, username, filetypename, uploaddate (all takken from website's database).

I'm working on it for 2 days now. no results yet :(

all examples of wf+asp i've downloaded give me errors (build fails).

inkisgod at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 5
Have you tried to host your wf runtime in your ASP.NET application? You can create workflowRuntime object in Application_Start and put it into context. Then you can access it from your pages.

see WF SDK topic in "Developing ASP.NET Workflow Applications".

Frank,
www.zipmind.com

FrankFu at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 6
here is the link:
http://windowssdk.msdn.microsoft.com/en-us/library/ms734584.aspx

frank,
http://www.zipmind.com

FrankFu at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 7

Frank,

But the worst things is it is not yet has content under the topics "Workflow Enabled Webform" 8-(

Andy Ho

AndyHo at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 8

10x for the link frank.

I wonder if final release of MS WorkFlow will support web forms so we wont need to bother about wf-asp integration.

inkisgod at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 9

Just uploaded a set of new activities. Same as OOB WebService Request/Response, just works directly with WebPage Request/Response. In addition there is a WebPageRedirect and WebPageTransfer activity. A web site sample is included.

http://wf.netfx3.com/files/folders/control_flow/entry4354.aspx

ghenap at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 10

Ibet that's exactly what i was looking for b-cuz "wf <-> web service"

is not. I need smth like "wf <-> web page" =)

10x.

inkisgod at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 11

same old problem =(

my sendMailActivity and it's workflow are console applications (not libraries) so i cant make any reference to them from a web page. I think the last think to try would be remaking my web page into web service because web service doesn't use any references (it sends direct http links), but that means i'll have to run my web service and my workflow on 2 different hosts. that's not what i was looking for =(

inkisgod at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 12

Ok. thanks to your web activities i've managed to send email from wf when specific web page loads (i wonder if i could do the same when specific button on a specific web page is pressed). Thank you again.

Anyway, now I have to find a way to convert 'string' type into 'System.Workflow.ComponentModel.DependencyProperty' type in order to transfer text from web page controls to workflow activities (i.e. web page's textbox to sendmail activity's Body).

Does anyone has any ideas about that?

inkisgod at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 13
What build are you using, what sample have you tried and what are the build failures you are getting? All the ASP.NET samples referred to in this post, with the exception of Ghenadie's web page activities, are from my blog and should work on Beta 2 and greater.
TomLake at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 14

When a specific button is pressed the page is receiving a POST request. Look at POST method parameters illustrated in the sample.

Why do you need to convert a string into a DependencyProperty. A convertion will happen automaticaly when you create a dependency property. Use the code snippets in Visual Studio to generate one:

Right click in code editor / Insert Snippet / Workflow / DependencyProperty.

ghenap at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified