Fired by OCRManager when a document scan submitted to the OCR service completes or fails. Deprecated: no code currently constructs a listener for it beyond the OCR job dispatch itself. The event id is "scanJob". Its status distinguishes a completed scan, whose getGeneratedOCRTable carries the resulting table, from a failed one, whose getReason carries the failure message. A listener uses getStatus to tell the two apart.

Group: Journeys

Implements: TriggerEvent, FunnelEvent


Properties

PropertyReturnsDescription
attributesMap<String,Object>Extra attributes carried by this event. Always an empty, immutable map for this event type.
eventIdStringThe persistent identifier for this event type, always "scanJob". Used by the trigger system to select handlers.
generatedOCRTableOCRTableThe table produced by a successful scan.
jobIdStringThe id of the scan job this event reports on, as returned by OCRManager.scanToTable.
leadProfileProfileThe profile this event's scan is attributed to for funnel tracking purposes, same as getSourceProfile.
reasonStringThe failure message for a failed scan.
relatedLeadLeadNot used by this event. Always returns null; a scan job is not currently linked to a lead.
rfRootFolderThe root folder the scan was submitted through.
sourceProfileProfileThe profile passed to the constructor, as supplied by the caller that created this event. Always null for events raised from OCRManager, since scans are not currently attributed to a profile.
statusScanJobStatusWhether the scan job this event reports on completed or failed.
triggerItem1StringNot used by this event. Always returns null.
triggerItem2StringNot used by this event. Always returns null.
triggerItem3StringNot used by this event. Always returns null.
triggerItem4StringNot used by this event. Always returns null.
triggerItem5StringNot used by this event. Always returns null.
websiteWebsiteThe website the scan was submitted through, derived from the root folder passed to the constructor. Null if that root folder is not a website root folder.

Inherited from TriggerEvent

Properties

PropertyReturnsDescription
serialisablebooleanWhether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here.

Methods

isSerialisable()

Returns: boolean

Whether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here.


Methods

getSourceProfile() · getEventId() · getWebsite() · getTriggerItem1() · getTriggerItem2() · getTriggerItem3() · getTriggerItem4() · getTriggerItem5() · getAttributes() · getLeadProfile() · getRelatedLead() · getJobId() · getRf() · getGeneratedOCRTable() · getReason() · getStatus()

getSourceProfile()

Returns: Profile

The profile passed to the constructor, as supplied by the caller that created this event. Always null for events raised from OCRManager, since scans are not currently attributed to a profile.

getEventId()

Returns: String

The persistent identifier for this event type, always "scanJob". Used by the trigger system to select handlers.

getWebsite()

Returns: Website

The website the scan was submitted through, derived from the root folder passed to the constructor. Null if that root folder is not a website root folder.

getTriggerItem1()

Returns: String

Not used by this event. Always returns null.

getTriggerItem2()

Returns: String

Not used by this event. Always returns null.

getTriggerItem3()

Returns: String

Not used by this event. Always returns null.

getTriggerItem4()

Returns: String

Not used by this event. Always returns null.

getTriggerItem5()

Returns: String

Not used by this event. Always returns null.

getAttributes()

Returns: Map<String,Object>

Extra attributes carried by this event. Always an empty, immutable map for this event type.

getLeadProfile()

Returns: Profile

The profile this event's scan is attributed to for funnel tracking purposes, same as getSourceProfile.

getRelatedLead()

Returns: Lead

Not used by this event. Always returns null; a scan job is not currently linked to a lead.

getJobId()

Returns: String

The id of the scan job this event reports on, as returned by OCRManager.scanToTable.

getRf()

Returns: RootFolder

The root folder the scan was submitted through.

getGeneratedOCRTable()

Returns: OCRTable

The table produced by a successful scan.

getReason()

Returns: String

The failure message for a failed scan.

getStatus()

Returns: ScanJobStatus

Whether the scan job this event reports on completed or failed.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.