Question

Using Workbench to dynamically update workspace properties

  • 18 December 2015
  • 3 replies
  • 0 views

Badge +5

I'm working on a large project which involves 100's of FME workspaces. Each time we have a project release we would like to be able to "tag" our workspaces with a build number (not the FME build number, a project build number). We would also like to be able to check if the current version of a workspace deployed in FME Server is at the current build.

FME itself is not designed for any of this but I am playing around with the idea of a hack that could be useful: write an FME Workspace to iterate through a directory full of existing FME workspaces and update the "Legal" (or any other) workspace property to add the current project build number.

Does anyone know if it's possible to use FME to edit workspaces in this manner?

I do realize that kind of job is what source code version control systems are for and we are already using GIT to manage our source code repository. This idea really relates more to FME Server and being able to discover which version of a workspace is uploaded. We have 5 FME Server instances and would like a quick and easy way to see the versions on each instance.

Nic


3 replies

Userlevel 2
Badge +12

Knowing text editing FMW files is a bad habit, it is possible to read a FMW file with the FME text reader, as long as it is not password protected.

Then you could use the StringSearcher to find your "Legal" tag and the value of this tag.

You could even replace the value with a new value using StringReplacer.

The hazard in doing so is in replacing more entries than wanted.

So this is not recommended behavior, but possible. Be careful!

Userlevel 4
Badge +13

Really interesting scenario here. I'll circulate to the team to see how we might support this better in future.

Short term--Erik's suggestion below is good. Suggest you have a longer string you think will not otherwise be in there and replace that. i.e. "Project Build Number 3.1" and then you'd look to replace that whole thing each time (and not 3.1).

Badge +5

Knowing text editing FMW files is a bad habit, it is possible to read a FMW file with the FME text reader, as long as it is not password protected.

Then you could use the StringSearcher to find your "Legal" tag and the value of this tag.

You could even replace the value with a new value using StringReplacer.

The hazard in doing so is in replacing more entries than wanted.

So this is not recommended behavior, but possible. Be careful!

Thanks Erik (and Dale).

I thought this might be what I would have to do but was hoping there could be a cleaner solution. Something for the folks at Safe to consider for a future release...

Nic

Reply