.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

newbee: How to start a workflow from a wcf service (not host a workflow in a WCF service)

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :JavaScript/VBScript

Hi. I'm a newbee on this workflow technology and I have the following problem:

I have a State Machine workflow that is hosted in a form application. A user starts the workflow through this application. The workflow executes some activities inside the 'Begin' state. At certain point, after the activities were executed, the workflow stops and the state is changed to NeedToApproval state.

A user using an application on a wireless device (for example a tablet) is pooling a WCF webservice asking for persons that needs loan approval. When the WS send a Person object (that cointains the workflow instanceId inside it), all data of this person is shown on and then the user can click on "Approve' button.

What I want is:When the button is clicked, I want to resume the workflow from the NeedToApprovalstate to the end, executing activities that are inside of this state.

I'm stuck onhow to integrate this two things. I'm quite sure this is not the case of host the workflow in a WCF service, because it is hosted in an form application.

How to do that? Create a regular WCF application and call the workflow from it? But how?

Could someone give some help or advice or points me some sampleS?


Thanks in advance and sorry about my bad English.


View Complete Post

More Related Resource Links

Suspend / Resume Instances within Workflow Service Host (in Windows Service)

We are hosting WF 4 worklfow instances within a Windows Service that uses the Workflow Service host container.   On the Windows Service OnStart we start the workflow service host (w/ multiple WCF endpoints such as start workflow instance, cancel workflow instance, poll workflow instance status, etc.) and these endpoints create or work on one or more long running workflow instances.     My question is, if a user attempts to stop the Windows Service while workflow instance(s) are running, what is the best way to manage this scenario.   Our inclination is to persist these workflows (using sql persistence) and then on the next start of the Windows Service, resume these workflow instances and allow them to continue to completion.    In OnStart, we have a handle to the Workflow Service host.    How can we iterate through all the active workflow instances in OnStop and then in OnStart, resume these after the workflow service host is opened and running?   Are there are any methods of managing this scenario?    Thanks

Web Service Workflows: Deploy Distributed Business Processes With Windows Workflow And Web Services


Due to the distributed nature of a business process it makes sense for a workflow to be deployed as a distributed application. See how Windows Workflow and Web Services hold the key.

Israel Hilerio

MSDN Magazine October 2006

WCF Workflow Service Application - Required Extensions

Hello, I built a WCF Workflow Service App and I built a custom activity that requires an extension in the workflow. In a web app, I'm trying to create a service reference to the WCF workflow service but it says that an extension that is required has not been provided; so how do I consume a service with a required extension? At what point do I supply that extension in an ASP.NET scenario? Thanks. http://linkedin.com/in/brianmains

Workflow Service failing on high load

Hi, I am load testing my workflow service to ensure that it can sustain high loads for a high volume transaction application. I am using Visual Studio's Load Test to run on a simple unit test to call the workflow service. I have configured the bindings on my service as follows:  <bindings>      <netTcpBinding>        <binding portSharingEnabled="true" closeTimeout="00:10:00"                 openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"                 maxBufferPoolSize="20480000" maxBufferSize="20480000" maxConnections="10"                  maxReceivedMessageSize="20480000"  >                    <security mode="None" />        </binding>      </netTcpBinding>  &n

Unable to call an asmx web service using windows authentication from a Service workflow

Hello, I need to use an existing asmx service from inside my service workflow and I am unable to call it. This asmx service is hosted in a web application with iis set to windows authentication, anonymous is not allowed. I need to send the authentication, only way seems too be using transport for basicHttpBindings. Every time I try to call the service I get an error saying that there is nothing listening to the url of the service generated automatically by VS when I added the Service Reference ? my web config <configuration> <configSections> </configSections> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <protocolMapping> <add scheme="http" binding="wsHttpBinding" bindingConfiguration="WindowsCreds" /> </protocolMapping> <bindings> <basicHttpBinding> <binding name="UtilitiesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"

WCF Workflow Service Hosting

Is there any way I can host a WCF Workflow Service Application in a Windows service instead of IIS?

Workflow Service not calling workflow in another project

I have a windows workflow service 4.0 that calls a workflow located in another project (i.e. another assembly). I have created a project reference in my workflow service project to the workflow in the other assembly. I have set a breakpoint in the workflow service receive activity and this breakpoint is hit. Next I step into the next activity which is an activity located in another project and the debugger does not work. Also the other workflow is sending an email.  It appears that the other workflow is not being called because I never receive an email from the workflow in the other project.   Any help is greatly appreciated.

RESTful WCF Workflow Service

Folks,   I'm in the middle of building a service (.xamlx) that is basically going to support a document submission workflow. Via the web service, I want clients to be able to POST a big ol' XML file into my system. This is going to kick off a big, long-running, persistable, AppFabric-managed workflow. Clients will be able to poll this (or another) service to get the status of the document processing.   My issue right now is that it appears as though, out of the box, what I get is straight-up WSDL-style services that use standard web service tactics. I was wondering if there was something I could do, either via web.config or via the workflow designer, that would allow me to have my WCF-hosted workflow AND have the endpoint be a RESTful (or even REST-ish... i'm not picky) one. In other words, I want to be able to POST an arbitrary blob of XML to my workflow service (complete with authentication tokens in custom HTTP headers). Is this possible? If so, how?The .NET Addict - http://dotnetaddict.dotnetdevelopersjournal.com

Validate available operations on workflow service

I'd like to check if i can invoke an operation on workflow service so i could disable action buttons on my UI. Is it possible? If I invoke operation which isn't right at that moment I get exception: "Operation cannot be performed at this time. Please ensure that the operations are performed in the correct order and that the binding in use provides ordered delivery guarantees." And i would like to avoid theses kind of messages by validating before invoking. udione

Workflow Service 4.0 with One Way Receive activity will not get fired when called by a console based

Workflow Service 4.0 with One Way Receive activity will not get fired when called by a console based client application. This service does get called when there's the default ReceiveRequest coupled with a SendReply activity in the service. However deleting the ReceiveRequest and SendReply Activities and replacing it with a one way Receive Activity causes the Workflow 4.0 Service to not get called. Thanks, Leo Cono - http://www.YouLoveMe.com, Free Dating Site  

Workflow - Same Contract used in two service - Conversion problem

Hello, I'm trying at the moment to use WF to create a basic Workflow, and face a conversion problem. Here's the setup : Service 1 : Create objects based on a defined Data Contract Service 2 : Apply an operation on objects of type defined in service 1. Service 1 is imported as Service reference. I created a simple Workflow which imports both services. It first call Service one to get an object, and then send it to Service 2 to apply the operation. But when I try to do this I receive an error of type : 'WF.Service1.Entity' cannot be converted to 'WF.Service2.Entity'. The Contract used is only defined in the Service 1 and reused in Service 2, so it's the same object. The only difference is in the proxy client generated which creates both definitions, each one in it's specific namespace (Service1 and Service2). Do you see any solution to this situation ? Except creating an activity that copy every property from one object to another :-) P.S. : I uploaded the basic setup here : http://www.mediafire.com/?e6j9c2dv4rvcdoh

How to generate service reference for Workflow service from command line?

Is there a way to generate service reference for Workflow service from command line using just dll file (without metadata, without wsdl). I tried using svcutil but i didn't succeed. just error without any meaningful message. udione

Windows Workflow Persistence Service using Oracle Database



We are using windows state machine workflow. We need to use Oracle for persisteing and tracking workflow instances. Can anyone provide custom services for Oracle?

We have even tried WFTools but not able to connect to Oracle database. Please provide the same code if anyone has tried.





Unable to connect to local host service when a splash screen is show before start the services

Hi all:

I want to show a splash screen before start the local host services, the host can be open without error, however the client (Form1) is not able to connect to the service. Without the splash screen, every thing work fine. Any idea why ?

Here is the code.

Imports System.ServiceModel

<ServiceContract()> _
Public Interface IHelloWorldService
   <OperationContract()> _
   Function SayHello(ByVal name As String) As String
End Interface

Public Class HelloWorldService
   Implements IHelloWorldService

   Public Function SayHello(ByVal name As String) As String Implements IHelloWorldService.SayHello
      Return String.Format("Hello, {0}", name)
   End Function
End Class

Module Module1
   Private host As ServiceHost
   Private frmSplash As Form

   Sub Main()
      AddHandler AppDomain.CurrentDomain.AssemblyLoad, Addres

WorkflowInspectionServices and the workflow service(xamlx)

It is a  sample here http://msdn.microsoft.com/en-us/library/ee358719(VS.100).aspx.

but I want to know how to inspect the workflow of the .xamlx(workflow service) using the WorkflowInspectionServices .

How to get all activity  of the .xamlx?

Using AlterToDo web service method to REJECT workflow


So by now we have seen this famous post


That has been referenced a bijillion times in these forms.  Well that great, but unfortunately the sample "Completing a Task" xml is really only good for ...approving a task.  What I want to do is Reject that task.  It concerns me a little bit that there is NO documentation on what is accepted by these XML nodes and what each of them mean...like for example...

What does this mean?  Why are we using a # in here?  Is # a status??


or how about...


What is DCR?  Why is it 0...what are the other values???  I mean seriously...up until now I have been guessing!  Is there no documentation??

Sorry for the sarcasm but I have spent two weeks now trying to decipher this stuff and I'm very frustrated with the lack of documentation and knowledge on Microsofts part.  Can someone please provide what I can use to REJECT a workflow?


Thank you for your time.


Calling WF 4 Workflow Service Asynchronously from ASP.NET



I have a developed a workflow service in VS 2010 and added it to my web site as a service reference with the option of 'Generate asynchronous operations' checked.I am now calling the workflow from my asp.net page and everything works fine except that the page will not finish loading until the workflow completes its operations.I have also added the page directive async=true to the top of the page.My workflow service  is just two activities and a 10 seconds delay in the middle, so the second operations will get called after 10 seconds.I have also configured the persistence store from the web.config file.


Here is my code:


ServiceClient svc = new JobWorkflow.ServiceClient();

Thanks in advance.




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend