Class WorkflowUtility

java.lang.Object
com.ptc.tml.utils.WorkflowUtility

public class WorkflowUtility extends Object
The Workflow utility class for Translation workflows.

Supported API: true

Extendable: false
  • Method Details

    • translateDocuments

      public static File translateDocuments(Persistable sourceObject, String outputDir, Collection<String> targetLanguages, NavigationCriteria navCriteria, boolean isImmediate, TranslationPackageType packageType, TmlLog log) throws TranslationException
      Entry point into translation. Beginning with the source object (either a Dynamic Document or the root of a SIS structure), the source is expanded to find translatable content and a translation package is created. Most of the work is performed asynchronously in workflow. If an error is discovered before workflow begins, a reference to the error log file is returned. Otherwise null. Note, even if null is returned and error may occur later in processing that causes the process to fail and an error log to be generated.

      Supported API: true
      Parameters:
      sourceObject - - Either an EPMDocument (Dynamic document) or a WTPart (root of a SIS Structure; i.e. an Information Structure or Publication Structure)
      outputDir - - The location to create the translation package
      targetLanguages - - list of language codes; these are the target languages.
      cs - - navigation criteria used to expand the source object
      isImmediate - - whether to create translation packages immediately using all available source in the preparation state, or to wait until all relevant source is in the preparation state
      isQuote - - whether to create a quote package (as opposed to a translation package)
      log - - a TmlLog object to record summary information
      Returns:
      Throws:
      TranslationException
    • startPostImportTranslationWorkflow

      public static String startPostImportTranslationWorkflow(String baselineRef, String contextContainerOid, String sourceLang, String targetLang, String userName, String fileName) throws TranslationException
      This method will start the postimportTranslation Workflow.

      Supported API: true
      Throws:
      TranslationException