How to pass special characters to geoprocessing tool to create subsequent tasks in workflow?

537
1
10-06-2017 07:14 AM
DeeptiPuri2
New Contributor

I have a geoprocessing service to create various tasks. So the paarmeters for JTXSteps.ExecuteGPTool are here /addjobcomment /url:"https://xyz/arcgis/rest/services/F2F_Workflow/Task/GPServer/CreateTask/submitJob?job_type_name=draft..."

I have a requirement now to pass this string !@#$%^&*()_+/;:"',.?][}{| as job name essentially to capture all possible special characters in other systems for project names. I have noticed '#' breaks the sequence of parameters and with '&' rest of the string for the Job_name gets ignored. The call to submit GP jobs are expected through workflows and parameters are being read from SQL server tables for subsequent tasks.

In JTX_HISTORY I see the message like these :

Create Plan Checking Task From Drafting (1021423),Working,4,0,. Failed execution: Invalid column value [DESCRIPTION]

Tags (2)
0 Kudos
1 Reply
XiaomengZheng
Esri Contributor

Hello Deepti,

Sorry for the delay. Did you mean to use JTXSteps.ExecuteURL instead of JTXSteps.ExecuteGPTool to run the GP service? If so I don't think all the special characters are accepted in the arguments as part of URL without encoded. 

Would it be possible if you can run this step by executing a GP tool instead of GP service? That way passing special characters would not raise the issue. Also I think there should be a possibility to write a custom token parser for the url if you are using WMX Desktop version (10.x) not Pro. 

Let me know how you think of my suggestions. I would like to provide more details if you prefers using GP service and would like to write a token parser.

Thanks,

Meggie

0 Kudos