workflowInstance.InstanceId

  • Thread starter Thread starter SalamElias
  • Start date Start date
S

SalamElias

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 :
GetInstanceTrackingEvents(workflowInstance.InstanceId)

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
 
Thanks, I will try to follow your instructions, just let you know that I use
Windows Vista SP1, VS 2008 and not 2005, remote sql2005 and not sqlexpress.

How can I download the attachment? can you please send it to my personal mail?

Salam

"Jialiang Ge [MSFT]" said:
Hello Salam,

I have tested the Windows Workflow Part 2 - Using the default SQL Services
in my system with

Visual Studio 2005,
Visual Studio 2005 extensions for .NET Framework 3.0 (Windows Workflow
Foundation),
SQL Server 2005

The test result is normal on my side:

Here in working_ExecuteCode.

Instance Tracking Events :
EventDescription : Created DateTime : 7/4/2008 9:07:56 AM
EventDescription : Started DateTime : 7/4/2008 9:07:56 AM
EventDescription : Suspended DateTime : 7/4/2008 9:07:56 AM
EventDescription : Resumed DateTime : 7/4/2008 9:07:56 AM
EventDescription : Completed DateTime : 7/4/2008 9:07:56 AM
Workflow Completed - press ENTER to continue

In order to find out why the sample does not work for you, I compose the
following four suggestions. Salam, would you please try them on your side?

Suggestion 1. Delete the TrackingStore database, and recreate it with
CreateDatabaseObjects.cmd
I suggest this point in case that the TrackingStore database itself is
destroyed by the previous tests. Because you said you are playing with
workflow, I hope the reconstruction of the database does not have any
business impact on your side.

Suggestion 2. Workflow instanceID is stored in TrackingStore database /
WorkflowInstance table. When a new workflow is created, would you please
check whether there’s a new entry in this table?

Suggestion 3. Are there any WorkflowValidationFailedException thrown from
WorkflowRuntime.CreateWorkflow?

Suggestion 4. I attach my test project to this message. The test project is
built by strictly following that document. Would you mind testing it on
your side? The attachment can be downloaded with Outlook Express or Windows
Mail (Vista).

Regards,
Jialiang Ge ([email protected], 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:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights
 
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_ExecuteCode.

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 CreateDatabaseObjects.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 connectionstring 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 ([email protected], 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:
(e-mail address removed).

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