This section focuses on how to add multiple activity to the WF4.0 process and how to customize the activity
This example downloads:
Http://files.cnblogs.com/foundation/SequenceSample.rar
Http://files.cnblogs.com/foundation/CodeActivitySample.rar
Sequential container sequence and codeactivity
Sequential container sequence
| Class name |
System.Activities.Statements.Sequence |
| File |
System.Activities.dll |
| Structure description |
Inherit nativeactivity
is a sealed class
Defines [collection<activity> activities properties] and [collection<variable> Variables Properties]
Override [CacheMetadata method] and [Execute method] |
| Function description |
1.[activities] collection, which can store activity
2.[activities] The activity in the collection is performed sequentially from top to bottom
3.[variables] collection is used to store the change to the most |
In WF, any class derived from an activity can be instantiated to run, for example:
WriteLine Myworkfloe = new WriteLine () {Text = new inargument<string> ("Wxxinter")};
Workflowinvoker.invoke (Myworkfloe);