Technology Packages
Beside the products jadice flow offers some separately licensed technology packages with some specific functionalities. Below you can find all technology packages and their installation and configuration.
Existing Technology Packages
TessOCR
The "TessOCR" technology package performs OCR analysis on TIFF and PDF documents and returns an enriched PDF, text or hOCR.
Worker definition for the workers.yaml
The worker definition for the OCR technology package looks like this:
jadice-flow.workers:
  workerDefinitions:
  - workerName: "tessocr"
    description: "Performs optical character recognition on the given image parts\
    \ and stores the result as new part"
    processorClass: "com.jadice.flow.controller.server.processor.impl.TessOCRProcessor"
    workerURL: "http://jf-worker-tessocr/"
    infoTags:
    - "PART_BASED"
    - "IMAGE_PROCESSING"
    - "REMOTE"
    workerParameters:
    - name: "output-formats"
      type: "com.jadice.flow.worker.ocr.OCROutputSetting"
      subTypes: null
      value: "\"TEXT\""
      description: "OCR output format(s)"
Note: Remember that the worker parameters are just samples and have to be updated.
Add this part to your worker.yaml to use the technology package (see Installing the technology package - Step 5).
Usage
After that, you can use the worker and create a new jobtemplate or update an existing one: 
Some jobtemplate examples you can find in the Readme of the worker-tessocr: Worker Doku.
In the UI go to: Job configuration -> Create new template -> Add step -> Worker name.
You should see the tessocr worker name there if you set everything up correctly. Then choose the worker and edit the step name, description and add a password. 
For more information see: Configure a job flow.
To create a job go to Job overview -> Create job -> Job template and click on the name of the job template you just created. Next you need to click on the Add item button and chose the file you want to encrypt (if it doesn't have a password) or decrypt.
After clicking ok you should see the job has started and will not take long to complete. The job result should have the decrypted/encrypted file that you can download.
PDF Permissions
The "PDF Permissions" technology package handles passwords on PDF documents.
Note: Before you use this technology package, you have to consult your legal department to determine whether and in which cases this usage is allowed for your processes and type of documents. Please contact jadice-support@levigo.de for more information about this technology package.
Worker definition for the workers.yaml
The worker definition for the PDF Permission technology package looks like this:
jadice-flow.workers:
  workerDefinitions:
  - workerName: "pdf-permissions"
    description: "Handle passwords on PDF"
    processorClass: "com.jadice.flow.controller.server.processor.RemoteItemProcessor"
    workerURL: "http://jf-worker-pdfpermissions/"
    infoTags:
      - "PART_BASED"
      - "REMOTE"
    workerParameters:
      - name: "passwordList"
        type: "java.util.List"
        subTypes: "com.jadice.flow.controller.util.Password"
        value: "[{\"raw\":\"test\"}]"
        description: "owner passwords"
Note: Remember that the worker parameters are just samples and have to be updated.
Add this part to your worker.yaml to use the technology package (see Installing the technology package - Step 5).
Usage
After that, you can use the worker and create a new jobtemplate or update an existing one: 
In the UI go to: Job configuration -> Create new template -> Add step -> Worker name.
You should see the pdf-permissions worker name there if you set everything up correctly. Then choose the worker and edit the step name, description and add a password. 
For more information see: Configure a job flow.
To create a job go to Job overview -> Create job -> Job template and click on the name of the job template you just created. Next you need to click on the Add item button and chose the file you want to encrypt (if it doesn't have a password) or decrypt.
After clicking ok you should see the job has started and will not take long to complete. The job result should have the decrypted/encrypted file that you can download.
ClamAV
The "ClamAV" technology package performs checks on incoming files for viruses. The check is carried out with the help of ClamAV.
Note: ClamAV is an open source antivirus toolkit. For use with this worker, ClamAV must be provided as a daemon service or run in a Docker container.
Worker definition for the workers.yaml
The worker definition for the ClamAV technology package looks like this:
jadice-flow.workers:
  workerDefinitions:
  - workerName: "clam-av"
    description: "Performs a virus check"
    processorClass: "com.jadice.flow.controller.server.processor.RemotePartProcessor"
    workerURL: "http://jf-worker-clamav/"
    infoTags:
      - "PART_BASED"
      - "REMOTE"
    workerParameters: []
Note: Remember that the worker parameters are just samples and have to be updated.
Add this part to your worker.yaml to use the technology package (see Installing the technology package - Step 5).
ClamAV worker setup
For ClamAV to work you ned to add a special configuration to the values.yaml that you create in Step 2.
jf-worker-clamav:
  enabled: true
  enableJsonLogging: false
  resources:
    requests:
      cpu: 250m
      memory: 1024Mi
    limits:
      cpu: 250m
      memory: 1024Mi
  worker:
    application:
      annotation: {}
  startupProbe:
    failureThreshold: 50
  sidecarContainers:
    - name: clamav
      image: clamav/clamav:1.4.2
      resources:
        requests:
          cpu: 500m
          memory: 2048Mi
        limits:
          cpu: 500m
          memory: 2048Mi
      ports:
        - name: clamav
          containerPort: 3310
          protocol: TCP
      readinessProbe:
        tcpSocket:
          port: clamav
        initialDelaySeconds: 0
        periodSeconds: 60
        timeoutSeconds: 1
        successThreshold: 1
        failureThreshold: 3
      livenessProbe:
        exec:
          command:
            - clamdcheck.sh
        initialDelaySeconds: 0
        periodSeconds: 60
        timeoutSeconds: 1
        successThreshold: 1
        failureThreshold: 3
      startupProbe:
        tcpSocket:
          path: /
          port: clamav
        initialDelaySeconds: 0
        failureThreshold: 180
        periodSeconds: 10
        timeoutSeconds: 2
Adjust the config according to your needs
Usage
After that, you can use the worker and create a new jobtemplate or update an existing one: 
In the UI go to: Job configuration -> Create new template -> Add step -> Worker name.
You should see the clamav worker name there if you set everything up correctly. Then choose the worker and edit the step name and description. 
For more information see: Configure a job flow.
To create a job go to Job overview -> Create job -> Job template and click on the name of the job template you just created. Next you need to click on the Add item button and chose the file you want to check for viruses.
After clicking ok you should see the job has started and will not take long to complete. The job result should have the checked up file.
Install a technology package
Prerequisites
Before you begin, make sure you have the following prerequisites installed on your system:
- Access to registry.jadice.com
- Kubernetes 1.19+
- Helm 3.1.0+
- an Ingress Controller
Note: The default storage for storing job results is Eureka. For more information see: Install products
Where to get
To add a Helm repository to your repositories you can execute the following commands:
$ helm repo add levigo https://artifacts.jadice.com/repository/helm-charts/ --username <username>
Password: <enter your password>
When you see the password prompt please enter your password.
You now have access to the Helm charts of the technology packages in your helm cli.
Installing the technology package
To use the technology package with a jadice flow product, you have to create and install a new local helm Chart. How to do this is described below in the following steps.
In the end the origin folder should have the following structure:
origin folder
  value.yaml
  Chart.yaml
  templates
    cm-workers.yaml
  config
    workers.yaml
- 
Create a folder Create a new folder for the Helm Chart configuration files via the user interface or command line and navigate into it. In the following instructions this folder will be called “origin folder”. 
- 
Values.yaml Create a new file "values.yaml" with the following content: Content values.yamlglobal:
 imagePullSecrets:
 - name: "registry-secret"
 jadiceFlow:
 storageType: "eureka"
 existingSecrets:
 eureka: "eureka-secret"
 jf-document-conversion:
 jadiceFlow:
 jf-controller:
 workersConfigMap: jf-email-conversion-workers-cust
 eureka:
 elastic:
 enabled: false
 elasticsearch:
 enabled: false
 secrets:
 imageRegistry:
 server: registry.jadice.com
 username:
 password:Note: Insert your username and password. Also note, that the workersConfigMap name has to be the same as in step 4. Beside that overwrite the bundle name (e.g. in this case jf-document-conversion) (line 9) with your bundle name (e.g. jf-email-conversion). 
- 
Chart.yaml Create in the same folder a new file "Chart.yaml" with the following content: Example Content Chart.yaml for the technology package "pdf permissions":apiVersion: v2
 name: jf-email-conversion-extended
 description: jadice flow email conversion with technology package
 type: application
 version: 2.0.0
 appVersion: 2.0.0
 dependencies:
 - name: jf-email-conversion
 version: 0.10.2
 repository: https://artifacts.jadice.com/repository/helm-charts/
 - name: jf-worker-pdfpermissions
 version: 1.3.0
 repository: https://artifacts.jadice.com/repository/helm-charts/
 condition: jf-worker-pdfpermissions.enabledNote: Insert a corresponding description, version and jadice flow product or technology package name. Also remember to use the latest version of the jadice flow product and used technology package. 
- 
Templates folder Create a new folder named "templates". Navigate into it and create a new file "cm-workers.yaml" with the following content: Content cm-workers.yaml---
 apiVersion: v1
 kind: ConfigMap
 metadata:
 name: jf-email-conversion-workers-cust
 labels:
 {{- include "jfController.labels" . | nindent 4 }}
 data:
 {{ (.Files.Glob "config/workers.yaml").AsConfig | indent 2 }}
 ...Note: The "name" value has to be the name of the "workersConfigMap" in step 2. 
- 
Configuration folder - Navigate back to the origin folder
- Please download the Helm Chart of your used bundle with the following command:
Note: Enter the name of your jadice flow product (e.g. helm pull levigo/jf-email-conversion).$ helm pull levigo/<bundle-name>
- Extract the downloaded jadice flow product
- Navigate into the downloaded Helm Chart folder and copy the file "<product>/config/workers.yaml".
- Navigate back to the origin folder and create a folder called "config". Paste the copied workers.yaml into that folder.
- Open the worker.yamland add the worker definition of the technology package there. You can find the corresponding worker definition of each technology package in the description above (see chapters "Worker definition for the workers.yaml"). For example the worker definition for the PDF Permission technology package looks like this:
 Example worker definitionjadice-flow.workers:
 workerDefinitions:
 - workerName: "pdf-permissions"
 description: "Handle passwords on PDF"
 processorClass: "com.jadice.flow.controller.server.processor.RemoteItemProcessor"
 workerURL: "http://jf-worker-pdfpermissions/"
 infoTags:
 - "PART_BASED"
 - "REMOTE"
 workerParameters:
 - name: "passwordList"
 type: "java.util.List"
 subTypes: "com.jadice.flow.controller.util.Password"
 value: "[{\"raw\":\"test\"}]"
 description: "owner passwords"- Delete the extracted jadice flow product and the downloaded *.tgz file in your folder.
 Note: Remember that the worker parameters are just samples and have to be updated. 
- 
Build the Helm Chart Navigate to the origin folder and run the following command: $ helm dependency update
- 
Install the local Helm Chart Run in the origin folder the following command: $ helm install -f values.yaml <releasename> -n <namespace> --create-namespace .Note: Insert a release and namespace name for your local helm Chart. 
After that, you can use the technology package together with a jadice flow product.
Validate Installation
To validate the local Helm Chart deployment run:
     $ kubectl get pods -n <namespace>
After that you should see the running workers of the installed jadice flow product and the technology package.
Uninstalling the Chart
To uninstall the local Helm Chart deployment run:
     $ helm uninstall <releasename> -n <namespace>
Handle jadice flow product releases
To update the jadice flow product version or technology package version you have to open the Chart.yaml in the origin folder.
There you have to insert the new released version of the product at dependencies -> version.
Example: Insert a new version "1.25.2" of the jf-email-conversion product in the Chart.yaml (see line 10)
apiVersion: v2
name: jf-email-conversion-extended
description: jadice flow email conversion with technology package
type: application
version: 2.0.0
appVersion: 2.0.0
dependencies:
  - name: jf-email-conversion
    version: 1.25.2
    repository: https://artifacts.jadice.com/repository/helm-charts/
  - name: jf-worker-pdfpermissions
    version: 1.3.0
    repository: https://artifacts.jadice.com/repository/helm-charts/
    condition: jf-worker-pdfpermissions.enabled