views:

258

answers:

0

Hello All-

I am pretty new with WF. I have this workflow. Its pretty simple, i believe. My WF consists of a replicator activity, sequential activity, CallExternalMethod Activity, and HandleExternalMethod Activity. I've also implemented correlation on my interface class.

I've also added these services to my WF persistence, tracking, and ManualWorkflowSchedulerService, and my custom service class

My application have two buttons. One button to start workflow and another control, a dropdownlist. After my workflow has started, I go and select a value from the dropdownlist. After a value is selected, my code goes and call my service class. The service class contain methods and eventhanders for this WF. So, at this point i tried to call my event handler and set my argument values. Below is a code snippet. This is where my issue arise.

public void SubmitApproverTask(string chainType, string response)
    {

              ApprovalTaskEventArgs args;
            args = new ApprovalTaskEventArgs(chainType,_instanceGuid,response);
            if (TaskCompleted != null)
            {
                TaskCompleted(null, args);
            }
        }

The issue i am having deals with my queue collection. The collection seems to contain 0 queue items. Thus, when my code tried to excute the eventhandler, an error occur. See below. Any suggestions would surely be appreciated.

Method: SubmitRequestResponse ; Class:CoTs.Intranet.Onlineform.ApprovalTaskService System.Workflow.Activities.EventDeliveryFailedException: Event "TaskCompleted" on interface type "CoTs.Intranet.Onlineform.IApprovalTaskService" for instance id "9d51dbeb-ab43-4e5b-ab63-382b3e3312ae" cannot be delivered. ---> System.Workflow.Runtime.QueueException: Event Queue operation failed with MessageQueueErrorCode QueueNotFound for queue 'Message Properties Interface Type:CoTs.Intranet.Onlineform.IApprovalTaskService Method Name:TaskCompleted CorrelationValues: EXEC '. at System.Workflow.Runtime.WorkflowQueuingService.GetQueue(IComparable queueID) at System.Workflow.Runtime.WorkflowQueuingService.EnqueueEvent(IComparable queueName, Object item) at System.Workflow.Runtime.WorkflowExecutor.EnqueueItem(IComparable queueName, Object item, IPendingWork pendingWork, Object workItem) at System.Workflow.Runtime.WorkflowInstance.EnqueueItem(IComparable queueName, Object item, IPendingWork pendingWork, Object workItem) at System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender, ExternalDataEventArgs eventArgs) --- End of inner exception stack trace --- at System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender, ExternalDataEventArgs eventArgs) at CoTs.Intranet.Onlineform.ApprovalTaskService.SubmitApproverTask(String response, String chainTypeName) in C:\CoTsIntranetDev\CoTs.Intranet.Onlineform\ApprovalTaskService.cs:line 76 System.Workflow.Runtime.QueueException: Event Queue operation failed with MessageQueueErrorCode QueueNotFound for queue 'Message Properties