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 Vista account administration
control panel issue Vista General
control panel issue Vista General
CultureInfo Serialization Issue with GregorianCalendar in WCF Indigo
Control panel issue!!! Vista performance & maintenance