Problem:
How to pass parameters into workflow when started.
How to pass result out when workflow finished.
Solution: Use Arguments
1. InArgument

Sample:
Project Structure:

Activity:

Host:

Result:

2.OutArgument

Sample:
Project Structure

ActivityWithOutArgument:

Host

Result:

Note:
If we use WorkflowApplication to run workflow in another thread other than use WorkflowInvoder method. the code of host will be a little different.
In InArgument sample:
Host _1:

Result of Host_1:

Host_2

Result of Host_2

In OutArgument sample
Host

Result

65d43394-6b76-46b3-a83c-3674e6600a28|0|.0
WF4