Using InvokeWorkFlow Activity

Hello -

We have a program hosted by the Console that consists of two workflows. The first waits in a while loop for text files to appear in a folder; when one does, this workflow uses InvokeWorkFlow to kick off the second workflow which will write the file name into another file.

The problem is that when the second workflow is finished, the first workflow gets terminated.

Why is that I've understood from the documentation that this should not happen.

Thanks,

Mike



Answer this question

Using InvokeWorkFlow Activity

  • Harjeet S

    Thanks all for the replies. I will look into this an d get back to you on the details...


  • TomEire

    Michael -

    Does the first workflow get 'terminated' or 'completed'. If it gets terminated, can you find out the reason for termination by subscribing to the workflowterminated event and share it

    Thanks,

    Vignesh



  • DanL_DeLorme

    OK, once again thanks for the responses. The handler for WorkFlowCompleted has code that raises the AutoResetEvent. We commented that out and it works gooooood!

    Mike


  • Amnu cherian

    Hi Mike,

    If the workflow is getting terminated then there must have been an unhandled exception which cause this. Have you checked the termination reason In your console host, you can subscribe to the WorkflowTerminated event on WorkflowRuntime and in the event args passed to you, you will find the termination reason (exception message).

    This should provide more insight into the issue. From a workflow standpoint, your scenario should work just fine.

    Thanks!

    Angel



  • Using InvokeWorkFlow Activity