UserData modify in PageFlow

May 16, 2008 at 3:21 PM
Hi,

    I´m using PageFlow. My controller class set new object in UserData of my current IPageFlow (StorePageFlow) and then call the next function.
In my codeactivity i´m try to get the atividade object in UserData but i´m get null excepction.

My object AtividadeTOB is serializable and i´m try to marke WorkHandler attribute of SetDataEventArgs : ExternalDataEventArgs to true in PageFlow.WorkflowFoundation project but didn´t work.

Any Help? Thank´s


        public void Next(AtividadeTOB atividade)
        {
            StorePageFlow.UserData["atividade"] = atividade;
            StorePageFlow.Next();
        }

   

        private void codeActivity1_ExecuteCode(object sender, EventArgs e)
        {
            StreamWriter wr = new StreamWriter(@"c:\temp\wf.txt");
            wr.WriteLine("cod instancia = " + ((AtividadeTOB)this.UserData["atividade"]).CoFluxo.ToString());
        }




May 16, 2008 at 3:35 PM
Sorry, the property is UserDataStore.


        private void codeActivity1_ExecuteCode(object sender, EventArgs e)
        {
            StreamWriter wr = new StreamWriter(@"c:\temp\wf.txt");
            wr.WriteLine("cod instancia = " + ((AtividadeTOB)this.UserDataStore["atividade"]).CoFluxo.ToString());



gonzagafilho wrote:
Hi,

    I´m using PageFlow. My controller class set new object in UserData of my current IPageFlow (StorePageFlow) and then call the next function.
In my codeactivity i´m try to get the atividade object in UserData but i´m get null excepction.

My object AtividadeTOB is serializable and i´m try to marke WorkHandler attribute of SetDataEventArgs : ExternalDataEventArgs to true in PageFlow.WorkflowFoundation project but didn´t work.

Any Help? Thank´s


        public void Next(AtividadeTOB atividade)
        {
            StorePageFlow.UserData["atividade"] = atividade;
            StorePageFlow.Next();
        }

   

        private void codeActivity1_ExecuteCode(object sender, EventArgs e)
        {
            StreamWriter wr = new StreamWriter(@"c:\temp\wf.txt");
            wr.WriteLine("cod instancia = " + ((AtividadeTOB)this.UserData["atividade"]).CoFluxo.ToString());
        }