Вопрос

**Update: I've found that if you fire a WF after it's rebooted it will then complete current (In Progress) WFs. Is this intended functionality? I thought it would have automatically resumed checks once the machine is up and running and I've haven't seen it mentioned in Microsoft documentation - thanks! **

I have WFs (WF4) firing, persisting and completing but with the exception of when I reboot the Virtual Machine I am running them off; this is to simulate a server failure. Once I reboot, all current running WFs stay in the 'In-Progress' status and the 'Resume' option is greyed out in AppFabric IIS. I have found a very similar article on here to my problem but after going through their solutions I am no further forward: "WF4 Workflow under AppFabric not resuming properly after IISreset"

Further Information:

I have 2 applications; one is a web UI to fire the workflow and one is for the service which I then monitor with AppFabric in IIS. I have been through the 'Manage WCF and WF Services Configuration' and have set the default connectionstring for Persistence - ensuring it persists. Also made sure the Persist when Idle & Unload checkboxes are ticked (for every 60 seconds); this has been done at Server level and Application level in the tree node of IIS.

When I don't reboot, the WF will persist, resume and complete as intended, it is only when I reboot the VM. The workflow itself isn't anything special. It simply receives the data (an integer for the delay (in minutes) from the UI), writes a text file to confirm the WF is running, then has the delay via a general Delay Activity (TimeSpan.FromMinutes(integer);) and finishes with writing another text file to confirm it's completed. I've been into the WF Instance but can only Terminate, Suspend or Delete the instance.

Anyone have ideas or thoughts?

Thanks

Это было полезно?

Решение

After a lot of researching I have found out why it hadn't been working. The initial thread I was referring to was good for info but essentially too old and out of date. Please refer to this article from the MSDN Website:

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

Essentially, I had all my sites and services, in IIS, set up as a "Web Site". When you goto the WCF & WF Configuration set up, inside it does not contain an option saying "Auto-Start". What you have to actually do is setup the Service as an "Application" under a Web Site in IIS. Once you set it up, return to the WCF and WF Configuration and you will then see an "Auto-Start" option available in the list on the left hand side. The default value is "Disabled", simply "Enable" this and click Apply - it will need to refresh the service then you are good to go.

In addition, endpoint url's in your web.config will need to be updated e.g. localhost:8099/Service1.xamlx becomes localhost:8099/ServiceApplication/Service1.xamlx

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top