A workflow automates a set of activities. You can change any existing workflow or create one from scratch. For example, change the predefined Overlay workflow to perform a Union, rather than an Intersect. Create a new workflow to connect to a set of data stores and add Display Manager layers for them.
Activities in the workflow appear as a diagram in the Workflow Designer.
In a workflow, parallel activities are independent of one another. For example, when connecting to two data stores, parallel connections ensure that the second connection will execute even if the first one fails.
A sequenced activity depends on previous activities. For example, within the parallel activity at the top of the overlay workflow are two sets of sequenced activities. Each one connects to a particular data store and then creates a layer for that data store. If the connection fails, the layer cannot be created.
Each workflow activity has a set of parameters. Optionally, you can set default parameters and specify that the workflow display a prompt at run-time. The person running the workflow can then substitute other values. For example, you can set default data stores for an overlay, but allow others to substitute different data stores when they run the workflow.
Some parameters are required. For example, a Connect To An FDO Data Store activity requires the name of the provider and the location of the data store to connect to. Some parameters are optional, for example, the Display Name for the activity. All optional parameters have default values you can change.
Often, a sequenced activity is bound to the activity immediately preceding it. When you bind an activity, you set its parameter to be a property of a previous activity. For example, you can specify that the Connection ID for a new layer be the ID property for the preceding data store connection. You bind the layer to the ID of the connection.
Bind the parameter for an activity to a property from a previous activity.
Use the two sample activity sets (SampleActivities and Automation) as models. The files for these sample activities are installed by default in \Program Files\AutoCAD Map 3D 2010\PlugIns\Workflow\Activities. That folder also contains Autodesk.Map.Workflow.Activities.dll, which defines the installed Workflow Designer activities for AutoCAD Map 3D.
SampleActivities contains several examples, including a Zoom To Layer activity whose parameter is a layer name. It zooms to the extents of that layer. Automation contains activities for running AutoCAD Map 3D in an automated fashion, without using the actual application.
Build your activities in a .NET class library (a .dll file). Place this .dll file in the \Program Files\AutoCAD Map 3D 2010\PlugIns\Workflow\Activities folder and restart AutoCAD Map 3D. The activities then appear in the Workflow Designer.