Windows Vista Forums

WF Control Serialization issue ....

  1. #1


    MobileMan Guest

    WF Control Serialization issue ....

    Sorry if this is the wrong place to post a .NET v3.0 Windows Workflow
    question, but didn't find any other groups that seem to target this, so here
    it goes .......

    I have a WF that is encapsulated in Assembly "B". I also have my WF host
    (which create thw WorkflowRuntime object) inside a Forms app in Assembly "A".
    I'm attempting to pass a TextBox control from my form into the WF instance
    (I do this using the standard Dictionary<String, Object> parms object
    parameter of the workflowRuntime.CreateWorkflow() method

    ....... this.instance = workflowRuntime.CreateWorkflow(typeof(B.Workflow1));
    ......

    Additionally, runtime uses the "SqlWorkflowPersistenceService" as a plug in
    database persistance service. My problem comes when I unload my instance and
    persist it to the DB. The TextBox I passed in isn't a serializable object,
    and thus I get an exception that says we can't store this instance in the DB
    because of this little fact. I get around this by decorating the TextBox
    field with the [NonSerializable] attribute so that the persistence service
    won't try to "save" the TextBox control in the database. But, the problem is
    when I load the instance from the DB back into the runtime my TextBox control
    is now NULL.

    My question is how can I take my workflow instance and access the TextBox
    reference from my forms app? Or, somehow "serialize" the TextBox control so
    that it can be stored within the DB.

    Open to suggestions. Thanks.
    --
    Stay Mobile

      My System SpecsSystem Spec

  2. #2


    MobileMan Guest

    RE: WF Control Serialization issue ....

    Oooppss - code example error:

    ....... this.instance = workflowRuntime.CreateWorkflow(typeof(B.Workflow1),
    params);
    ......

    Okay, forgot the params dictionary parameter that get's passed in witth the
    Type of workflow we want to get an instance of.

    Thanks.
    --
    Stay Mobile


    "MobileMan" wrote:

    > Sorry if this is the wrong place to post a .NET v3.0 Windows Workflow
    > question, but didn't find any other groups that seem to target this, so here
    > it goes .......
    >
    > I have a WF that is encapsulated in Assembly "B". I also have my WF host
    > (which create thw WorkflowRuntime object) inside a Forms app in Assembly "A".
    > I'm attempting to pass a TextBox control from my form into the WF instance
    > (I do this using the standard Dictionary<String, Object> parms object
    > parameter of the workflowRuntime.CreateWorkflow() method
    >
    > ...... this.instance = workflowRuntime.CreateWorkflow(typeof(B.Workflow1));
    > .....
    >
    > Additionally, runtime uses the "SqlWorkflowPersistenceService" as a plug in
    > database persistance service. My problem comes when I unload my instance and
    > persist it to the DB. The TextBox I passed in isn't a serializable object,
    > and thus I get an exception that says we can't store this instance in the DB
    > because of this little fact. I get around this by decorating the TextBox
    > field with the [NonSerializable] attribute so that the persistence service
    > won't try to "save" the TextBox control in the database. But, the problem is
    > when I load the instance from the DB back into the runtime my TextBox control
    > is now NULL.
    >
    > My question is how can I take my workflow instance and access the TextBox
    > reference from my forms app? Or, somehow "serialize" the TextBox control so
    > that it can be stored within the DB.
    >
    > Open to suggestions. Thanks.
    > --
    > Stay Mobile


      My System SpecsSystem Spec

WF Control Serialization issue ....

Similar Threads
Thread Forum
Account Control Issue
I have a program (Linksys VOiP) that needs to load upon initial startup, but it is "blocked" by the account control until I physically allow it as...
Vista account administration
control panel issue
Uploaded Windows Vista SP1 today and installed it. Now control panel, and windows update don't work anymore. They don't appear anymore. Please...
Vista General
How can i fix the empty control panel issue?
Lately when i try to open the control panel in vista, the control panel is either empty, or flashes briefly and disappears. i can temporarily fix...
Vista General
control panel issue
Hi I have home premium 32bit, 8800gts(latest stable driver 100.65, i think). I've formatted the hdd and it installed perfectly, however, if i...
Vista General
Control Panel Empty Issue
Hi everyone, I wonder if anyone else is having this issue and can suggest a permanent cure? Every now and again the vista control panel will...
Vista General
CultureInfo Serialization Issue with GregorianCalendar in WCF
Hi, We have a data contract of the following form: public class MyDataContract { IDictionary<CultureInfo, string> names; }
Indigo
Control panel issue!!!
Hello, Am I the only one who has noticed once you change to "classic view" in the control panel there is no way to change back. I read the help...
Vista performance & maintenance