fmeobjects.FMEWorkspaceRunner.runWithParametersAndDirectives

FMEWorkspaceRunner. runWithParametersAndDirectives ( workspace,parameters,directives )

Executes the workspace file specified using the parameter values and FME directives. Both the parameter values and FME directives are to be specified as name/value pairs. For example, for the parameter pair SHAPE_IN_DISSOLVE_HOLES_SHAPE/no and FME directive pair LOG_FILENAME/out.log:

>>>IFMEStringArray*parameters=fmeSession->createStringArray();>>>parameters->append("SHAPE_IN_DISSOLVE_HOLES_SHAPE");>>>parameters->append("no");>>>IFMEStringArray*directives=fmeSession->createStringArray();>>>parameters->append("LOG_FILENAME");>>>parameters->append("out.log");>>>runner->runWithParametersAndDirectives(*workspace,*parameters,*directives);
Parameters:
  • workspace(str) – The path to the workspace to run.
  • parameters(dict[parameters]) – Parameter name and values dictionary.
  • directives(dict[directives]) - - -指令名称nd values dictionary.
Return type:

None

Raises:

FMEException– An exception is raised if the workspace did not run successfully.