Deploying custom Alfresco Transform Service in ACS Community & Enterprise

cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying custom Alfresco Transform Service in ACS Community & Enterprise

angelborroy
Alfresco Employee
0 0 2,742

This blog post describes the different Transform Service architectures available from ACS 5.2 to ACS 7.2 and provides a sample implementation and deployment for a Custom Transform Service.

Alfresco Transformers

Legacy Transformer

  • Executed locally in Alfresco Repo web application by extending ContentTransformer* Java classes
  • Available in ACS 5.2 (or previous), 6.1 and 6.2

Local Transformer

  • Executed as standalone Spring Boot service
  • Transformations delivered using synchronous HTTP invocations
  • Available from ACS 6.2

Transformer (only Enterprise)

  • Executed as standalone Spring Boot service
  • Transformations delivered using asynchronous ActiveMQ messages
  • Available from ACS 6.2

 

Screenshot 2022-05-25 at 13.33.11.png

 

Deploy Custom Alfresco Transformer

Alfresco Transformer from PDF to OCRd PDF has been taken as sample to provide deployment instructions for Local Transformer and Async Transformer.

https://github.com/aborroy/alf-tengine-ocr

 

Deploy to Local Transformer (Community)

Add following lines to your docker-compose.yml file

 

services:
    alfresco:
        environment:
            JAVA_OPTS : "
                -DlocalTransform.core-aio.url=http://transform-core-aio:8090/
                -DlocalTransform.ocr.url=http://transform-ocr:8090/
            "

    transform-core-aio:
        image: alfresco/alfresco-transform-core-aio:2.3.10

    transform-ocr:
        image: alfresco/tengine-ocr:latest
  • Include the localTransform URL for OCR Transformer in alfresco Docker Container, http://transform-ocr:8090/ by default
  • Declare the new transform-ocr Docker Container

If you want to use an Enhanced Transform Service instead of the one provided by default by Alfresco, check out this Community project:

https://github.com/Acosix/alfresco-transform

  • Resources control and limitation available via properties file
  • SSL Configuration provided out of the box
  • Light-weight HTTP Server instead of Spring Boot app

 

Deploy to Async Transformer (Enterprise)

Add following lines to your docker-compose.yml file

 

services:
    alfresco:
        environment:
            JAVA_OPTS : "
              -Dlocal.transform.service.enabled=false
              -Dtransform.service.enabled=true
              -Dtransform.service.url=http://transform-router:8095
              -Dsfs.url=http://shared-file-store:8099/
            "

    transform-router:
      image: quay.io/alfresco/alfresco-transform-router:1.5.0
      environment:
        ACTIVEMQ_URL: "nio://activemq:61616"
        CORE_AIO_URL: "http://transform-core-aio:8090"
        TRANSFORMER_URL_OCR: "http://transform-ocr:8090"
        TRANSFORMER_QUEUE_OCR: "ocr-engine-queue"
        FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"

    transform-ocr:
      image: alfresco/tengine-ocr:latest
      environment:
        ACTIVEMQ_URL: "nio://activemq:61616"
        FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"
  • Disable local.transform service in alfresco Docker Container and enable transform service (asynchronous)
  • Add OCR Transformer configuration to transform-router Docker Container: URL (http://transform-ocr:8090/ by default) and Queue Name (ocr-engine-queue as declared in ats-transformer-ocr/src/main/resources/application-default.yaml)
  • Declare the new transform-ocr Docker Container using the ActiveMQ and Shared File services

 

Additional details are available on the following video recording.

https://www.youtube.com/watch?v=XV8UzYFFYTI

 

About the Author
Angel Borroy is Hyland Developer Evangelist. Over the last 15 years, he has been working as a software architect on Java, BPM, document management and electronic signatures. He has been working with Alfresco during the last years to customize several implementations in large organizations and to provide add-ons to the Community based on Record Management and Electronic Signature. He writes (sometimes) on his personal blog http://angelborroy.wordpress.com. He is (proud) member of the Order of the Bee.