Reputation: 2247
I have a series of documents in a document imaging system that need to be manually reviewed.
I can query the relevant documents from my data warehouse via an API call (Process/DataWarehouseDoucmentQuery
), which will return data along these lines:
Account | Document | Status | IndexId |
---|---|---|---|
12345 | Document A | Late | 9876 |
12345 | Document B | Late | 5432 |
12345 | Document C | Late | 1098 |
23456 | Document A | Late | 7654 |
23456 | Document D | Late | 3210 |
The goal is to:
Task
for each documentWorkflow
for each documentProcess
Upvotes: 0
Views: 15
Reputation: 2247
Configuration should include:
Workflow Template
, perhaps named Document Review
, that applies to Attachment
Task
to this workflow, perhaps named Document Review
You can use qbo's ImportFile/BatchApply
feature to create a scheduled job along these lines:
Query: Process/DataWarehouseDoucmentQuery
Action:
Attachment/Save?
Attachment={Document}
&SubscriberID={IndexId}
&Status={Status}
&Decisions_DocumentReview_Decision={Document} Review
&Process={Account}
More detail on the parameters you are passing:
Parameter | Description |
---|---|
Attachment | This is the same as the name of your document; adjust as you see fit. |
SubscriberID | This uses qbo's Subscription pattern to ensure you don't create duplicate documents. This assumes that your IndexId is effectively globally unique in your environment. |
Status | Since it's part of your data warehouse query, might as well map it to Attachment.Status . |
Decisions_DocumentReview_Decision | Any qbo object can save related table data by specifying {Child}_{Template}_* . Note that when passing Template , you should remove any non-alpha-numeric characters from the template name. |
Process | The Attachment module is based on qbo's GenericObject , which can be a 'child' of any other object. In this case, the Attachment will be bound to a parent Process , which will be created on the fly if required. |
Note that creating a parent Process
record as detailed above required that the application setting for GenericParentClasses
include Process
. This can be verified from the Configuration > Modules > Matrix > Settings panel.
An alternative to adding Process
to GenericParentClasses
is to specify both an Object
to indicate the parent, and {Object}_* to indicate parent field values:
Attachment/Save?
Attachment={Document}
&SubscriberID={IndexId}
&Status={Status}
&Decisions_DocumentReview_Decision={Document} Review
&Object=Process
&Process_Process={Account}
&Process_OpenedReason=Just a Stack Overflow Example
Upvotes: 0