Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > WinFX General

Vista - WF Control Serialization issue ....

 
 
Old 07-02-2007   #1 (permalink)
MobileMan


 
 

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
Old 07-02-2007   #2 (permalink)
MobileMan


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
Account Control Issue Vista account administration
control panel issue Vista General
control panel issue Vista General
Control panel issue!!! Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46