Using scratch workspace with steps in WMX

1020
4
11-21-2011 08:21 AM
AshleyMott
New Contributor III
Just like Model Builder, I want to use my scratch workspace for interim data created by WMX.

When I run a model in Model Builder, my outputs automatically default to my scratch workspace...but this doesn't happen if a run a step in WMX.

Additionally, I would like every user of WMX to have this functionality.

Is there a way to set output workspace for steps in WMX to the user's scratch workspace?
0 Kudos
4 Replies
TopeBello
Occasional Contributor III
Hi Ashley,

There is no way to set up the scratch workspace within WMX. It typically honors the environment variables of your GP tools (Model/python).
Have you tried setting the scratch workspace for your model when designing it? Setting it at the model or script level will ensure that when this tool is run regardless of where it is run, the scratch workspace is what you define it as.

Does this help?


Thanks,
Tope
0 Kudos
AshleyMott
New Contributor III
The point I was trying to make is that my script tools and models are already set up for the scratch workspace and work the way I want when accessed from ArcCatalog, but when I access these tools via WMX, the output workspace does not default to the scratch workspace.

Can you test this functionallity on your end? I have attached a doc with screenshots of my environment. I think that I have to input text in the Output_Workspace (in WMX step parameters) to make the step default to the scratch workspace?

***I cannot upload a doc, so I will email to Tope.
0 Kudos
BrianDemers
Esri Contributor
Hi Ashley,

Thanks very much for attaching the screenshots; that was a big help.  In this case, since you're trying to set the value of a GP tool parameter, you can pass in the value that you want as a step argument.  And since the value needs to be user-specific, I would recommend using a token or some combination of tokens to do so.

The "[SYS:CUR_JTX_USER]" token might be one option.  It may also be possible to use an environment variable to help you out.  (One way to see what's available is to open a command prompt in Windows and run the "set" command with no arguments.)  On my machine, it looks like I may be able to build a path similar to the one that you need using the USERPROFILE environment variable.  I can access this in a Workflow Manager token as, "[ENV:USERPROFILE]".

I agree that this isn't ideal, but maybe it's enough to get you past this issue...?

Brian D.
0 Kudos
AshleyMott
New Contributor III
Thanks for the input Brian. Unfortunately, I cannot get all of the pieces to work so that all users will default to their scratch workspaces from a script tool. A model that calls the user's scratch workspace does work in WMX though.
0 Kudos