There is no context attached to the incoming message for the service and the current operation is not marked with "CanCreateInstance = true"

CanCreateInstance = trueI got this error when testing my example WF 4.0 workflow that runs on WCF. To get over this error just open your workflow, select Receive activity and make check to checkbox called CanCreateInstance (click on image at right to see it at original size).

Cite from CanCreateInstance documentation:

”Service workflows that do not have a ReceiveActivity activity with CanCreateInstance set to true cannot be instantiated by a client using a service operation invocation. Such workflows can be created using the CreateWorkflow method of the associated WorkflowRuntime object.

The default value for this property is false.

You have to set this property to true for every workflow you want to use through WCF service.

No Comments