Skip to content

job Object Used in the Route Condition of a Virtual Queue


The job object, which can be used in a route condition of a virtual queue, contains the following parts:

With the SEAL-specific attributes, the PLS_ prefix is removed and only the key itself is used.

Hint - internal name

You can see the internal names of the keys in PLOSSYS Administrator.


Job Properties

Among others, the job object provides the following job properties:

  • arrivedTime: Timestamp in milliseconds when the job started to arrive

  • checkinTime: Timestamp in milliseconds when the job has arrived completely

  • low: All non-array values are stored additionally in this object in lowercase for an easier case-insensitive comparison

  • pagesFromFileContent: true if the PAGESIZE values are taken from the original input file content, otherwise the default of PAGESIZE is used.

  • TRAY_<n>: The trays are specified as TRAY_<n> keys, for example, TRAY_1 for the first page. <n> starts at 1.


Page-Specific Data

The page-specific data is stored in arrays. For each page, an item in the array exists.

Example - document with two pages

ORIENTATION: ['Portrait', 'Portrait'],
COLOR_MODEL: ['COLOR', 'COLOR'],
PLOTSIZE: ['0.0000   0.0000   0.2000   0.2871', '0.0000   0.0000   0.2000   0.2871'],
PAGESIZE: ['595  842', '595  842'],
PRINTAREA: ['0.0190   0.0070   0.1910   0.2800', '0.0000   0.0000   0.2000   0.2870'],

The following page-specific keys are available:

Key Available Values Default
COLOR_MODEL COLOR, GRAY COLOR
ORIENTATION Landscape, Portrait Portrait
PAGESIZE <width_points> <height_points> 595 842
PLOTSIZE <x_min> <y_min> <x_max> <y_max> 0.0000 0.0000 0.2000 0.2870
PRINTAREA <x_min> <y_min> <x_max> <y_max> 0.0000 0.0000 0.2000 0.2870

job.getMaxPage Function

The getMaxPage function of the job object searches for the largest page of the job. It returns a reference to an object with information about the found page and operators for comparing the page size of the found page to the page sizes of the standard media. For more information about the operators, refer to Operators.

{
  INDEX,             // index of the page starting at 0
  PSSIZE,            // array with size in points for width and height in portrait
  PAGESIZE,          // PS size as single string
  ACTUALLY_PORTRAIT, // true if the original page is portrait, false otherwise
  MEDIANAME,         // name of the closest found standard medium size, for example, a6 or a5
  MEDIASIZE_DIFF     // difference to the closest found standard medium size, expressed in percent
}

Available values for MEDIANAME: unknown, a6, a5, a4, a3, a2, a1, a0, ansia, legal, ansib, ansic, ansid, ansie


Operators

The returned object provides operators for comparing the page size of the found page to the one of the standard medium specified as parameter.

job.getMaxPage.eq Operator

The job.getMaxPage.eq operator checks if the page size of the found page is equal to the page size of the specified medium.

Parameter: String ; for available values, refer to the available values for MEDIANAME

Return:

  • true if the page size of the found page is equal to the page size of the specified medium

  • false otherwise

Example - use of job.getMaxPage.eq

job.getMaxPage().eq('a2')

job.getMaxPage.ge Operator

The job.getMaxPage.ge operator checks if the page size of the found page is greater than or equal to the page size of the specified medium.

Parameter: String ; for available values, refer to the available values for MEDIANAME

Return:

  • true if the page size of the found page is greater than or equal to the page size of the specified medium

  • false otherwise

Example - use of job.getMaxPage.ge

job.getMaxPage().ge('ansia')

job.getMaxPage.gt Operator

The job.getMaxPage.gt operator checks if the page size of the found page is greater than the page size of the specified medium.

Parameter: String ; for available values, refer to the available values for MEDIANAME

Return:

  • true if the page size of the found page is greater than the page size of the specified medium

  • false otherwise

Example - use of job.getMaxPage.gt

job.getMaxPage().gt('a4')

job.getMaxPage.le Operator

The job.getMaxPage.le operator checks if the page size of the found page is smaller than or equal to the page size of the specified medium.

Parameter: String ; for available values, refer to the available values for MEDIANAME

Return Value:

  • true if the page size of the found page is smaller than or equal to the page size of the specified medium

  • false otherwise

Example - use of job.getMaxPage.le

job.getMaxPage().le('ansia')

job.getMaxPage.lt Operator

The job.getMaxPage.lt operator checks if the page size of the found page is smaller than the page size of the specified medium.

Parameter: String ; for available values, refer to the available values for MEDIANAME

Return:

  • true if the page size of the found page is smaller than the page size of the specified medium

  • false otherwise

Example - use of job.getMaxPage.lt

job.getMaxPage().lt('a3')

job.getMaxPage.ne Operator

The job.getMaxPage.ne operator checks if the page size of the found page is not equal to the page size of the specified medium.

Parameter: String ; for available values, refer to the available values for MEDIANAME

Return:

  • true if the page size of the found page is not equal to the page size of the specified medium

  • false otherwise

Example - use of job.getMaxPage.ne

job.getMaxPage().ne('a4')

Job Object Example

Example - job object for document with two pages

job = {
  uuid: '959de09a-bb49-49a7-a954-5760376a0fcc',
  jobId: '959de09a',
  low: {
    uuid: '959de09a-bb49-49a7-a954-5760376a0fcc',
    jobId: '959de09a',
    SAP_OMS_S_SAPSYSTEMID: 'sap1',
    jobName: 'microsoft word - dokument1',
    printerName: 'virti-ro',
    userName: 'bodo.bob',
    fileName: '',
    fileFormat: 'application/postscript',
    checkinType: 'ipp/1.1',
    SERVER: 'xyz.sealsystems.local',
    creator: 'pscript5.dll version 5.2.2',
    SIZEMODE: 'formatsize',
    DUPLEX: 'long_side',
    COLLATE: 'false',
    VIEW_ORIENTATION: '1 0 0 1',
    BLABLA: 'foobar',
    PLOTGRP: 'default',
    DELTYPE: 'aftout',
    FLAGPAGE: 'n',
    STAMP_2: 'huhu',
    SORT_TYPE: 'nosort',
    STAPLE_TYPE: 'oneupleft',
    PUNCH_TYPE: 'nopunch',
    PLOTSCALE: '1.0',
    TRAY_2: 'intrayauto',
    BOOKLET: 'n'
  },
  SAP_OMS_S_SAPSYSTEMID: 'sap1',
  jobName: 'Microsoft Word - Dokument1',
  printerName: 'virti-ro',
  userName: 'bodo.bob',
  fileName: '',
  fileFormat: 'application/postscript',
  copies: 8,
  checkinType: 'ipp/1.1',
  SERVER: 'xyz.sealsystems.local',
  creator: 'PScript5.dll Version 5.2.2',
  arrivedTime: 1647513001737,
  checkinTime: 1647513001779,
  fileSize: 227774,
  SIZEMODE: 'FORMATSIZE',
  DUPLEX: 'LONG_SIDE',
  COLLATE: 'FALSE',
  VIEW_ORIENTATION: '1 0 0 1',
  BLABLA: 'FOOBAR',
  PLOTGRP: 'default',
  DELTYPE: 'AFTOUT',
  FLAGPAGE: 'N',
  STAMP_2: 'huhu',
  SORT_TYPE: 'NOSORT',
  STAPLE_TYPE: 'OneUpLeft',
  PUNCH_TYPE: 'NOPUNCH',
  PLOTSCALE: '1.0',
  TRAY_2: 'INTRAYAUTO',
  BOOKLET: 'N',
  ORIENTATION: ['Portrait', 'Portrait'],
  COLOR_MODEL: ['COLOR', 'COLOR'],
  PLOTSIZE: ['0.0000   0.0000   0.2000   0.2871', '0.0000   0.0000   0.2000   0.2871'],
  PAGESIZE: ['595  842', '595  842'],
  PRINTAREA: ['0.0190   0.0070   0.1910   0.2800', '0.0000   0.0000   0.2000   0.2870'],
  pagesFromFileContent: true
};

Condition Examples

Example - route conditions of a virtual queue

job.DUPLEX === 'LONG_SIDE' || job.DUPLEX === 'SHORT_SIDE'
job.getMaxPage().PSSIZE[0] > 594 && job.getMaxPage().MEDIANAME === 'a4'
job.getMaxPage().ge('a3')
job.BLABLA === 'FOOBAR' && (job.STAMP_2.toUpperCase().startsWith('HU') || job.low.STAMP_2.startsWith('ho'))

Back to top