locked
Server was unable to process request RRS feed

  • Question

  •  

    My Scenario:

    I am currently working on the expense Module.

    Step 1: Submit the expense

    Step 2: Manager will Approve/Reject based upon his decision.

     

    I have implemented the WorkFlow using Sequential WorkFlow.

    Then I published teh workFlow as WebService and trying to use in ASP.NET application.

     

    I have three pages:

    In Login Page I am instantiating the workflow

    ExpenseClaim.ExpClaimWorkFlow_WebService ws = new ExpenseClaim.ExpClaimWorkFlow_WebService();

    ws.CookieContainer = new System.Net.CookieContainer();

    //Storing the instance in the USession

    this.Session[Constants.wsKey] = ws;

     

    In Submit Page I am submitting the Report by calling SubmitExpenseReport(claimNumber);

    // Creating the current workflow instance

    ExpenseClaim.ExpClaimWorkFlow_WebService ws = this.Session[Constants.wsKey] as ExpenseClaim.ExpClaimWorkFlow_WebService;

    ws.SubmitExpenseReport(claimNumber);

     

    In Approve/Reject Page I am calling the Approve ExpenseReport Method to approve which will be done by manager.

    // Creating the current workflow instance

    ExpenseClaim.ExpClaimWorkFlow_WebService ws = this.Session[Constants.wsKey] as ExpenseClaim.ExpClaimWorkFlow_WebService;

    ws.ApproveExpenseReport(e.CommandArgument.ToString());

     

    While I call submitExpenseReport I am able to access Workflow.

    But when I call ApproveExpenseReport I am getting an error message saying

     

    Server was unable to process request. ---> Current session has no workflow instance associated with it. Send activation message to start new instance in current session.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Current session has no workflow instance associated with it. Send activation message to start new instance in current session.

    Source Error:

    Line 94:         [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ApproveExpenseReport", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    Line 95:         public void ApproveExpenseReport(string claimNumber) {
    Line 96:             this.Invoke("ApproveExpenseReport", new object[] {
    Line 97:                         claimNumber});
    Line 98:         }

    Thursday, May 10, 2007 1:21 PM

Answers

  • Did you enable cookies?  WorkflowWebService uses cookies to store workflow instance id.

     

    Shelly

    Friday, June 22, 2007 5:40 PM