wcf - Restarting a persisted workflow using a self-hosted WorkflowServiceHost -
i'm trying work out how resume persisted workflow i'm self-hosting workflowservicehost. host wires persistence , idling behaviour so:
// persistence var connstr = @""; var behavior = new sqlworkflowinstancestorebehavior(connstr); behavior.instancecompletionaction = instancecompletionaction.deletenothing; behavior.instancelockedexceptionaction = instancelockedexceptionaction.aggressiveretry; behavior.instanceencodingoption = instanceencodingoption.none; host.description.behaviors.add(behavior); // idle behaviour var idlebehavior = new workflowidlebehavior(); idlebehavior.timetopersist = timespan.fromminutes(2); idlebehavior.timetounload = timespan.fromminutes(2); host.description.behaviors.add(behavior);
i storing workflow instance guid against productid in database inside custom activity contained in workflow, able trace specific workflow instance product id. want able somehow pass product id servicehost , have resume correct persisted workflow me.
can point me in right direction on how this?
many in advance ian
you're going want read content correlation. you'll correlate productid receive activities. bookmark created when reach receive, , workflow persisted. call receive , pass productid in , because of correlation, wf runtime knows instance resume.
Comments
Post a Comment