Sign In  Sign Up Live-Chat

Adding new attributes to the activity context is not allowed

Last post 05-26-2008, 10:08 AM by iret. 11 replies.
Sort Posts: Previous Next
  •  05-19-2008, 4:15 AM 127641

    Adding new attributes to the activity context is not allowed

    The

    engine.Worklist.CompleteTask() method gives following error:

    Adding new attributes to the activity context is not allowed.

    This is the stack trace:

    Stack Trace:

    [AsposeWorkflowException: Adding new attributes to the activity context is not allowed]
       x978605b30a5da17b.x65a672401d267be0.x8ba7ca4b15693d87(xe181a1cadf7490e1 x3201d6d15a947682, IDictionary xed7e1b20b1a14b86, String x70039780cf7b5f11)
       x978605b30a5da17b.x65a672401d267be0.SetResult(xe181a1cadf7490e1 t, IDictionary results)
       xc26610dacef50ada.x2095013df7cec01f.CompleteTaskEx2(String taskId, IDictionary variables, Boolean executeTool, IRuntimeCallback callback, DateTime simulateDateTime)
       xc26610dacef50ada.x2095013df7cec01f.CompleteTaskEx2(String taskId, IDictionary variables, Boolean executeTool, IRuntimeCallback callback)
       xc26610dacef50ada.x2095013df7cec01f.CompleteTaskEx2(String taskId, String[] activityIds, IDictionary variables, String[] performers, Boolean executeTool)
       xc26610dacef50ada.x2095013df7cec01f.CompleteTaskEx2(String taskId, String[] activityIds, IDictionary variables, String[] performers)
       xc26610dacef50ada.x2095013df7cec01f.CompleteTask2(String taskId, IDictionary variables)
       xc26610dacef50ada.x2095013df7cec01f.CompleteTask(String taskId, IDictionary variables)
       Aspose.TaskDispatcher.btnOk_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\aspose\taskdispatcher.aspx.cs:141
       System.Web.UI.WebControls.Button.OnClick(EventArgs e)
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       System.Web.UI.Page.ProcessRequestMain()
    

    Where am I going wrong?

     

     
  •  05-19-2008, 6:17 AM 127661 in reply to 127641

    Re: Adding new attributes to the activity context is not allowed

    Hi,

    Thanks for considering Aspose.

    Could you please post some sample code for which this problem is occurring.


    Best Regards,

    Saqib Razzaq
    Support Developer
    Aspose Guangzhou Team

     
  •  05-19-2008, 7:05 AM 127669 in reply to 127661

    Re: Adding new attributes to the activity context is not allowed

    When the manager accepts an employee's leave, he selects 'Accept' radio button and clicks 'OK' button. Click event code is as follows:

    private void btnOk_Click(object sender, System.EventArgs e)

    {

    System.Collections.Hashtable result=new Hashtable();

    result["Reviewer"]=Session["UserName"];

    result["IsRejected"]=reviewState.SelectedValue.Equals("Reject");

    result["state"]="Reviewed";

    IEngine engine=Session["Engine"] as IEngine;

    engine.Worklist.CompleteTask(txtTaskId.Text,result);

    Server.Transfer("TaskList.aspx");

    }

     
  •  05-19-2008, 11:29 AM 127713 in reply to 127669

    Re: Adding new attributes to the activity context is not allowed

    Hello,

    1. Could you send me your xpdl file?

    2. Could you help to show me the content of the

     SELECT
      process,variabledefinitionid, variablevalue
     FROM [dbo].[processdata]

    Thanks a lot


    Team Lead
    Aspose Guangzhou Team
    About Us

    Contact Us
     
  •  05-20-2008, 12:23 AM 127782 in reply to 127713

    Re: Adding new attributes to the activity context is not allowed

    Attachment: Present (inaccessible)

    Hi,the xpdl is attached herewith as .txt file plz rename it to .xpdl and here is the data from the processdata table as you requested.

     

    301_EmailModel_EmailModel|| AppId|| 0x0001000000FFFFFFFF010000000000000006010000002466376137356534362D393339612D343030652D623462312D3135363962653834333065330B
    301_EmailModel_EmailModel|| Manager|| 0x0001000000FFFFFFFF01000000000000000601000000000B
    301_EmailModel_EmailModel|| FinishState2|| 0x0001000000FFFFFFFF010000000000000006010000000F52656A65637465642046696E6973680B
    301_EmailModel_EmailModel|| State|| 0x0001000000FFFFFFFF01000000000000000601000000000B
    301_EmailModel_EmailModel|| IsRejected|| 0x0001000000FFFFFFFF010000000000000004010000000E53797374656D2E426F6F6C65616E01000000076D5F76616C75650001000B

     
  •  05-20-2008, 12:55 AM 127784 in reply to 127782

    Re: Adding new attributes to the activity context is not allowed

    Hello,

    It looks like the reviewer is not in the context. but your program is assigned a value to the reviewer.

    I am still working on it to locate the root of this issue. I will keep you posted when I get more details.

    Thanks a lot.


    Team Lead
    Aspose Guangzhou Team
    About Us

    Contact Us
     
  •  05-21-2008, 1:19 AM 127959 in reply to 127784

    Re: Adding new attributes to the activity context is not allowed

    Hi,

    Is there anything missing with the xpdl??

     
  •  05-22-2008, 9:46 AM 128250 in reply to 127959

    Re: Adding new attributes to the activity context is not allowed

    Yes, if you open the xpdl with the workflow designer ship with the Aspose.workflow. You can see that there is no reviewer field as the data field.

    The designer is located on the designer folder of the setup folder of Aspose.Workflow. Please check it out.

    Thanks a lot


    Team Lead
    Aspose Guangzhou Team
    About Us

    Contact Us
     
  •  05-23-2008, 12:19 AM 128358 in reply to 128250

    Re: Adding new attributes to the activity context is not allowed

    In my xpdl, the manager is the reviewer. So do I need to have a separate 'reviewer' data field? Can you plz modify the xpdl and post it here so that I can understand what exactly is going wrong?

    Thanks.

     

     
  •  05-23-2008, 1:36 AM 128365 in reply to 128358

    Re: Adding new attributes to the activity context is not allowed

    If this is the case, you can change your code

    result["Manager"]=Session["UserName"];

    Thanks,


    Team Lead
    Aspose Guangzhou Team
    About Us

    Contact Us
     
  •  05-23-2008, 6:50 AM 128421 in reply to 128365

    Re: Adding new attributes to the activity context is not allowed

    Sorry to say but still the same error is being displayed.
     
  •  05-26-2008, 10:08 AM 128650 in reply to 128421

    Re: Adding new attributes to the activity context is not allowed

    Hello,

    Could you please send me your program? We will help to debug and fix it ASAP.

    My mailbox is guangzhou##aspose.com (replace the## with @).

    Thanks for your help.


    Team Lead
    Aspose Guangzhou Team
    About Us

    Contact Us
     
View as RSS news feed in XML