Delete GPTool's Data type parameter not defaulting properly in WMX

2615
2
02-11-2011 11:56 AM
by Anonymous User
Not applicable
Original User: AshleyDIA

Hello,
I created a custom step object in WMX that deletes a temporary folder at the end of a job (the folder is created at the beginning of the job). The step utilizes the "Delete" GPTool (Data Management Tools > General > Delete).

When I try to run the step in the WMX client app, I get an error (ERROR 000800: The Value is not a member of Folder). I think the error has to do with Data Type parameter in my step. When I set the step up I did not include a parameter for data type (my understanding is that it cannot be changed anyway). The step defaults to the folder I want to delete, but the data type says "File" when the step launches. The step will not run. However, if I drag the folder (from Windows Explorer or ArcCatalog) I want to delete into the Input Data Element parameter, the data type parameter will change to "Folder." Additionally, the tool will show a red "X" by the data type parameter like there is something wrong, but the tool will run successfully.

Why is WMX reading my "Folder" as a "File?"

I checked the parameters in my step type in WMX Admin and it looks good. I have attached all images that are relevant to my issue:
DeleteFolderParam.JPG is how the tool looks upon launch in WMX client app
DeleteFolderError.JPG is the error I get when I try to run my step
DeleteFolderStep.JPG is how my step looks in WMX admin (Launch GPTool)
DeleteFolderExpl.JPG is what happens if I drag the folder I want to delete into the Input Data Element parameter over my default parameter
0 Kudos
2 Replies
BrianDemers
Esri Contributor
Hi,

GP tools that automatically/"smartly" change their parameters can be tricky to work with.  I've run into similar problems in the past and have used wrapper scripts to work around them.

In this case, I tried creating a GP model containing the "Delete" tool, then hardcoded the "Data Type" argument to be "Folder".  Calling this wrapper model from a Workflow Manager step seems to work.  Functionally, I don't think this is any different from what you did when you set the "data_type" argument to "Folder" in WMX, but it at least prevents any parameter errors from being displayed to the user.  Maybe give this a try...?

Brian D.
0 Kudos
by Anonymous User
Not applicable
Original User: AshleyDIA

Thanks Brian. That is a great work around. I was so wrapped up in that problem, I couldn't see this alternative solution.
0 Kudos