Ask a questionAsk a question
 

QuestionHow to unblock workflow instance

  • Tuesday, January 29, 2008 10:26 PMrahulmanasa Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Due to timeour or something my workflow instance got blocked into instancestate table.

    How to get it unblocked, since if I try to get it using

     

    WorkflowInstance instance = GetWorkflowInstanceForIntanceId(new Guid(instanceGUID));

     

    and try to fire an event as follows

     

    _tWorkflowService = _workflowRuntime.GetService<TWorkflowService>();

    _tWorkflowService.OnSubmitToWorkFlow(instance.InstanceId, tRequestInfoDTO);

     

     

    it doesn't fire the event, just ignores it.

     

    Thanks for all your help

     

    Rahul Jain

    Louisville KY.

All Replies

  • Tuesday, February 05, 2008 11:21 PMQuick Sense Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Can you debug into the code?

     

    By the way, I do not find any relevant code/documentation from Microsoft that mentioned, "OnSubmitToWorkFlow" or "GetWorkflowInstanceForIntanceId". Can you explain how your code is related to this forum? It is possible that I am missing something, of course.

  • Tuesday, February 05, 2008 11:37 PM_IgorM_ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I think he means that he got a DataExchangeService with the OnSubmitToWorkFlow method that raises an event. If this is the case - a common problem that peple forget to add their service to ExternaDataExchange service (they just add their service directly to the Workflow). Here is a correct way to add your (for example) PaymentProcessingService as an event service:

     

    ExternalDataExchangeService dataExchangeService;

    dataExchangeService = new ExternalDataExchangeService();

    workflowRuntime.AddService(dataExchangeService);

    PaymentProcessingService paymentProcessing;

    paymentProcessing = new PaymentProcessingService();

    dataExchangeService.AddService(paymentProcessing);

     

  • Tuesday, February 05, 2008 11:50 PMrahulmanasa Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Hi,

     

    I am doing it same way... I just wanted to deal with exceptiona condition.

    Lets assume due to some reason (may be some I/O or DB timeout) workflow is blocked by an owner Id.

    Next time I create a new instance of runtime (or my environment is clustered), the owner Id would be different (in instancestate) table. If owner id is different it does not allow to perform any action on the WF's current state.

    If we try to fire some event it just ignores it. I can not allow such condition to go into production without knowing the solution.

     

    I want to know... how can I unblock the instance of a WF, that was blocked by some other runtime instance.

     

    Should I directly perform update operation on InstanceState table to reset BLOCK column, or is there any Standard way to do it.

     

    Thanks,

    Rahul Jain

    Louisville, KY

  • Monday, October 26, 2009 11:22 AMIbrahim Khatri Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Rahul,

    I got the same issue, is there any workaround do you have ?


    thanks
    Ibrahim Khatri