Skip to main content
Version: 2.0

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.

Preprocessing Intent

The Preprocessing Intent is used to perform universal modifications on new elements, before they are added to a collection. 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>

When using the REST API, you can pass an intent url parameter to trigger preprocessing. This parameter is available on the following endpoints.
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:
     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"
  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 single job named fusionCollectionExport:
 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"

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

To add these files to your deployment see.