Mit der Standard- oder Advanced-Lizenz verfügbar.Mit der Workflow Manager-Lizenz verfügbar.
ArcGIS Workflow Manager for Desktop provides several custom steps. The source code for each of these is 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.
- Check AOIReturn codes:
JTXSteps.CheckAOI
Checks to see if an area of interest (AOI) exists for the current job.
- 1 = If job has an AOI
- 2 = If job does not have an AOI
- CleanUpReturn codes:
JTXSteps.CleanUp
Cleans up the job based on the arguments. Enable the Administration system settings to allow users to delete versions owned by other users. This will prompt for a user name and password.
Version Cleanup: /version|v (optional) MXD Cleanup: /mxd|m (optional) Attachment Cleanup: /attachments|a (optional)
- 0 = Success
- CloseJobReturn codes:
JTXSteps.CloseJob
Closes a job as a step, as opposed to it being a manual process once the workflow is completed.
No Argument
- 0 = Success
- CreateJobReturn codes:
JTXSteps.CreateJob
Creates a child job based on the arguments.
Job Type ID: Job Type Name: /jobtypename:<job type name> (required) Assign to Group: /assigngroup:<group to assign to> (optional) Assign to User: /assignuser:<user to assign to> (optional) Job Type ID: /jobtypeid:<job type ID> (deprecated)
- 0 = Success
- CreatePDFReturn codes:
JTXSteps.CreatePDF
Creates a PDF document of the job's basemap and attaches it to the job.
Initial Directory: /initdir:<initial directory> (optional) Do not Attach File To Job: /noattach (optional) Resolution (dpi): /resolution:<dpi> (optional) Attach File To Job: /attach (deprecated)
- 0 = Success
- CreateVersionReturn codes:
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)[default:private]
- 0 = Success
- ExecuteGPToolReturn codes:
JTXSteps.ExecuteGPTool
Executes a geoprocessing tool, model, or script without displaying the geoprocessing dialog box. The integer output from a tool can be used as a return code to guide the path of the workflow upon the tool's completion.
Toolbox Path (explicit full path to the tbx file combined with toolbox name): /toolboxpath:<toolboxpath> (required) Display Name of the Tool in the toolbox: /tool:<tool> (required) 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) Output parameter to use as return value: /outParam:<parameter name>
- 0 = Success
- 1 = Failure
- ExecuteSQLReturn codes:
JTXSteps.ExecuteSQL
Executes an SQL statement.
Database to Send SQL: /database:<jtxsystem|data> (required)SQL Command: /sql:<sql command>
- 0 = Success
- ExecuteURLReturn codes:
JTXSteps.ExecuteURL
Executes a URL without displaying a browser to show the response. For example, you can execute a geoprocessing service or any other web service as a workflow step.
URL to execute: /url:<url> (required) Request Timeout: /timeout:<timeout in seconds> (optional) Proxy Server: /proxy:<proxy> (optional) Flag to add a comment to the job with the response: /addjobcomment(optional) Post Data: /postdata:<data to post> (optional)
- 200 = Success
- ExecuteWorkflowReturn codes:
JTXSteps.ExecuteWorkflow
Executes another workflow associated with a job type.
Job Type Name: /jobtype:<job type name> (required)Flag to not use AOI: /donotuseaoi (optional)Flag to not use version: /donotuseversion (optional)Flag to not copy activities to the parent job's history: /donotcopyactivities (optional)
- 0 = Success
- ReturnValue
JTXSteps.ReturnValue
Retrieves the value of the extended property or token passed that is the return code for the next path in the workflow.
Return value: /value:<Extended properties field> (required):
- ReassignJobReturn codes:
JTXSteps.ReassignJob
Reassigns the job.
Assign Type: /assignType:<user|group> (required) Assign To: /assignTo:<user or group name> (required)
- 0 = Success
- SendNotificationReturn codes:
JTXSteps.SendNotification
Sends a notification of the type specified by the argument.
/notifType:<type> (required)
- 0 = Success
- SetVersionReturn codes:
JTXSteps.SetVersion
Sets the job's version to a named version. For example, set the job's version to QC version to validate edits that were posted in that version. If there is no step argument, the job version will be reset to the original version.
Version to use as job version: /version:<versionName> (optional)
- 0 = Success
- UpdateExtentFeatureClassReturn codes:
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
- VersionExistsReturn codes:
JTXSteps.VersionExists
Checks to see if the job already has a geodatabase version.
No Argument
- 1 = Version exists
- 2 = Version doesn't exist
- 3 = No data workspace selected
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.
- CopyFileReturn codes:
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
- CreateJobAdvancedReturn codes:
JTXDesktopSteps.CreateJobAdvanced
Creates a job and allows you to define the parent/child relationship with dependencies on the job.
Job Type Name: /jobtypename:<job type name>(required) Assign To Group: /assigngroup:<group to assign to>(optional) Assign To User: /assignuser:<username to assign to> (optional) Dependency will be created and current job held at this step: /dependThisStep (optional) Dependency will be created and current job held at the next step in the workflow: /dependNextStep (optional) Dependency status (current job held until new job reaches this status): /dependStatus:<Status Type Name> (optional) Use the current job's AOI as the new job's AOI: /useparentaoi (optional) Create new jobs based on the overlap between the current job's AOI and this feature class: /aoiOverlapFeatureClassName:<fully qualified feature class name >(optional) Default number of jobs to create: /numberJobs:<number of jobs to create> (optional) A version will be created for the new job(s) based on this selection: /createVersionSetting:<the version to use as the parent version> (optional) A version will be assigned to the new job(s) based on this selection: /assignVersionSetting:<the existing version the job will be assigned to>(optional) New job(s) extended properties value will be set to one of the current job's extended properties values specified by JTX Token) or to the given string value. To set multiple extended properties values at once separate each entry by a semicolon: /setExtendedProps: <ChildJobFullyQualifiedExtendedPropertiesTableName.FieldName= [JOBEX:ParentJobFullyQualifiedExtendedPropertiesTableName.FieldName]>; <ChildJobFullyQualifiedExtendedPropertiesTableName.FieldName= [JOBEX:ParentJobFullyQualifiedExtendedPropertiesTableName.FieldName]>;...(optional) Due date of the new job: /dueDate:<due date of the new job>(optional) Job duration: /jobDuration:<duration of the new job>(optional) New Job will be created as a child of the existing job: /child:(optional)
- 0 = Success
- 1 = Failure
- DefineAOIReturn codes:
JTXDesktopSteps.DefineAOI
Shows a tool to allow the user to define an area of interest.
No Argument
- 1 = Success
- 0 = Failure
- EditExtendedProperties
JTXDesktopSteps.EditExtendedProperties
Displays the job's extended properties as a pop-up form to allow the user to enter the required properties. This step can be included multiple times in the workflow with different extended properties to be opened at different stages of the workflow. This gives you the ability to choose only some extended properties configured on the job type to be displayed in the pop-up. The extended properties can be selected by opening the argument editor or by typing in the arguments box. All properties selected are editable and override the read-only properties set on the job type. If no arguments are specified, all the extended properties selected on the job type will be displayed when the steps are run.The argument editor displays all the tables and fields configured for all the job types in the repository; however, if properties not configured on the job type are selected, they will not be displayed in the pop-up.The argument is composed of the extended property table name and field name. For example, if you want to display the RequestorName field from the RequestorInformation table, the argument would be /Property: RequestorInformation.RequestorName.
/Property:<Property Name>
- 1 = Success
- LaunchArcMapReturn codes:
JTXDesktopSteps.LaunchArcMap
When executed, ArcMap will start. The layers will be resourced to the job version and the map will be zoomed to the job's AOI. See the section below for details regarding the arguments for this step.
- 0 = Success
- LaunchGPToolReturn codes:
JTXDesktopSteps.LaunchGPTool
Executes geoprocessing tools from within your workflows. The integer output from a tool can be used as a return code to guide the path of the workflow upon the tool's completion.
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) Output parameter to use as return value: /outParam:<parameter name>
- 1 = Success
- 0 = Cancel
- SelectDataWorkspaceReturn codes:
JTXDesktopSteps.SelectDataWorkspace
Shows a form that allows you to pick the data workspace for your job from a list of already configured data workspaces.
No Argument
- 1 = Success
- 0 = Failure
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 opened 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 resourcing the layers. | No changes are made to the layer sources. The map is zoomed to the 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 Workflow Manager toolbar will take the user directly to the version defined for the job or the default version for the data workspace selected. | This works the same as the scenario when a version exists. | ArcMap opens with a blank document. The Add Data button on the Workflow Manager toolbar is unavailable. If an AOI exists for the job, the Zoom To AOI tool can be used. |
Basemap layers are not repointed in the map opened by Workflow Manager.
Argument descriptions
The Launch ArcMap step has many optional parameters available, allowing you to customize its execution for your needs without writing code.
Descriptive name | Argument example | Behavior |
---|---|---|
Zoom to AOI. |
or
| With the default behavior, the map is panned to the job's AOI and zoomed by a factor of 1 to the shape's 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. |
Do not change any connection information. |
| The default behavior, when /norepoint is not used, changes all the layers in the map to the current data workspace and, optionally, the job's version. |
Change only the version for job's data workspace. |
|
If you choose to use the /changeversiononly option, the version of the layers in the job type's map document will be changed. The data user and connection information will be left as they were originally configured. |
Save MXDs. |
| The default behavior, when the /nosavemxd argument is not used, saves the job's map document in the Workflow Manager database. Thus, every time you open the job's map document using this step in the workflow, the last saved map from the database is retrieved. However, if you choose to use the /nosavemxd option, the job's map document will not be saved in the Workflow Manager database. Thus, if you change the extent of the job map and close it, the new extent will not be saved and the next time the map will still open with the original extent. If your map documents are large, you may need to adjust the MAXBLOBSIZE SDE configuration setting. This option also allows you to switch jobs in ArcMap without clearing out the map document. |
Clip Data Frame to AOI. |
| The default behavior, when the /cliptoaoi argument is not used, shows 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 is clipped to the shape of the AOI. |
Wait for ArcMap to close (suspend Workflow Manager). |
| 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 is launched in a separate process, allowing the user to interact with the Workflow Manager application while ArcMap is running. |
Use existing ArcMap session. |
| 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 opens 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. |
| With the default behavior, no alternative location is configured, and the job's map documents are 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. |
| With the default behavior, the step uses the job type's default map document as the basemap document for 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. |
| Once ArcMap has finished loading, the button represented by the ProgID entered is programmatically pushed. |
Load Task Assistant workflow. |
| With this argument configured, once ArcMap is opened, Workflow Manager opens the task assistant workflow configured. The workflow name passed in is the alias of the task assistant 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. |
| With this argument configured, the task assistant workflow is added to the job history by default. You can still choose to attach this as a text file using Workflow Manager tools. |