Workflow Manager Custom Steps

此主题仅适用于 ArcEditor 和 ArcInfo。

Workflow Manager provides several custom steps. The source code for each of these are provided as part of the developer kit. The following table outlines the process steps and what they can do.

Steps library

The Steps library contains steps that can be executed in both the desktop and server environments. The steps and their arguments and return codes are outlined below.

Step name

Prog ID

Description/Arguments

Return codes

Example argument entry

CleanUp

JTXSteps.CleanUp

Cleans up the job, based on the arguments. Arguments can be any of the following in any order:

Version Cleanup:

	/version|v (optional)

MXD Cleanup:

	/mxd|m (optional)

Attachment Cleanup:

	/attachments|a (optional)

0 = Success

/v /m

When executed, the job's version and map document will be deleted.

CloseJob

JTXSteps.CloseJob

Closes a job as a step, as opposed to it being a manual process once the workflow is completed.

0 = Success

CreateJob

JTXSteps.CreateJob

Creates a child job, based on the arguments.

Job Type ID:

	/jobtypeid:<job type id> (required)Assign to Group:

	/assigngroup:<group to assign to> (optional)Assign to User:

	/assignuser:<user to assign to> (optional)

0 = Success

/jobtypename:Street Updates /assigngroup:"SourceManagers"

When executed, a new job will be created of type 3 and be assigned to the Source Managers group.

CreateVersion

JTXSteps.CreateVersion

Creates the version for the job. The protection level of the version is specified by one of the following arguments: Version Access Scope:

/scope:<public|private|protected> (optional)

0 = Success

ExecuteSQL

JTXSteps.ExecuteSQL

Executes a SQL statement.

Database to Send SQL:

	/database:<jtxsystem|data> (required)SQL Command:

	/sql:<sql command>

0 = Success

ReassignJob

JTXSteps.ReassignJob

Reassigns the job.

Assign Type:

	/assignType:<user|group> (required)

Assign To:

	/assignTo:<user or group name> (required)

0 = Success

/assignType:user /assignTo:cjones

When executed, the job will be reassigned to the cjones user.

SendNotification

JTXSteps.SendNotification

Sends a notification of the type specified by the first arguments; notification Type:

/notifType:<type> (required)

0 = Success

/notifType:RequestReceived

When executed, an e-mail notification of type RequestReceived will be sent.

UpdateExtentFeatureClass

JTXSteps.UpdateExtentFeatureClass

Updates a feature class with job information to provide visual status.

Feature Class to Update (must be in data geodatabase):
	/fclass:<fully qualified feature class name> (required)
Job ID Field (field to put job ID in):
	/jobfield:<field name> (optional)
Date Field (field to put date/time):
	/datefield:<field name> (optional)

0 = Success

VersionExists

JTXSteps.VersionExists

Checks to see if the version exists for the job.

  • 1 = Version Exists
  • 2 = Version Doesn't Exist
  • 3 = No data workspace selected
Describes the programed step types that come with your installation of Workflow Manager.

DesktopSteps library

The DesktopSteps library contains steps that can be executed only from the desktop because of the pop-up user interfaces. The steps and their arguments and return codes are outlined below.

Step name

Prog ID

Description/Arguments

Return codes

Example argument entry

CopyFile

JTXDesktopSteps.CopyFile

Copies a file from one location to another.

Source File:

	/src:<source file path> (optional)

Destination File:

	/dest:<destination file path> (optional)

File Title:

	/title:<file title> (optional)

0 = Success

/src:"C:\data\Project Info\Plan.xls"

When executed, the user will be prompted to select the output folder, and the source file will be copied to the selected location.

CreatePDF

JTXDesktopSteps.CreatePDF

Creates a .pdf of the job's basemap and optionally attaches it to the job.

Initial Directory:

	/initdir:<initial directory> (optional)

Attach File To Job:

	/attach (optional)

Resolution (dpi):

	/resolution:<dpi> (optional)

0 = Success

/initdir:C:\temp /attach

When executed, the job's map document layout will be exported to .pdf and attached to the job. The .pdf will be temporarily stored in the designated initdir location. If the initdir is not designated, the user will be prompted for a location during the execution of the step.

DefineAOI

JTXDekstopSteps.DefineAOI

Shows a tool to allow the user to define an Area of Interest. Does not require any Arguments.

  • 1 = Success
  • 0 = Failure

LaunchArcMap

JTXDesktopSteps.LaunchArcMap

Please see the section below for details regarding the arguments for this step.

0 = Success

/cliptoaoi /guid:esriArcMapUI.AddDataCommand

When executed, ArcMap will launch. In addition to resourcing the layers to the job version and zooming to the area of interest, the data frame will be clipped to only show data within the bounds of the area of interest and click the add data button for the user to allow adding additional data to the map.

LaunchGPTool

JTXDekstopSteps.LaunchGPTool

Executes geoprocessing tools from within your workflows.

Toolbox Path (explicit path to the tbx file):

	/toolboxpath:<toolboxpath> (optional)

Toolbox Name (if in system toolboxes):

	/toolbox:<toolbox> (optional)

Display Name of the Tool in the toolbox:

	/tool:<tool> 

Parameter to override on the tool (can be specified multiple times):

	/param:<ParamName>:<ParamValue> (optional)

Flag to attach the log to the job once the tool has completed:

	/attach (optional)

License enumeration code for any additional license that should be used in the execution of the tool:

	/license:<enum value> (optional)

1 = Success

/toolboxpath:"C:\Program
Files\ArcGIS\ArcToolbox\Toolboxes\Network Analyst Tools.tbx"
/tool:BuildNetwork /license:8

When executed, launches the Build Network geoprocessing tool dialog box. Additionally, the Network Analyst license will be checked out, if available, for the execution of the tool and checked back in once it's done.

Describes the programmed step types that come with your installation of Workflow Manager.

The Launch ArcMap Step

The expected behavior of the Launch ArcMap step with no arguments is detailed in the following table.

Job type map document defined?

Launch ArcMap with data workspace and version

Launch ArcMap with data workspace and no version

Launch ArcMap with no data workspace

Yes

ArcMap is launched using the map document defined. Layers are resourced to the job's version based on the Feature Class's short name.* The map is zoomed to the Area of Interest.

This works the same as the scenario when a version exists, except the default version for the data workspace is used for the resourcing of layers.

No changes are made to the layer sources. The map is zoomed to AOI.

No

ArcMap opens with a blank document. In this case, since no map exists, there are no layers to resource. Once layers are added to the map, the Add Data button on the Job Tracking toolbar will take the user directly to the version defined for the job or the default version for the Data Workspace selected. Users can use the Zoom To AOI button on the Job Tracking toolbar to zoom to the job's AOI.

This works the same as the scenario when a version exists.

ArcMap opens with a blank document. The Add Data button on the Job Tracking toolbar is disabled. If an AOI exists for the job, the Zoom To AOI tool can be used.

This provides a description of the expected behavior for the Launch ArcMap step provided with Workflow Manager.

*The short name is the feature class name not fully qualified: Streets instead of NIS.Streets, for example. Also note that no matter how the basemap was originally defined, any short name matches should be resourced.

注意注意:
The JTXMxLaunch.exe executable for launching ArcMap is no longer included with the Workflow Manager installation. Please upgrade any steps that are using that utility to launch ArcMap to use the custom step object JTXDesktopSteps.LaunchArcMap.

Argument Descriptions

The Launch ArcMap step has many optional parameters available, allowing you to customize its execution for your needs without writing a code.

Default Launch ArcMap Configuration

Descriptive name

Argument example

Behavior

Zoom to AOI

/aoifactor:3

or

/nozoomaoi

With the default behavior, the map will be panned to the job's AOI and zoomed by a factor of 1 to the shapes geometry.

Optionally, you can choose to not pan or zoom the map using the /nozoomaoi option. Or you can zoom to the AOI with a greater zoom factor using the /aoifactor: argument.

Change MXD Versions

/nochangeversion

The default behavior, when the /nochangeversion argument is not used, is detailed in the section below.

If you choose to use the /nochangeversion option, then the layers in the job type's map document will be left as they were originally configured.

Save MXDs

/nosavemxd

The default behavior, when the /nosavemxd argument is not used, will save the job's map document in the Workflow Manager database. If your map documents are large, you may need to adjust the MAXBLOBSIZE SDE configuration setting.

If you choose to use the /nosavemxd option, then the job's map document will not be saved.

Clip Data Frame to AOI

/cliptoaoi

The default behavior, when the /cliptoaoi argument is not used, will show all the data in the map document that can be viewed.

When the /cliptoaoi option is used, the data frame in the job's map document will be clipped to the shape of the AOI.

注意注意:

This does not create a definition query on the layers. All features in the layers in the map are still accessible through their respective tables.

Wait for ArcMap to close (suspend WMX)

/nowait

The default Workflow Manager application behavior, when the /nowait argument is not used, is to hide while the ArcMap process is running. This means that the user cannot interact with the Workflow Manager application while working in ArcMap.

When the /nowait option is used, ArcMap will be launched in a separate process, allowing the user to interact with the Workflow Manager application while ArcMap is running.*

Use existing ArcMap Session

/useexisting

The default behavior, when the /useexisting argument is not configured, is to open a new ArcMap session during the execution of the step.

With the /useexisting option, if an ArcMap session is open when the step is executed, Workflow Manager will open the job's map document in that existing session. If there is not an ArcMap session open, then Workflow Manager will open a new one.

Store MXDs in shared location

/mxdfolder:"D:\Data\JTXMapDocuments"

With the default behavior, no alternative location is configured, and the job's map documents will be stored in the Workflow Manager database. If your map documents are large, you may need to adjust the MAXBLOBSIZE SDE configuration setting.

If you choose to store the map documents in an alternative location, Workflow Manager will not save the map documents in the database, but will save them to that location for future use.

Use Alternative MXD

/mxd:"D:\Data\JTXTemplates\Editing.mxd"

With the default behavior, the step will use the job type's default map document as the basemap document to use when Launch ArcMap.

If you choose to use this option, Workflow Manager will load the map document or template configured for the argument.

Run ArcMap Command

/guid:esriArcMapUI.AddDataCommand

Once ArcMap has finished loading, the button represented by the ProgID entered will be programmatically pushed.

Load Task Assistant workflow

/taworkflow:"LotSplit"

With this argument configured, once ArcMap is opened, Workflow Manager will open the Task Assistant Manager workflow configured. The workflow name passed in is the alias of the TAM workflow stored in the Workflow Manager system.

Multiple workflows can be passed in by adding additional /taworkflow: entries or by selecting the desired workflows in the argument editor.

Store Task Assistant History in Job History

/storetahistory

With this argument configured, the Task Assistant Manager workflow will be added to the job history by default. You can still choose to attach this as a text file using Workflow Manager tools.

*This option was added because the Launch process asynchronously option for workflow steps is not available for Custom Step Objects.


9/23/2010