Hi OAD,
As long as reading your description, I don't think you need to do such a complicated batch processing.
To cut pipelines by the communal areas, you can use the Clipper transformer. If you need to create multiple destination datasets separately for each input pipeline file or communal area file, the "fanout" functionality performs it effectively.
If you explain the reason that you need to do batch processing, we might be able to find a more effective solution.
Takashi
Thank for your answer.
The workbench is not very complcated and it does what I wanted. I must not cut pipelines by the areas I only need to lacate spatially my pipelines over the corresponding area.
I need to do batch processing in order to run this workbench several times with diffrent inputs automaticlly (by double clicking on the .bat).
I hope I'm more explicit.
OAD
Hi,
If you are looking for a quick way to specify different source files for each run-time, how about creating a workspace with a WorkspaceRunner to launch the main workspace?
The WorkspaceRunner provides an interface on which you can select any source files like a general Open File dialog box. I think it's easier to use and more flexible than a batch file.
Takashi
Naturally, you may put multiple WorkspaceRunners to run iteratively the same workspace for different source files. It's just a batch processing.
Takashi
It is a good suggestion but, do you please have an example of how to use Workspace Runner, because I have never had the opportunity to try it. And if I understood, I can use multiple workspaces runners in one workbench to lunch only one workbench?
Yes, multiple WorkspaceRunners can launch the same workspace simultaneously. And also it's possible to call iteratively the same WorkspaceRunner several times.
I didn't find appropriate examples in the FMEpedia, so I created simple examples.
Download them here (3MB zipped file including test data).
"runner1.fmw" has two WorkspaceRunners; each of them runs "main.fmw". This maybe is an example of the simplest batch processing.
"runner2.fmw" has just one WorkspaceRunner, but it reads input / output feature type name pairs from an external csv table and runs "main.fmw" for every pair. I often use this pattern.
There are many patterns to use the WorkspaceRunner depending on the actual situation, I cannot show all of them. Please customize these examples to create your own best solution.
Hope this helps.
Takashi
Thank you for the example.
I tried to customize it and by defining my own Published Parameters, INPUTS/OUTPUTS paths but I must be forgotten a little detail. This is my example I hope you help me to find out what I missed.
https://docs.google.com/file/d/0BwhE3DdmajjtME0zOGZ0QWNqNFU/edit?usp=sharing https://docs.google.com/file/d/0BwhE3Ddmajjtc3hkT21aRHVxRVU/edit?usp=sharing
I can't find any problems as long as seeing your screen shot. The parameter settings dialog box of the WorkspaceRunner in another workspace, when you specified the main workspace to "FME Workspace", will be like this image initially:
note: \\ (back slash) is displayed as ? symbol on the Japanese Windows. I think the main workspace will work expectedly if you specify the parameter values (colored boxes) appropriately. You can specify a parameter value with one of: 1) setting a fixed value manually (select file / directory, write directly) 2) specifying an attribute of input feature 3) linking to a workspace parameter etc.
Takashi
correction:
3) linking to a user parameter
Oh, I missed the second screenshot (workspacerunner.jpg).
The first (left hand side) WorkspaceRunner seems to fail. No feature came from its SUCCEEDED port, so the second one didn't work.
The image shows the second (right) WorkspaceRunner parameters, but in fact there could be problems in the first one.
How did you specify parameters of the first WorkspaceRunner?
Takashi
Thank you very much for your help. My workspace works now. I modified my workbench as you can see on the screenshot.
The problem was with the LOG_FILE parameter and its value. I didn't correct it but I removed it for that part of my project.
However it would be so useful for the second part to create a published parameter to generate my Logs in the right directory. I need you advice please.
Hi,
Possibly I found the reason for the failure.
If LOG_FILE (user parameter) is linked with LOG_FILE (workspace parameter), you should specify a file path (not a directory path) to the parameter.
e.g. C:\\foo\\bar\\LOGS\\DIFF_MPC\\filename.log
Takashi
and the directory in which the log file will be saved seems to have to be existing.
Hi,
It worked very well.
Thank you very much for your recommendations very useful.
Best Regards
OAD
Hi Takashi,
Your suggestions are very useful for me, thank you very much.