Pausing a running workflow explicitly
-
Thursday, April 12, 2012 3:21 AM
Hi all,
is it possible to pause a running workflow explicitly not using delay in workflow.
i am running this workflow on a wcf service..
All Replies
-
Monday, April 16, 2012 8:10 AMModerator
Hi,
You can change the workflow status by using WorkflowControlClient.
Workflow Control Client
Thanks.
Leo Tang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
Monday, April 16, 2012 9:51 AM
Thanks Leo....
my problem is that i am using WorkflowApplication to run a workflow. i want to pause the workflow through a button . i am using wcf service on which i am having workflow application object.
in order to pause the workflow i can use workflowapplication.unload method .. but problem that i am facing is that how i can initalize the workflow with runtime id.. as if i write
workflowapplication wapp=new workflowapplication ()..
it automically assigns an id to it...i cant use callback or
InstanceContextMode.Single to have workflow application object state..
-
Wednesday, April 18, 2012 10:00 AMModerator
Hi,
Yes, the WorkflowApplication always assign a generated Id to it. As far as I know, there is no way to specify the runtime Id manually in WF4. We must retrieve the workflow instance's id and send it back to client for controlling workflow states.
Get WorkflowInstanceId
http://msdn.microsoft.com/en-us/library/ee943758.aspx
Pausing and Resuming a Workflow
http://msdn.microsoft.com/en-us/library/ff729667.aspx
Thanks.
Leo Tang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Marked As Answer by LeoTangModerator Monday, April 23, 2012 12:44 AM

