Skip to main content
(working with server and workbench 2011 32-bit)

 

 

Hi,

 

 

I'm trying to use a published parameter that is a combo of two other private published parameters in fme server.

 

 

e.g.

 

 

full_path=$(drive)$(path)

 

 

where

 

drive="D:/"

 

path="afolder"

 

 

i'd expect D:/afolder to be returned from $(full_path) as it is in workbench.

 

 

however i get the unresolved string '$(drive)$(path)' instead once i've published the workbench to server.

 

 

The full_path parameter is being used as an esri personal gdb dest_dataset parameter.

 

 

Can anyone explain why this may be?  Are joined parameters like this supported in FME Server 2011?  I thought they were.

 

 

 

Nick
Nick, did you use a stringconcatenator to create the full_path?
Hi Nick

 

Are you using a python scripted parameter?  Yes that should be possible in FME 2011 Server and Desktop.

 

 

You should be able to do something like this (untested pseudo code):

 

 

full_path = '' full_path = FME_MacroValueso'drive'] + FME_MacroValuesr'path'] return full_path

 

 

However there are few catches in FME Server. If either of the paramters drive or path are destination dataset parameters then the Data Download or Data Streaming service will override them with a web directory. 

 

 


Hi Nick

 

I see the problem now - I missed that you said private parametner.  It looks like we can't reference these either in a script or the way you were doing it (which works for published parameters).  I suspect this is because published parameters are evaluated first but I'll look into that for you.

 

 

A workaround which I think would work goes like this: get the two private parameters using the ParameterFetcher transformer, concatenate them into an attribute as Owen suggested and then use fanout Dataset on your esri personal gdb writer to fanout on the full_path attribute. 
Actually this does work - it's a questions of the order of the private paramters.

 

 

As long as you have your private parameters in this order it works:

 

 

Drive

 

Path

 

FullPath (Scripted Paremeter code shown in message sent May 9th)
Hi,

 

 

Thanks for all your answers.

 

 

In the end I've come up with a workaround.

 

 

I 've tried your suggestions to concat 2 publish and/or private params, but none are working in my case, although I suspect they will in others.

 

 

I missed out some detail in my first post.

 

 

I'm using fme2011 with ArcGIS 10.0 to create an ArcGIS personal geodatabase for version 9.3.1 - unfortunetely arcgis desktop 9.3.1 does not read feature classes created by the ArcGIS desktop 10 dll's, to overcome this i'm following the fmepedia knoweldge base article http://fmepedia.safe.com/articles/How_To/Data-Download-Service-Writing-to-a-template-ESRI-File-Based-Geodatabase

 

 

to first copy an empty 9.3.1 personal geodb, before writing to it.

 

 

This all works fine, except i'd like to dynamically alter the name of the personal geodb.

 

 

Originally i was doing this by using a published parameter, but I need to concatonate the paremters together to get the path for the filecopy and the geodb writer to be the same - and when I do that the geodb writer doesn't resolve the concatonation for some reason, it just use the literal string you pass to it - $(drive)$(path) in may case.

 

 

a (better?) alternative, maybe, would be to use arcgis and a scripted python parameter to create the 9.3.1 geodb using arctoolbox data managment tools.

 

 

however the easiest work around i found was to simply submit the file name under two seperate published params - one with just the new filename ( for the file_copy operation within the workbench) and one with a (pre)concatonated full path for the goedb writer.

 

 

As I'm registering this workbench with the datadownload service the directory string i use in the geodb path doesn't matter becuase the download service replaces it anyway - i just have to ensure that the filecopy and geodb paths match  i.e the filecopy dir can be D:\\ and the geodb path can be D:\\mynewname.mdb - D:\\ will be replaced (i think) in both cases with the datadownload temp path.

 

 

Many thanks.

 

 

Nick

 


Reply