I would like to use the WorkspaceRunner to start one Workbench several times through a published input-parameter (e.g. the database-connection details of a Oracle DB), e.g. for merging data from several political entities into one superior entity.
Therefore you have a Workbench that processes the input data and writes it to a table of a DB, a text file that contains the input parameters of the DB for the writer of the mentioned Workbench and a second Workbench consisting of a WorkspaceRunner. This WorkspaceRunner reads one line of input parameter after another and starts the workbench each time with the respective input.
This would not be a problem itself. The difficulty is that before/at each start of the Workbench containing the WorkspaceRunner, the table should get truncated once so that only the new set of data is contained. If you activate the 'Truncate Table First' format parameter of the writer, the table will be truncated at each run of the Workspace. So you have only the data of the very last call of the Workbench in the DB table.
Is there any possibility to specify that only at the first run of the Workbench initiated by the WorkspaceRunner this truncation takes place?
The only possibility offered in FME that comes to my mind is to expand the Workbench that contains the WorkspaceRunner in a way, that an equally defined but empty table of the DB is called by the reader and gives its 'empty' content to the writer with activated truncation. This process would be executed only once. But I am not sure if one can assure that this truncate-process will be called always before the WorkspaceRunner