workflowInstance.InstanceId

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?U2FsYW1FbGlhcw==?=

    workflowInstance.InstanceId

    Hi, I started playing with Hands-on labs provided on MSDN, reached lab03
    (Hosting the Windows Workflow - Part 2 - Using the default SQL Services) in
    which we have code that needs the InstanceId as follows :
    GetInstanceTrac kingEvents(work flowInstance.In stanceId)

    I understood, once we build and run we shoud get 5 messages logged in the
    console for the events (Created, started, suspended...... ....) which is not
    the case.

    I started to investigate and debug and noticed that InstanceId is "Empty"
    and the loop to display the events is not entered .

    So how come there is no instanceId which should be created as I understood
    from documentation.
    Thanks
  • Jialiang Ge [MSFT]

    #2
    RE: workflowInstanc e.InstanceId

    Hello Salam,

    As is requested, my test project has been sent to your mailbox.

    In the meantime, I have almost reproduced the problem according to your
    environment. The workflow console application only outputs "the workflow
    completed event" when I press Ctrl+F5 to run the app.

    ====output====
    Here in working_Execute Code.

    Instance Tracking Events :
    Workflow Completed - press ENTER to continue
    ====output====

    I also find that, if I press F5 to debug the app, the output is normal.

    Salam, is this what you see on your side?

    My detailed repro steps:

    1. Setup the TrackingStore database with CreateDatabaseO bjects.cmd on a
    REMOTE computer that has default SQL Server 2005 instance.
    2. Build a workflow console application in Vista by following the steps in
    the lab document, and update the connectionstrin g accordingly (I have tried
    both VS2005+WWF extension and VS2008).
    3. Press Ctrl+F5 to run the application, and I get the above output.
    (note: If you press F5 to debug the app, the problem cannot be reproduced)

    Please also note that this problem can always be reproduced in Vista, and
    sometimes (randomly) can be reproduced In Win2003 and Windows XP.

    I'm doing more researches to find out the reason for the loss of the
    events. Salam, please let me know if my output of the reproduction is not
    like yours.

    Regards,
    Jialiang Ge (jialge@online. microsoft.com, remove 'online.')
    Microsoft Online Community Support

    =============== =============== =============== ====
    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    msdnmg@microsof t.com.

    This posting is provided "AS IS" with no warranties, and confers no rights.
    =============== =============== =============== ====

    Comment

    Working...