Skip to content

Commit

Permalink
impl
Browse files Browse the repository at this point in the history
Issue #191
  • Loading branch information
rsoika committed Aug 1, 2023
1 parent 4e72ae4 commit ea4cb8a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ public String importData(InputStream imputStream, String encoding, String type,
// replace txtName by the key field
entity.replaceItemValue("name", keyItemValue);

// Add import Information
entity.setItemValue("document.import.type", event.getSource().getItemValue("type"));
entity.setItemValue("document.import.selector", event.getSource().getItemValue("selector"));
entity.setItemValue("document.import.options", event.getSource().getItemValue("options"));

// store id into cache
if (idCache.contains(keyItemValue)) {
logger.warning("...WARNING dupplicate entry found: " + keyField + "=" + keyItemValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ public ItemCollection createWorkitem(ItemCollection source, String fileName, byt
workitem.event(source.getItemValueInteger(DocumentImportService.SOURCE_ITEM_EVENT));
workitem.setWorkflowGroup(source.getItemValueString("workflowgroup"));

// Add import Information
workitem.setItemValue("document.import.type", source.getItemValue("type"));
workitem.setItemValue("document.import.selector", source.getItemValue("selector"));
workitem.setItemValue("document.import.options", source.getItemValue("options"));

String contentType = MediaType.WILDCARD;
if (fileName.toLowerCase().endsWith(".pdf")) {
contentType = "Application/PDF";
Expand Down

0 comments on commit ea4cb8a

Please sign in to comment.