The T-Router supports pipeline transformers, allowing it to perform transformations in a sequence of requests to various engines. This functionality is identical in definition to Content Services pipeline transformers (starting from Alfresco Transform Service 1.3.0). For more information on these pipelines, see the Content Services GitHub documentation on Configuring a custom transform pipeline as the T-Router pipeline transformers are defined using the same format. Due to this commonality, pipelines defined in Content Services can be moved to Transform Service directly. However, it's worth mentioning that most of the pipeline definitions provided out of the box are identical to the pipeline definitions in Content Services.
The pipeline configuration file provided is bundled in the standard T-Router artifact/Docker image (the top resource
being transformer-pipelines.json).
The default file is specified through the SpringBoot property transformer-routes-path, which can be overridden by
the TRANSFORMER_ROUTES_PATH environment variable.
Note
It is not recommended to override the default routes file, unless none of the pipelines are applicable for
the use case. Instead, you can specify additional transforms defined in the provided
transformer-pipelines.jsonfile.
Here's one of the pipeline transformers that provides additional transforms defined in the provided
transformer-pipelines.json file:
{
"transformers": [
{
"transformerName": "pdfToImageViaPng",
"transformerPipeline": [
{
"transformerName": "pdfrenderer",
"targetMediaType": "image/png"
},
{
"transformerName": "imagemagick"
}
],
"supportedSourceAndTargetList": [],
"transformOptions": [
"pdfRendererOptions",
"imageMagickOptions"
]
}
]
}
The above definition will introduce a new transformer, specifically a pipeline transformer called pdfToImageViaPng. The
pipeline transformer is made up of two single-step transformers, pdfrenderer and imagemagick. If the
supportedSourceAndTargetList is left blank, then the T-Router will complete the supported list automatically. The
supported list can be restricted to specific sources and targets by explicitly defining them, just like a single-step
transformer in an engine would. Priorities can be used to override conflicting transforms provided by other transformers.
Note
Pipeline transformers become available only if all the involved single-step transformers are available. The
application logs will report any missing pipeline transformers on startup and config refresh.