Custom persistence TryLoadRunnableWorkflowCommand RRS feed

  • Question

  • I'm using custom persistence with WorkflowServiceHost.

    I created custom persistence using the http://msdn.microsoft.com/en-us/library/ee829481(v=vs.110).aspx 

    There is code to poll an instance store for workflows that can be run or activated.

    public void PollForEvents()
        InstanceOwner[] storeOwners = this.GetInstanceOwners();
    I added above code in Service Start.

    But, when I restart the Workflow service host it took huge time in this method.

    So, I commented the call to PollForEvents().

    Could you please tell me what are the effects of not calling the PollForEvents.

    Also, if I move the call to different thread will it make any difference. (I need to improve the startup time of service)


    Monday, December 22, 2014 2:19 PM


  • HI Jaydeep,

    Welcome to workflow forum.

    As the explanation in the article above, the instance store queries the events available and examines each one to determine if it is a HasRunnableWorkflowEvent event. If one is found, SignalEvent is called to signal the host to send a command to the instance store.

    Without the code snippet, the SQL Workflow Instance Store cannot raise to notify workflow hosts about the existence of runnable instances in the persistence database.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Angie Xu Monday, December 29, 2014 1:41 AM
    Tuesday, December 23, 2014 7:03 AM