概要
Uploads and shares a workflow service and a map service of job locations for an ArcGIS Workflow Manager (Classic) repository.
使用法
- This tool saves draft service definitions to the Output Service Draft Location parameter value for each service. 
- The Input Database Path (.jtc) parameter uses the workflow connection in your ArcGIS Pro project if a workflow connection file (.jtc) is not defined. 
- ArcGIS Server and the ArcGIS Workflow Manager (Classic) Server extension are required. 
構文
arcpy.wmx.PublishWorkflowService(service_name, aoi_service_name, server, out_service_draft_location, {input_database_path}, {server_folder}, {description})| パラメーター | 説明 | データ タイプ | 
| service_name | The name of the workflow service that will be uploaded and shared. | String | 
| aoi_service_name | The name of the map service that will be uploaded and shared. | String | 
| server | The ArcGIS Server connection file (.ags) that contains the information needed to connect to ArcGIS Server. | ServerConnection | 
| out_service_draft_location | The folder where service definitions will be saved. | Folder | 
| input_database_path (オプション) | The workflow connection file (.jtc) that contains the information needed to connect to the Workflow Manager (Classic) repository. The workflow connection in your ArcGIS Pro project will be used if a workflow connection file is not defined. | File | 
| server_folder (オプション) | The folder to which the services will be published on ArcGIS Server. If a folder is not specified, the services will be published to the root folder of ArcGIS Server. | String | 
| description (オプション) | A description of the services that will be published. | String | 
派生した出力
| 名前 | 説明 | データ タイプ | 
| output_workflow_service_draft_path | The path to the workflow service definition draft. | File | 
| output_map_service_draft_path | The path to the map service definition draft. | File | 
コードのサンプル
The following stand-alone script demonstrates how to use the PublishWorkflowService tool to upload and share a workflow service and map service of job locations for an ArcGIS Workflow Manager (Classic) repository.
# Name: PublishWorkflowService_sample.py
# Description: The following script Uploads and shares a workflow service and a map 
#  service of job locations for an ArcGIS Workflow Manager (Classic) repository using a 
#  connection to an ArcGIS Server with the Workflow Manager (Classic) Server extension.
# Import system modules
import arcpy
# Check out extensions
arcpy.CheckOutExtension('jtx')
# Set local variables
service_name = 'Example Workflow Service'
aoi_service_name = 'Example Map Service'
server = 'myServerConnection.ags'
out_service_draft_location = r'C:\Project\DraftOutput'
input_database_path = r'C:\Project\wmxrepository.jtc'
server_folder = 'My Folder'
description = 'My Description'
# Call the PublishWorkflowService tool to upload and share a workflow service and a 
#  map service of job locations for the specified Workflow Manager (Classic) repository.
arcpy.wmx.PublishWorkflowService(service_name, aoi_service_name, server,\
                                 out_service_draft_location, input_database_path,\
                                 server_folder, description)
# Get all messages, warnings, and errors and print the results
messages = arcpy.GetMessages(0)
warnings = arcpy.GetMessages(1)
errors = arcpy.GetMessages(2)
arcpy.AddMessage('Tool Messages: {}\nTool Warnings: {}\nTool Errors{}\n'\
                 .format(messages, warnings, errors))
# Check in extensions
arcpy.CheckInExtension('jtx')環境
ライセンス情報
- Basic: いいえ
- Standard: 次のものが必要 Workflow Manager
- Advanced: 次のものが必要 Workflow Manager