VB.net implementaion does not return Instnceid
I ran Asp.net implementaion of Hello World in VB.
ProtectedSub Button1_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles Button1.Click
Dim workflowRuntimeAs WorkflowRuntime = WorkflowWebRequestContext.Current.WorkflowRuntime
Dim schedulerAs ManualWorkflowSchedulerService = workflowRuntime.GetService(Of ManualWorkflowSchedulerService)()
Dim workflowTypeAs System.Type
AddHandler workflowRuntime.WorkflowCompleted,AddressOf WorkflowRuntime_WorkflowCompleted
' Load the workflow type
workflowType =GetType(WorkflowLibrary1.differentWorkflow)
' // dynamically load the workflow assembly
Dim WorkflowInstanceAs WorkflowInstance = workflowRuntime.CreateWorkflow(workflowType)
WorkflowInstance.Start()
' // Now run the workflow.This is necessary when using the ManualWorkflowSchedulerService
scheduler.RunWorkflow(WorkflowInstance.InstanceId)
Dim myguidAs System.Guid = WorkflowInstance.InstanceId' // Has null in it
EndSub
Where as the Asp.net implementaion of CS produces the result:
privatevoid StartSimpleWorkflow()
{
// Get a reference to the Workflow Runtime through the WorkflowWebHostingModule
// Http Module.
//
// NOTE:This requires the configuration section to be named "WorkflowRuntime".
WorkflowRuntime workflowRuntime =WorkflowWebRequestContext.Current.WorkflowRuntime;
// Now get a refernece to the ManualWorkflowSchedulerService
ManualWorkflowSchedulerService scheduler =
workflowRuntime.GetService<ManualWorkflowSchedulerService>();
// Attach to the WorkflowCompleted event
workflowRuntime.WorkflowCompleted +=
newEventHandler<WorkflowCompletedEventArgs>(WorkflowRuntime_WorkflowCompleted);
// Start the Workflow1
WorkflowInstance workflowInstance=workflowRuntime.CreateWorkflow(typeof(WorkflowLibrary1.differentWorkflow));
workflowInstance.Start();
// Now run the workflow.This is necessary when
// ...using the ManualWorkflowSchedulerService
scheduler.RunWorkflow(workflowInstance.InstanceId);
System.Guid myguid = workflowInstance.InstanceId;// This has the GUID that I need
}

