Skip to main content
Version: 2.11.x

Intents

Disclaimer: ℹ️ The Intent functionality described in this Article is only available for Output Organizer ADVANCED.
To get a trial license for advanced functionality please contact us at jadice-support@levigo.de

With intents, you can manipulate the behaviour of Output Organizer depending on the workflow you are using it in. Workflows can give additional information in form of intents to an API call or a redirect to the application. These intents, as the name implies, predefine the intent or the goal of the current workflow step. The applications can then adjust predefined configuration options to reach the desired goal without explicitly setting individual values. In the following article you can learn what intents are available in Output Organizer and how to use them.

Export Intent

This intent can override the default export behaviour. The default export process combines all output documents into a single downloadable PDF file. With an export intent you can change this behaviour to trigger another job when the user decides to trigger the export process. To transport your intention you can add a URL parameter to the Output Organizer URL: If you start with an empty collection:

https://output-organizer.levigo.de?export-intent=<custom-job-template>

or if you have an already existing collection:

https://output-organizer.levigo.de/view/<collection-id>?export-intent=<custom-job-template>

The custom-job-template placeholder for the export-intent parameter can define a Jadice Flow job template containing one or multiple steps of workers. To define your template and make it available in your deployment.

Caution: Current implementation supports the export resulting in a single PDF file. Be careful when using intent resulting in multiple files, as the Output Organizer will not be able to provide links to the individual files.

Preprocessing Intent

The Preprocessing Intent is used to perform universal modifications on new elements, before they are added to a collection. The resulting documents are then shown in the Output branch of the collection where the original documents are shown in the Original documents branch. Use cases for such Intents are conversions, scaling or watermarks.
Similar to Export Intents, preprocessing intents are passed when opening a collection using:

https://output-organizer.levigo.de?preprocessing-intent=flow:<custom-job-template>

or if you have an already existing collection:

https://output-organizer.levigo.de/view/<collection-id>?preprocessing-intent=flow:<custom-job-template>

Import Preprocessing Intent

To process documents before they are added to a collection, you can use the import-flow parameter. The resulting documents are then shown in both branches of the collection:

  • the Original documents branch and
  • the Output branch

to apply that, use the import-flow parameter in the URL:

https://output-organizer.levigo.de/view/<collection-id>?preprocessing-intent=import-flow:<custom-job-template>

Preprocessing Intent via REST API

When using the REST API, you can pass an intent url parameter to trigger preprocessing. This parameter is available on the following endpoints. Choosing between the flow and import-flow parameter depends on the use case. For simplicity, we will use the preprocessing-intent parameter in the following examples. Creating new collections:

POST: https://output-organizer.levigo.de/api/v1/collections?intents=flow:<custom-job-template>

Updating collections:

PUT: https://output-organizer.levigo.de/api/v1/collections/<collection-id>?intents=flow:<custom-job-template>

Adding elements:

POST: https://output-organizer.levigo.de/api/v1/collections/<collection-id>/elements?intents=flow:<custom-job-template>

Updating elements:

PUT: https://output-organizer.levigo.de/api/v1/collections/<collection-id>/elements/<element-id>?intents=flow:<custom-job-template>

The custom-job-template placeholder for the preprocessing-intent parameter can define a Jadice Flow job template. These job templates can preform various tasks using a chain of workers. When USING the REST API and the intents the template name has to be prefixed with flow:. To define your template and make it available in your deployment.

Configuration

You need to add two configuration files to your deployment:

  1. workers.yaml contains a definition of available workers and their configuration.
    As an example the default configuration looks like this and defines a single worker named fusionCollectionExport, and another worker named afp-convert for converting AFP documents to PDF:
     jadice-flow.workers:
    workerDefinitions:
    - workerName: "fusionCollectionExport"
    description: "Creates a single PDF export for a fusion collection"
    processorClass: "com.jadice.flow.controller.server.processor.RemoteItemProcessor"
    workerURL: "http://jf-worker-topdf"
    infoTags:
    - "ITEM_BASED"
    - "IMAGE_PROCESSING"
    - "REMOTE"
    workerParameters:
    - name: "pdfaConformanceLevel"
    type: "com.jadice.flow.worker.topdf.settings.Conformance"
    subTypes: null
    value: "PDF/A 2b"
    description: "PDF-A conformance level"
    - name: "isCollection"
    type: "java.lang.String"
    subTypes: null
    value: "\"true\""
    description: "PDF export settings"
    - name: "processingStepSettings"
    type: "com.jadice.flow.worker.topdf.settings.ProcessingStepSettingsDTO"
    subTypes: null
    value: "{\"repackingAllowed\":false,\"genericProcessingAllowed\":true,\"rasterizationAllowed\"\
    :true}"
    description: "PDF export settings"
    - name: "pdfStructureReaderSettings"
    type: "com.jadice.flow.worker.topdf.settings.PDFStructureReaderSettingsDTO"
    subTypes: null
    value: "{\"readStrategy\":null}"
    description: "PDF reader settings. LENIENT-Mode enables to read some documents\
    \ with structural defects"
    - name: "outputMode"
    type: "com.jadice.flow.worker.topdf.settings.OutputMode"
    subTypes: null
    value: "\"JOINED\""
    description: "PDF export output mode. Generate one stream per page or join all\
    \ incoming documents together."
    - name: "modcaReaderSettings"
    type: "com.jadice.flow.worker.topdf.settings.ModcaReaderSettingsDTO"
    subTypes: null
    value: "{\"fontMode\":\"FocaRasterShape\"}"
    description: "Modca reader settings"
    - name: "baseReshapeSettings"
    type: "com.jadice.flow.worker.topdf.settings.BaseReshapeSettingsDTO"
    subTypes: null
    value: "{\"pageSelection\":null,\"imageRepackingAllowed\":true,\"imageDownsamplingResolutionPPI\"\
    :0.0}"
    description: "Base reshape settings"
    - name: "validationSettings"
    type: "com.jadice.flow.worker.topdf.settings.ValidationSettingsDTO"
    subTypes: null
    value: "{\"performValidation\":false,\"validationMode\":\"PAGE_COUNT_AND_HASH\"\
    ,\"validationModeFailureAction\":\"FAIL\"}"
    description: "Validation settings"

    - workerName: "afp-convert"
    description: "Converts AFP parts to PDF"
    processorClass: "com.jadice.flow.controller.server.processor.RemoteItemProcessor"
    workerURL: "http://jf-worker-afp-topdf"
    infoTags:
    - "PART_BASED"
    - "REMOTE"
    workerParameters:
    - name: "modcaReaderSettings"
    type: "com.jadice.flow.worker.topdf.settings.ModcaReaderSettingsDTO"
    subTypes: null
    value: "{\"fontMode\":\"FocaRasterShape\"}"
    description: "Modca reader settings"
    - name: "processingStepSettings"
    type: "com.jadice.flow.worker.topdf.settings.ProcessingStepSettingsDTO"
    subTypes: null
    value: "{\"repackingAllowed\":false,\"genericProcessingAllowed\":false,\"rasterizationAllowed\":true}"
    - name: "isCollection"
    type: "java.lang.String"
    subTypes: null
    value: "\"true\""
  2. jobtemplates.yaml contains a definition of available job templates which contain the process steps and refer to the workers defined above.
    As an example the default configuration looks like this and defines a job named fusionCollectionExport, and another job named afp-to-pdf for converting AFP documents to PDF:
 jadice-flow.jobs:
jobTemplates:
- jobName: "fusionCollectionExport"
description: "This worker exports document(s) and publishes them to the configured export target(s)."
properties: { }
enabled: true
stepTemplates:
- stepName: "fusionCollectionExport"
workerDefinitionName: "fusionCollectionExport"
inputMimeTypes: [ ]
inputFilterJson: null
expectsNewPartResult: true
markSrcAsMetaOnResult: true
parameters:
- name: "pdfaConformanceLevel"
type: "com.jadice.flow.worker.topdf.settings.Conformance"
subTypes: null
value: "\"PDFA2b\""
description: "PDF-A conformance level"
jobFlow:
- from: null
"on": "*"
to: "fusionCollectionExport"

- jobName: "afp-to-pdf"
description: "Convert AFP to PDF"
properties: {}
enabled: true
stepTemplates:
- stepName: "AfpToPDF"
workerDefinitionName: "afp-convert"
inputMimeTypes: []
inputFilterJson: "[{\"type\":\"MimeTypeFilter\",\"inclusive\":true,\"mimeTypes\"\
:[\"application/vnd.ibm.afplinedata\",\"application/vnd.ibm.modca\",\"application/vnd.ibm.modcap\",\"application/vnd.afpc.afplinedata\",\"application/vnd.afpc.modca\"\
]}]"
expectsNewPartResult: true
markSrcAsMetaOnResult: true
parameters:
- name: "modcaReaderSettings"
type: "com.jadice.flow.worker.topdf.settings.ModcaReaderSettingsDTO"
subTypes: []
value: "{\"fontMode\":\"FocaOutline\"}"
description: "Modca reader settings"
- name: "isCollection"
type: "java.lang.String"
subTypes: null
value: "\"true\""

For more information about workers and job templates please refer to the Jadice Flow documentation here.

To add these files to your deployment see.