Résumé
Uploads and shares a workflow service and a map service of job locations for an ArcGIS Workflow Manager (Classic) repository.
Utilisation
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.
Syntaxe
arcpy.wmx.PublishWorkflowService(service_name, aoi_service_name, server, out_service_draft_location, {input_database_path}, {server_folder}, {description})
Paramètre | Explication | Type de données |
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 (Facultatif) | 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 (Facultatif) | 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 (Facultatif) | A description of the services that will be published. | String |
Sortie dérivée
Nom | Explication | Type de données |
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 |
Exemple de code
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')
Environnements
Informations de licence
- Basic: Non
- Standard: Requiert Workflow Manager
- Advanced: Requiert Workflow Manager
Rubriques connexes
Vous avez un commentaire à formuler concernant cette rubrique ?