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]
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.
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).
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
here is the link:
http://windowssdk.msdn.microsoft.com/en-us/library/ms734584.aspx
frank,
http://www.zipmind.com
Frank,
But the worst things is it is not yet has content under the topics "Workflow Enabled Webform" 8-(
Andy Ho
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.
Ibet that's exactly what i was looking for b-cuz "wf <-> web service"
is not. I need smth like "wf <-> web page" =)
10x.
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 =(
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?
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.
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.