Can workflow settings be used with workflows hosted in a WorkflowServiceHost?

Typically, the method for passing workflow parameters to a workflow occurs in a call to RunWorkflow. However, with WorkflowServiceHost, there is no such method call. You just call the Open () method on the instance. Any ideas?

Of course, this implies that I add more parameters to the service contract, but these parameters are not relevant to the consumers of the service. They are more like config values.

0


source to share


2 answers


So far, I've decided that this is possible under some circumstances. If the workflow is started by the host, parameters can be passed. However, if ReceiveActivity creates a workflow (CanCreateInstance is True), then it seems like you can't.



0


source


I believe the WorkflowServiceHost is a re-hosting of the WorkflowRuntime that was wrapped for you and not really a parameter related activity. Typically, you define your data contract that you intend to use with the recipient, and the data members of that contract represent the parameters that you intend to use in your workflow.



0


source







All Articles