Home » Windows OSRSS

Non-Service workflows in AppFabric

Is it possible to host non-service workflows in AppFabric?
 

18 Answers Found

 

Answer 1

Hi Jaspreet,

No. AppFabric deals with IIS hosted WCF and WF services. In the case of WF, these are workflows  that are exposed as WCF services.

Thanks,
chris
 

Answer 2

Chris,

Going through the article http://msdn.microsoft.com/en-us/library/ee358748(VS.100).aspx, it seems possible to host non-service  workflow in appfabric  using WorkflowServiceHost extensibility feature.

Though I understood the post and it works fine for self-hosted scenario, I am unable to get handle of WorkflowServiceHost in AppFabric. Sees I will have to add extensions in web configuration file. Need some help to take this further.

 

Answer 3

Jaspreet, when you host  a service in IIS you use the WorkflowServiceHost, either the default one or one that you build by deriving from WorkflowServiceHost. WorkflowServiceHost exposes the workflow as a service; the workflow talks to the outside world via WCF services.

Give us more details about what you're trying to do. What does "I'm unable to get handle of WorkflowServiceHost in AppFabric" mean? What are you trying to do?

Thanks,
chris
 

Answer 4

Chris,

 I could get non-service  workflow (pure XAML with no message shape + SVC file) work in appfabric  using custom WorkflowServiceHostFactory.

Thanks for your help!
 

Answer 5

Hi Jaspreet,

I am also thinking of where to host  my new wf4.0 based workflows.As appfabric  is going to come and seems to be a good appserver, want to host my non service workflow in appfabric.
Good to know from your post that you are able to achieve this.
Can you please share some sample or steps on how you achieved this and what were the main bottlenecks.

Cheers
Thompson
 
 

Answer 7

Hi Jaspreet,
hi Thompson,

I am very interested in hosting non-service  workflows in AppFabric, too. Can you please share your solution to this with us?

Thanks,
Jochen

 

Answer 8

Have you seen the following topic?

How to: Host a non-service  workflow in IIS

http://msdn.microsoft.com/en-us/library/ff729688.aspx

 

 

Answer 9

Yes, but it's quite confusing.

The introduction says the article will show a way how to host workflows  in IIS that are not workflow services. So it starts with creating a simple workflow (section "Create a simple workflow") in a Console Application project. By following these steps you will get a workflow based on the Activity-Class (which has an <Activity> element as root node in the XAML).

If you follow the further steps it comes to the point where you test the endpoint by opening its URL in Internet Explorer. This fails with a 404. If you try the following steps and create a client that will call the endpoint, it also fails with an Exception, containing a 404. The sample seems not working so far.

If you now scroll a bit deeper, there is a section "Example", containing the complete code for this sample. If you look at the code for Workflow1.xamlx, you will recognize that this workflow is based on a <WorkflowService> root activity in contrast to the sample workflow we created in the beginning (which is based on <Activity>). If you now try to run the sample with this new "Worklflow1.xamlx" code, it works. Nice, but this is a workflow based on WorkflowService, which is no  non-service  workflow for me.

The article suggests that it's possible to host  normal <Activity> based workflows in IIS. I have tried several simple workflows, but only <WorkflowService> based workflows work with this sample. Every "normal" workflow leads to a 404 error.

I'm looking for a solution to host simple workflows in IIS and appfabric  just like they are created when you drag a few activities onto the workflow designer surface and save the XAML to a file. I don't want the user to have to add a <WorkflowService> node or something like that.

Thanks,
Jochen

 

Answer 10

Jochen,

I have gone through the topic and tried to make it a bit clearer and made serveral fixes to the code.  I have placed the updated topic in a Word doc for you to look at here: http://cid-dbe3afde8f12ca0d.office.live.com/browse.aspx/HostingNonService?Bsrc=EMSHOO&Bpub=SN.Notifications Please let me know if this makes more sense to you. One additional thing is the Workflow1.xamlx still has a root element of type <WorkflowService>. While the element is "WorkflowService" there are no Receive or Send activities in it, and therefore it is treated as a regular (non-service) workflow. The WorklflowService element is our tie-in to IIS, but I believe you can use a workflow that has an Activity element as the root, but it needs to be compiled to an assembly (it cannot be read in from a XAMLX file).  I will do some more research and see if I can get that to work.

I hope this information is helpful, and please let me know if you would like to see further changes in this doc.

Thanks,

Michael Green [MSFT]

 

Answer 11

Thanks a lot Michael,


I have looked over your Word doc and it makes more sense now.

It would be very interesting to hear more about hosting workflows  that have Activity root elements. Because it's a bit awkward to instruct the user of the designer that he has to create a WorkflowService, remove the Send and Receive activities, and so on.

Looking forward to hearing from you,

Jochen

 

Answer 12

In .Net 3.5, you were able to use page flow to interact with a workflow by passing the instance along with the session state, but AppFabric makes this unneccesary and not recommended-
 

Answer 13

Michael,

I've worked through the example in your document and I'm able to execute the non-service  workflow as you described.  However, I'd like to have a workflow executed on IIS startup using the AppFabric auto-start feature.  Specifying the relativeVirtualPath="Workflow1.xamlx" doesn't seem to actually start the workflow.  Is this possible?

<microsoft.applicationServer><hosting><serviceAutoStart><addrelativeVirtualPath="Workflow1.xamlx"/></serviceAutoStart></hosting></microsoft.applicationServer>

Thanks,

Dave

 

Answer 14

Jochen,

I have gone through the topic and tried to make it a bit clearer and made serveral fixes to the code.  I have placed the updated topic in a Word doc for you to look at here: http://cid-dbe3afde8f12ca0d.office.live.com/browse.aspx/HostingNonService?Bsrc=EMSHOO&Bpub=SN.Notifications Please let me know if this makes more sense to you. One additional thing is the Workflow1.xamlx still has a root element of type <WORKFLOWSERVICE>. While the element is "WorkflowService" there are no Receive or Send activities in it, and therefore it is treated as a regular (non-service) workflow. The WorklflowService element is our tie-in to IIS, but I believe you can use a workflow that has an Activity element as the root, but it needs to be compiled to an assembly (it cannot be read in from a XAMLX file).  I will do some more research and see if I can get that to work.</WORKFLOWSERVICE>

I hope this information is helpful, and please let me know if you would like to see further changes in this doc.

<PTHANKS,>

Michael Green [MSFT]

</PTHANKS,>

It's helpful to me, Thanks for your analysis!
 

Answer 15

Jochen,

I am very sorry for the delay in getting back to you. I did take some time to look into hosting a non-service  workflow that is based off of an Activity in IIS. It turns out that you don't need to compile the activity. Please take a look at a sample here: http://cid-dbe3afde8f12ca0d.office.live.com/browse.aspx/NonServiceWorkflowWithActivity?Bsrc=EMSHOO&Bpub=SN.Notifications and let me know if you have any further questions.

Again I am very sorry it took so long to get back to you.

Michael Green [MSFT]

 

Answer 16

This is exactly what I was looking for. Thank you very much, Michael! This helps a lot.

Jochen.

 

Answer 17

Hi Michael,

I'm having a problem passing arguments to the workflow.

In CreationEndpoint.OnGetCreationContext() I added two <string, object> values to the creationContext.WorkflowArguments collection, containing name and value for the workflow's arguments (eg Argument1, Argument2).

Executing the workflow leads to the following exception:
The values provided for the root activity's arguments did not satisfy the root activity's requirements:
'DynamicActivity': The following keys from the input dictionary do not map to arguments and must be removed: Argument1, Argument2.  Please note that argument names are case sensitive.
Parameter name: rootArgumentValues

How do I get the input dictionary into my workflow definition contained in the DynamicActivity?

Thanks,
Jochen

 

Answer 18

Refer to this article to host a non service workflow - http://msdn.microsoft.com/en-us/library/ff729688.aspx

To AutoStart the WF- there are several ways, one of which is by using the Application Warmup Module to call the Creation Endpoint  http://www.iis.net/download/applicationwarmup

I haven't come across a way to do this just alone with AppFabric.

 

 

 

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter