diff --git a/README.md b/README.md index 63f7f740..e849df7a 100644 --- a/README.md +++ b/README.md @@ -570,3 +570,83 @@ curl --location --request POST 'http://localhost:9001/mod-workflow/events/workfl --data-raw '{"logLevel": "INFO", "bcn-mail-from": "folio@k1000.library.tamu.edu", "startRange": "a0", "endRange":"b9","username":"*","password":"*", "bcm-mail-to": "recipient@tamu.edu", "path": "/mnt/workflows/diku/bcn" }' ``` +## withdraw-items-by-barcode + +### Withdraw Items By Barcode Report Workflow + +Manual triggered workflow that updates item, holdings and instance information based on CSV of barcodes. Items are marked as withdrawn with temporary loan types, and holdings are suppressed with location set to 'Evans withdrawn'. A note input by the user is persisted. Then, corresponding instances are suppressed. Finally, an email is sent to inform recipients about these updates after the workflow finishes. + +These variables are required when triggering the workflow: + +| Variable Name | Allowed Values | Short Description | +| -------------- | -------------- | ----------------- | +| emailTo | e-mail address | An e-mail address used as the "TO" in the sent e-mails. | +| note | string | A string used as 'note'. | +| file | file name | The file path within the specified directory path having the barcode CSV file. | +| withdrawItemsByBarcodeFrom | e-mail address | An e-mail address used as the "FROM" in the sent e-mails. | +| username | string | Okapi login username. | +| password | string | Okapi login password. | +| ldp-user | string | LDP login username. | +| ldp-password | string | LDP login password. | +| ldp-url | URL | LDP URL. | +| mis-catalog-reports-url | URL | URL for the MIS Catalog Reports website. | +| logLevel | string | Designate the desired logging, such as "INFO", "WARN", or "DEBUG". | + +This utilizes **LDP** to get the query result which gets written to: */mnt/workflows/tamu/withdraw-items-by-barcode* path. + +```shell + +fw config set ldp-url *** +fw config set ldp-user *** +fw config set ldp-password *** +fw config set withdrawItemsByBarcodeFrom *** +fw config set mis-catalog-reports-url https://localhost/catalog_reports/site + +``` + +To build and activate: + +```shell + +fw build withdraw-items-by-barcode +fw activate withdraw-items-by-barcode + +``` +``` + +To deactivate: + +```shell + +fw deactivate withdraw-items-by-barcode + +``` +To delete: + +```shell + +fw delete withdraw-items-by-barcode + +``` + +User inititates form submission from catalog_reports Withdraw Items By Barcode Report. + +Trigger the workflow using an **HTTP** request such as with **Curl**: + +```shell + +curl --location --request POST 'http://localhost:9001/mod-workflow/events/workflow/withdraw-items-by-barcode/start' \ +--header 'Content-Type: application/json' \ +--header 'X-Okapi-Tenant: diku' \ +--data-raw '{ + "logLevel": "DEBUG", + "withdrawItemsByBarcodeFrom": "folio@k1000.library.tamu.edu", + "username": "*", + "password": "*", + "emailTo": "recipient@tamu.edu", + "file": "@barcodes.csv", + "note": "This is a note text message.", + "path": "/mnt/workflows/diku/withdraw-items-by-barcode" +}' + +``` diff --git a/withdraw-items-by-barcode/nodes/buildQuery.json b/withdraw-items-by-barcode/nodes/buildQuery.json new file mode 100644 index 00000000..34db9bde --- /dev/null +++ b/withdraw-items-by-barcode/nodes/buildQuery.json @@ -0,0 +1,8 @@ +{ + "id": "571d831b-7089-44b0-8d45-d48ea2639a55", + "name": "Build Query", + "description": "Query to get itemId, associated holdingsId and instanceIds.", + "deserializeAs": "ScriptTask", + "scriptFormat": "javascript", + "code": "buildQuery.js" +} diff --git a/withdraw-items-by-barcode/nodes/buildWriteCSVObj.json b/withdraw-items-by-barcode/nodes/buildWriteCSVObj.json new file mode 100644 index 00000000..90447911 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/buildWriteCSVObj.json @@ -0,0 +1,8 @@ +{ + "id": "90cacb73-553b-4ee5-8a30-ebddeab9c66f", + "name": "Build Write CSV Obj", + "description": "Build the CSV object.", + "deserializeAs": "ScriptTask", + "scriptFormat": "javascript", + "code": "buildWriteCSVObj.js" +} diff --git a/withdraw-items-by-barcode/nodes/connectToLdp.json b/withdraw-items-by-barcode/nodes/connectToLdp.json new file mode 100644 index 00000000..4696c2f2 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/connectToLdp.json @@ -0,0 +1,13 @@ +{ + "id": "eca47911-5825-42d6-9e70-a0683674821d", + "name": "Connect LDP", + "description": "Connect to the LDP.", + "deserializeAs": "DatabaseConnectionTask", + "inputVariables": [], + "outputVariable": {}, + "designation": "ldp", + "url": "{{ldp-url}}", + "username": "{{ldp-user}}", + "password": "{{ldp-password}}", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/convertCSVtoJSONArray.json b/withdraw-items-by-barcode/nodes/convertCSVtoJSONArray.json new file mode 100644 index 00000000..03fea382 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/convertCSVtoJSONArray.json @@ -0,0 +1,8 @@ +{ + "id": "4a33bef3-4f5e-45ac-bb8a-2c376cb02cf9", + "name": "Convert CSV to JSONArray", + "description": "Convert to JSONArrayObject.", + "deserializeAs": "ScriptTask", + "scriptFormat": "javascript", + "code": "convertCSVtoJSONArray.js" +} diff --git a/withdraw-items-by-barcode/nodes/deleteCSVReport.json b/withdraw-items-by-barcode/nodes/deleteCSVReport.json new file mode 100644 index 00000000..4b670d3d --- /dev/null +++ b/withdraw-items-by-barcode/nodes/deleteCSVReport.json @@ -0,0 +1,16 @@ +{ + "id": "90ef5596-41c5-4773-a51d-031ead77c1a7", + "name": "Delete CSV Report", + "description": "Delete CSV report file.", + "deserializeAs": "FileTask", + "inputVariables": [ + { + "key": "timestamp", + "type": "PROCESS" + } + ], + "outputVariable": {}, + "path": "/mnt/workflows/tamu/withdraw-items-by-barcode/withdraw-items-by-barcode-${timestamp}.csv", + "op": "DELETE", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/deleteReport.json b/withdraw-items-by-barcode/nodes/deleteReport.json new file mode 100644 index 00000000..8c0ffa39 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/deleteReport.json @@ -0,0 +1,16 @@ +{ + "id": "af3e11c4-2e8b-4839-a066-1a1453533846", + "name": "Delete ZIP format", + "description": "Delete zip format for wibb report.", + "deserializeAs": "FileTask", + "inputVariables": [ + { + "key": "timestamp", + "type": "PROCESS" + } + ], + "outputVariable": {}, + "path": "/mnt/workflows/tamu/withdraw-items-by-barcode/wibb-report-${timestamp}.zip", + "op": "DELETE", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/disconnectLdp.json b/withdraw-items-by-barcode/nodes/disconnectLdp.json new file mode 100644 index 00000000..de8e1ec9 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/disconnectLdp.json @@ -0,0 +1,10 @@ +{ + "id": "21e28faf-4f86-45aa-b37b-c75452b4dc43", + "name": "Disconnect from LDP", + "description": "Disconnect from LDP.", + "deserializeAs": "DatabaseDisconnectTask", + "inputVariables": [], + "outputVariable": {}, + "designation": "ldp", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/email.json b/withdraw-items-by-barcode/nodes/email.json new file mode 100644 index 00000000..b3ccb71f --- /dev/null +++ b/withdraw-items-by-barcode/nodes/email.json @@ -0,0 +1,23 @@ +{ + "id": "8e5b3afb-b48e-4647-8865-604778b45ff7", + "name": "Email ZIP Report", + "description": "Email attachment containing CSV report.", + "deserializeAs": "EmailTask", + "inputVariables": [ + { + "key": "emailTo", + "type": "PROCESS" + }, + { + "key": "timestamp", + "type": "PROCESS" + } + ], + "outputVariable": {}, + "mailTo": "${emailTo}", + "mailFrom": "{{{withdrawItemsByBarcodeFrom}}}", + "mailSubject": "Withdraw Items By Barcode Report", + "mailText": "Attached is the report for Withdraw Items By Barcode.", + "attachmentPath": "/mnt/workflows/tamu/withdraw-items-by-barcode/wibb-report-${timestamp}.zip", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/end.json b/withdraw-items-by-barcode/nodes/end.json new file mode 100644 index 00000000..6e8c76fb --- /dev/null +++ b/withdraw-items-by-barcode/nodes/end.json @@ -0,0 +1,6 @@ +{ + "id": "b1bc69f5-20ca-446c-ba7b-7c53d8ce8447", + "name": "End", + "description": "End of withdraw items by barcode workflow", + "deserializeAs": "EndEvent" +} diff --git a/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocess.json b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocess.json new file mode 100644 index 00000000..be0d7446 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocess.json @@ -0,0 +1,20 @@ +{ + "id": "31e32bbe-1c40-4dc9-b395-cc37acd7d6b8", + "name": "Holdings Update Subprocess", + "description": "Subprocess to update holdings based on holdingsId.", + "type": "EMBEDDED", + "deserializeAs": "Subprocess", + "nodes": [ + "{{mod-workflow}}/startEvent/45e3fdfe-a549-4ab5-92a9-84fc27bd6566", + "{{mod-workflow}}/requestTask/4292d492-c465-4c51-b080-066b44c7656c", + "{{mod-workflow}}/scriptTask/88f811ec-2558-478b-a0b4-20132d74c02c", + "{{mod-workflow}}/requestTask/6fff7df3-aaf4-4304-9080-eaa607b4521c", + "{{mod-workflow}}/scriptTask/2da06e4a-df13-475c-b197-4248a9e9f3ef", + "{{mod-workflow}}/endEvent/9e43d115-d42e-4c6d-a016-7eba517a631c" + ], + "loopRef": { + "dataInputRefExpression": "${holdingsIds.elements()}", + "inputDataName": "holdingsId", + "parallel": false + } +} diff --git a/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessEnd.json b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessEnd.json new file mode 100644 index 00000000..6fc516cf --- /dev/null +++ b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessEnd.json @@ -0,0 +1,9 @@ +{ + "id": "9e43d115-d42e-4c6d-a016-7eba517a631c", + "name": "Holdings Update Subprocess: End", + "description": "Subprocess to end - update holdings based on holdingsId.", + "type": "NONE", + "deserializeAs": "EndEvent", + "asyncBefore": true +} + diff --git a/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessGET.json b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessGET.json new file mode 100644 index 00000000..7e3ed89e --- /dev/null +++ b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessGET.json @@ -0,0 +1,25 @@ +{ + "id": "4292d492-c465-4c51-b080-066b44c7656c", + "name": "Holdings Update Subprocess: Get Holdings By Id", + "description": "Get holding by holding id.", + "deserializeAs": "RequestTask", + "request": { + "url": "{{okapi-internal}}/holdings-storage/holdings/${holdingsId}", + "method": "GET", + "accept": "application/json" + }, + "inputVariables": [ + { + "key": "holdingsId", + "type": "PROCESS", + "spin": true + } + ], + "headerOutputVariables": [], + "outputVariable": { + "key": "holdingsResponse", + "type": "LOCAL", + "spin": true + }, + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessPUT.json b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessPUT.json new file mode 100644 index 00000000..ecf7a000 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessPUT.json @@ -0,0 +1,32 @@ +{ + "id": "6fff7df3-aaf4-4304-9080-eaa607b4521c", + "name": "Holdings Update Subprocess: Update Holdings", + "description": "Update the holdings object.", + "deserializeAs": "RequestTask", + "request": { + "url": "{{okapi-internal}}/holdings-storage/holdings/${holdingsId}", + "method": "PUT", + "contentType": "application/json", + "accept": "text/plain", + "bodyTemplate": "${holdings}" + }, + "inputVariables": [ + { + "key": "holdingsId", + "type": "PROCESS" + }, + { + "key": "holdings", + "type": "PROCESS", + "spin": true, + "asJson": true + } + ], + "headerOutputVariables": [], + "outputVariable": { + "key": "holdings", + "type": "PROCESS", + "spin": true + }, + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessProcessObj.json b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessProcessObj.json new file mode 100644 index 00000000..c9e06143 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessProcessObj.json @@ -0,0 +1,8 @@ +{ + "id": "88f811ec-2558-478b-a0b4-20132d74c02c", + "name": "Holdings Update Subprocess: Process GET", + "description": "Process holding object.", + "deserializeAs": "ScriptTask", + "scriptFormat": "javascript", + "code": "processHoldingUpdateSubprocessGETResponse.js" +} diff --git a/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessProcessPut.json b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessProcessPut.json new file mode 100644 index 00000000..b382982b --- /dev/null +++ b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessProcessPut.json @@ -0,0 +1,8 @@ +{ + "id": "2da06e4a-df13-475c-b197-4248a9e9f3ef", + "name": "Holdings Update Subprocess: Process Status of PUT request", + "description": "Process status of http PUT request.", + "deserializeAs": "ScriptTask", + "scriptFormat": "javascript", + "code": "holdingsUpdateSubprocessProcessPut.js" +} diff --git a/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessStart.json b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessStart.json new file mode 100644 index 00000000..6d12b94b --- /dev/null +++ b/withdraw-items-by-barcode/nodes/holdingsUpdateSubprocessStart.json @@ -0,0 +1,8 @@ +{ + "id": "45e3fdfe-a549-4ab5-92a9-84fc27bd6566", + "name": "Start Holdings Update Subprocess", + "description": "Start holdings subprocess update by holdingId.", + "type": "NONE", + "deserializeAs": "StartEvent", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/instanceUpdateSubprocess.json b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocess.json new file mode 100644 index 00000000..d20ea453 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocess.json @@ -0,0 +1,21 @@ +{ + "id": "4dd52dbc-b8b9-4b40-9d11-561d276c5b2c", + "name": "Instance Update Subprocess", + "description": "Subprocess to update instance based on instanceIds.", + "type": "EMBEDDED", + "deserializeAs": "Subprocess", + "nodes": [ + "{{mod-workflow}}/startEvent/2cbc346e-5d06-4003-ad92-89009596d661", + "{{mod-workflow}}/requestTask/41472d6a-2d29-4221-ad65-4b40449979e3", + "{{mod-workflow}}/scriptTask/5beed578-9f89-472b-a485-bdfef3196574", + "{{mod-workflow}}/requestTask/c113c3e3-8158-4670-a081-08dcc4f38e1b", + "{{mod-workflow}}/scriptTask/81fcc21b-d9e4-4125-9084-7a876b6c0c1a", + "{{mod-workflow}}/endEvent/7a3baf11-73bb-47b5-8b7e-73035f4578c3" + ], + "loopRef": { + "dataInputRefExpression": "${instanceIds.elements()}", + "inputDataName": "instanceId", + "parallel": false + }, + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessEnd.json b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessEnd.json new file mode 100644 index 00000000..6dd1a55e --- /dev/null +++ b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessEnd.json @@ -0,0 +1,8 @@ +{ + "id": "7a3baf11-73bb-47b5-8b7e-73035f4578c3", + "name": "End Instance Subprocess Edit", + "description": "Subprocess to end - edit instance based on instanceId.", + "type": "NONE", + "deserializeAs": "EndEvent", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessGET.json b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessGET.json new file mode 100644 index 00000000..ba818480 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessGET.json @@ -0,0 +1,25 @@ +{ + "id": "41472d6a-2d29-4221-ad65-4b40449979e3", + "name": "Instance Update Subprocess: Get Instance By Id", + "description": "Get instance by instance id.", + "deserializeAs": "RequestTask", + "request": { + "url": "{{okapi-internal}}/instance-storage/instances/${instanceId}", + "method": "GET", + "accept": "application/json" + }, + "inputVariables": [ + { + "key": "instanceId", + "type": "PROCESS", + "spin": true + } + ], + "headerOutputVariables": [], + "outputVariable": { + "key": "instanceResponse", + "type": "LOCAL", + "spin": true + }, + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessPUT.json b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessPUT.json new file mode 100644 index 00000000..d9501c0b --- /dev/null +++ b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessPUT.json @@ -0,0 +1,32 @@ +{ + "id": "c113c3e3-8158-4670-a081-08dcc4f38e1b", + "name": "Instance Update Subprocess: Update Instance", + "description": "Update the instance object.", + "deserializeAs": "RequestTask", + "request": { + "url": "{{okapi-internal}}/instance-storage/instances/${instanceId}", + "method": "PUT", + "contentType": "application/json", + "accept": "text/plain", + "bodyTemplate": "${instance}" + }, + "inputVariables": [ + { + "key": "instanceId", + "type": "PROCESS" + }, + { + "key": "instance", + "type": "PROCESS", + "spin": true, + "asJson": true + } + ], + "headerOutputVariables": [], + "outputVariable": { + "key": "instance", + "type": "PROCESS", + "spin": true + }, + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessProcessObj.json b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessProcessObj.json new file mode 100644 index 00000000..b3ae2a8c --- /dev/null +++ b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessProcessObj.json @@ -0,0 +1,8 @@ +{ + "id": "5beed578-9f89-472b-a485-bdfef3196574", + "name": "Instance Update Subprocess: Process Get Response.", + "description": "Process instaces GET response.", + "deserializeAs": "ScriptTask", + "scriptFormat": "javascript", + "code": "processInstanceUpdateSubprocessGETResponse.js" +} diff --git a/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessProcessPut.json b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessProcessPut.json new file mode 100644 index 00000000..fab7f049 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessProcessPut.json @@ -0,0 +1,8 @@ +{ + "id": "81fcc21b-d9e4-4125-9084-7a876b6c0c1a", + "name": "Instance Update Subprocess: Get PUT Status", + "description": "Get the status of the http PUT request.", + "deserializeAs": "ScriptTask", + "scriptFormat": "javascript", + "code": "instanceUpdateSubprocessProcessPut.js" +} diff --git a/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessStart.json b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessStart.json new file mode 100644 index 00000000..04d3e6b3 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/instanceUpdateSubprocessStart.json @@ -0,0 +1,8 @@ +{ + "id": "2cbc346e-5d06-4003-ad92-89009596d661", + "name": "Instance Update Subprocess: Start", + "description": "Start update instance by instanceIds.", + "type": "NONE", + "deserializeAs": "StartEvent", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/itemUpdateSubprocess.json b/withdraw-items-by-barcode/nodes/itemUpdateSubprocess.json new file mode 100644 index 00000000..35a5cf03 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/itemUpdateSubprocess.json @@ -0,0 +1,20 @@ +{ + "id": "8ece5df1-a7f3-40fb-87a7-882cb56d7f9e", + "name": "Item Update Subprocess", + "description": "Subprocess to update item by itemId.", + "type": "EMBEDDED", + "deserializeAs": "Subprocess", + "nodes": [ + "{{mod-workflow}}/startEvent/3b696f3d-c014-44fe-938f-a1e77de6ed0a", + "{{mod-workflow}}/requestTask/4a3460ab-87c8-4244-a429-2f78683a44e4", + "{{mod-workflow}}/scriptTask/8f7bd30e-c6d8-42f6-9f4e-6674d468e625", + "{{mod-workflow}}/requestTask/c47ebc65-b97e-4173-bde6-f7c7c478e412", + "{{mod-workflow}}/scriptTask/592c1281-355d-469d-91fd-884dea0be679", + "{{mod-workflow}}/endEvent/707505e5-a34b-4577-bf9d-5f55d2b59b23" + ], + "loopRef": { + "dataInputRefExpression": "${itemIds.elements()}", + "inputDataName": "itemId", + "parallel": false + } +} diff --git a/withdraw-items-by-barcode/nodes/itemUpdateSubprocessEnd.json b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessEnd.json new file mode 100644 index 00000000..2e80c983 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessEnd.json @@ -0,0 +1,8 @@ +{ + "id": "707505e5-a34b-4577-bf9d-5f55d2b59b23", + "name": "Item Update Subprocess: End", + "description": "Item update subprocess - end task for item update.", + "type": "NONE", + "deserializeAs": "EndEvent", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/itemUpdateSubprocessGET.json b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessGET.json new file mode 100644 index 00000000..6051d02d --- /dev/null +++ b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessGET.json @@ -0,0 +1,25 @@ +{ + "id": "4a3460ab-87c8-4244-a429-2f78683a44e4", + "name": "Item Update Subprocess: Get Item By Item Id", + "description": "Get item by itemId.", + "deserializeAs": "RequestTask", + "request": { + "url": "{{okapi-internal}}/inventory/items/${itemId}", + "method": "GET", + "accept": "application/json" + }, + "inputVariables": [ + { + "key": "itemId", + "type": "PROCESS", + "spin": true + } + ], + "headerOutputVariables": [], + "outputVariable": { + "key": "itemResponse", + "type": "LOCAL", + "spin": true + }, + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/itemUpdateSubprocessPUT.json b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessPUT.json new file mode 100644 index 00000000..f87eb40c --- /dev/null +++ b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessPUT.json @@ -0,0 +1,32 @@ +{ + "id": "c47ebc65-b97e-4173-bde6-f7c7c478e412", + "name": "Item Update Subprocess: Update Item", + "description": "Update the item.", + "deserializeAs": "RequestTask", + "request": { + "url": "{{okapi-internal}}/inventory/items/${itemId}", + "method": "PUT", + "contentType": "application/json", + "accept": "text/plain", + "bodyTemplate": "${item}" + }, + "inputVariables": [ + { + "key": "itemId", + "type": "PROCESS" + }, + { + "key": "item", + "type": "PROCESS", + "spin": true, + "asJson": true + } + ], + "headerOutputVariables": [], + "outputVariable": { + "key": "item", + "type": "PROCESS", + "spin": true + }, + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/itemUpdateSubprocessProcessObj.json b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessProcessObj.json new file mode 100644 index 00000000..4c3c6dba --- /dev/null +++ b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessProcessObj.json @@ -0,0 +1,8 @@ +{ + "id": "8f7bd30e-c6d8-42f6-9f4e-6674d468e625", + "name": "Process Item in Edit Item Subprocess", + "description": "Process item, setting properties as appropriate.", + "deserializeAs": "ScriptTask", + "scriptFormat": "javascript", + "code": "processItemUpdateSubprocessGETResponse.js" +} diff --git a/withdraw-items-by-barcode/nodes/itemUpdateSubprocessProcessPut.json b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessProcessPut.json new file mode 100644 index 00000000..cccd7c5a --- /dev/null +++ b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessProcessPut.json @@ -0,0 +1,8 @@ +{ + "id": "592c1281-355d-469d-91fd-884dea0be679", + "name": "Item Update Subprocess: Get PUT Status", + "description": "Get the status of the http PUT request for the item update.", + "deserializeAs": "ScriptTask", + "scriptFormat": "javascript", + "code": "itemUpdateSubprocessProcessPut.js" +} diff --git a/withdraw-items-by-barcode/nodes/itemUpdateSubprocessStart.json b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessStart.json new file mode 100644 index 00000000..e9fc9d05 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/itemUpdateSubprocessStart.json @@ -0,0 +1,8 @@ +{ + "id": "3b696f3d-c014-44fe-938f-a1e77de6ed0a", + "name": "Start Item Update Subprocess", + "description": "Start item subprocess update by itemId.", + "type": "NONE", + "deserializeAs": "StartEvent", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/js/buildQuery.js b/withdraw-items-by-barcode/nodes/js/buildQuery.js new file mode 100644 index 00000000..8ff83e90 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/js/buildQuery.js @@ -0,0 +1,28 @@ +var barcodeIdsJSONArray = JSON.parse(barcodes); + +var barcodeIds = ''; +for (var i = 0; i < barcodeIdsJSONArray.length; i++) { + if (i > 0) { + barcodeIds += ', '; + } + barcodeIds += '\'' + barcodeIdsJSONArray[i] + '\''; +} + +var from = 'folio_reporting.item_ext ie' + + '\n\tINNER JOIN folio_reporting.holdings_ext he ON he.holdings_id = ie.holdings_record_id' + + '\n\tINNER JOIN folio_reporting.instance_ext ie2 ON ie2.instance_id = he.instance_id'; + +var itemsHoldInstByBarcodeQuery = 'SELECT ie.barcode AS itemBarcode,' + + '\n\tie.item_id AS itemId,' + + '\n\the.holdings_id AS holdingsId,' + + '\n\tie2.instance_id AS instanceId' + + '\nFROM ' + from; +if (!!barcodeIds) { + itemsHoldInstByBarcodeQuery += '\nWHERE ie.barcode IN (' + barcodeIds + ')'; +} + +if (logLevel === 'DEBUG') { + print('\nitemsHoldInstByBarcodeQuery = ' + itemsHoldInstByBarcodeQuery + '\n'); +} + +execution.setVariableLocal('itemsHoldInstByBarcodeQuery', itemsHoldInstByBarcodeQuery); diff --git a/withdraw-items-by-barcode/nodes/js/buildWriteCSVObj.js b/withdraw-items-by-barcode/nodes/js/buildWriteCSVObj.js new file mode 100644 index 00000000..75c6343e --- /dev/null +++ b/withdraw-items-by-barcode/nodes/js/buildWriteCSVObj.js @@ -0,0 +1,18 @@ +var csvObj = JSON.parse(csvObjArray); +var barcodeStatusArray = [['Barcode', 'Status']]; + +if(!!csvObj) { + for (var i = 0; i < csvObj.length; i++) { + var barcodeStatus = [ + csvObj[i].itemBarcode.replace(/"/g, ''), + csvObj[i].instanceUpdateStatus || csvObj[i].holdingsUpdateStatus || csvObj[i].itemStatus || "Unknown" + ]; + barcodeStatusArray.push(barcodeStatus); + } +} + +if (logLevel === "DEBUG") { + print('\n\nBarcode & Status Array' + JSON.stringify(barcodeStatusArray)); +} + +execution.setVariable('barcodeStatusArray',S(JSON.stringify(barcodeStatusArray))); diff --git a/withdraw-items-by-barcode/nodes/js/convertCSVtoJSONArray.js b/withdraw-items-by-barcode/nodes/js/convertCSVtoJSONArray.js new file mode 100644 index 00000000..ab245750 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/js/convertCSVtoJSONArray.js @@ -0,0 +1,29 @@ +var MappingUtility = Java.type("org.folio.rest.camunda.utility.MappingUtility"); +var barcodesJSON = MappingUtility.mapCsvToJson(barcodesCSV); +var barcodesJSONArray = JSON.parse(barcodesJSON); + +var barcodes = []; + +if(!!barcodesJSONArray) { + for (var i = 0; i < barcodesJSONArray.length; i++) { + var keys = Object.keys(barcodesJSONArray[i]); + + if (keys.length > 0) { + if (barcodes.indexOf(keys[0]) === -1) { + barcodes.push(keys[0]); + } + var barcode = barcodesJSONArray[i][keys[0]]; + if (typeof barcode === 'string' && barcode.trim().length > 0) { + barcodes.push(barcode.trim()); + } + } + } +} + +if (logLevel === "DEBUG") { + print('\nbarcodes = ' + barcodes + '\n'); +} + +execution.setVariable('emailTo', emailTo); +execution.setVariable('note', note); +execution.setVariable('barcodes', S(JSON.stringify(barcodes))); diff --git a/withdraw-items-by-barcode/nodes/js/holdingsUpdateSubprocessProcessPut.js b/withdraw-items-by-barcode/nodes/js/holdingsUpdateSubprocessProcessPut.js new file mode 100644 index 00000000..145a1e3e --- /dev/null +++ b/withdraw-items-by-barcode/nodes/js/holdingsUpdateSubprocessProcessPut.js @@ -0,0 +1,30 @@ +var holdingsPutResponse = JSON.parse(holdings); +var holdingsUpdateStatus = ''; + +if (!!holdingsPutResponse) { + if (holdingsPutResponse.permanentLocationId === "dd55282c-bd64-4e1c-887d-ad0c8887bb69" && + holdingsPutResponse.discoverySuppress === true && + holdingsPutResponse.notes && Array.isArray(holdingsPutResponse.notes)) { + holdingsUpdateStatus = "Success"; + } else { + holdingsUpdateStatus = "Failed"; + } + +} + +var csvObj = JSON.parse(csvObjArray); + +if(!!csvObj) { + for (var i = 0; i < csvObj.length; i++) { + if (csvObj[i].holdingsId === holdingsPutResponse.id) { + csvObj[i].holdingsUpdateStatus = holdingsUpdateStatus; + break; + } + } +} + +if (logLevel === "DEBUG") { + print('\n\n CSVObjWithItemHoldingStatus' + JSON.stringify(csvObj)); +} + +execution.setVariable('csvObjArray', JSON.stringify(csvObj)); diff --git a/withdraw-items-by-barcode/nodes/js/instanceUpdateSubprocessProcessPut.js b/withdraw-items-by-barcode/nodes/js/instanceUpdateSubprocessProcessPut.js new file mode 100644 index 00000000..ea7cb66c --- /dev/null +++ b/withdraw-items-by-barcode/nodes/js/instanceUpdateSubprocessProcessPut.js @@ -0,0 +1,25 @@ +var instancePutResponse = JSON.parse(instance); +var instanceUpdateStatus = ''; + +if (!!instancePutResponse && (instancePutResponse.discoverySuppress === true ) ) { + instanceUpdateStatus = "Success"; + } else { + instanceUpdateStatus = "Failed"; + } + +var csvObj = JSON.parse(csvObjArray); + +if(!!csvObj) { + for (var i = 0; i < csvObj.length; i++) { + if (csvObj[i].instanceId === instancePutResponse.id) { + csvObj[i].instanceUpdateStatus = instanceUpdateStatus; + break; + } + } +} + +if (logLevel === "DEBUG") { + print('\n\n CSVObj With Item, Holding and Instance Status' + JSON.stringify(csvObj)); +} + +execution.setVariable('csvObjArray', JSON.stringify(csvObj)); diff --git a/withdraw-items-by-barcode/nodes/js/itemUpdateSubprocessProcessPut.js b/withdraw-items-by-barcode/nodes/js/itemUpdateSubprocessProcessPut.js new file mode 100644 index 00000000..ce7cf229 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/js/itemUpdateSubprocessProcessPut.js @@ -0,0 +1,33 @@ +var itemPutResponse = JSON.parse(item); +var itemStatus = ''; + +if (!!itemPutResponse) { + + if (itemPutResponse.status.name === "Withdrawn" && + itemPutResponse.temporaryLoanType.id === "e029dd79-1778-422c-b856-f0ac131f0369" && + itemPutResponse.discoverySuppress === true ) { + itemStatus = "Success"; + } else { + itemStatus = "Failed"; + } + +} + +var csvObj = JSON.parse(csvObjArray); + +if (!!csvObj) { + for (var i = 0; i < csvObj.length; i++) { + if (csvObj[i].itemBarcode === itemPutResponse.barcode && + csvObj[i].itemId === itemPutResponse.id && + itemStatus !== '') { + csvObj[i].itemStatus = itemStatus; + break; + } + } +} + +if (logLevel === "DEBUG") { + print('\n\n CSVObjWithItemStatus' + JSON.stringify(csvObj)); +} + +execution.setVariable('csvObjArray', JSON.stringify(csvObj)); diff --git a/withdraw-items-by-barcode/nodes/js/processHoldingUpdateSubprocessGETResponse.js b/withdraw-items-by-barcode/nodes/js/processHoldingUpdateSubprocessGETResponse.js new file mode 100644 index 00000000..1cebbbf3 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/js/processHoldingUpdateSubprocessGETResponse.js @@ -0,0 +1,32 @@ +var holdingsObj = JSON.parse(holdingsResponse); + +var extractResponseArray = function (response, key) { + return (!response || !response[key]) ? [] : response[key]; +}; + +if (!!holdingsObj) { + + var notes = extractResponseArray(holdingsObj, 'notes'); + + if (holdingsObj.hasOwnProperty('discoverySuppress')) { + holdingsObj.discoverySuppress = true; + } + + if (holdingsObj.hasOwnProperty('permanentLocationId') && holdingsObj.permanentLocationId) { + holdingsObj.permanentLocationId = "dd55282c-bd64-4e1c-887d-ad0c8887bb69"; + } + + if(!!holdingsObj.notes) { + notes.push({ + 'note': note + }); + holdingsObj.notes = notes; + } +} + +if (logLevel === "DEBUG") { + print('\nHolding = ' + S(JSON.stringify(holdingsObj))); +} + +execution.setVariable('holdings', S(JSON.stringify(holdingsObj))); +execution.setVariable('holdingsId', (!!holdingsObj && !!holdingsObj.id) ? holdingsObj.id : ''); diff --git a/withdraw-items-by-barcode/nodes/js/processInstanceUpdateSubprocessGETResponse.js b/withdraw-items-by-barcode/nodes/js/processInstanceUpdateSubprocessGETResponse.js new file mode 100644 index 00000000..fd9b23f8 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/js/processInstanceUpdateSubprocessGETResponse.js @@ -0,0 +1,12 @@ +var instanceObj = JSON.parse(instanceResponse); + +if (!!instanceObj) { + instanceObj.discoverySuppress = true; +} + +if (logLevel === "DEBUG") { + print('\nInstance = ' + S(JSON.stringify(instanceObj))); +} + +execution.setVariable('instance', S(JSON.stringify(instanceObj))); +execution.setVariable('instanceId', (!!instanceObj && !!instanceObj.id) ? instanceObj.id : ''); diff --git a/withdraw-items-by-barcode/nodes/js/processItemUpdateSubprocessGETResponse.js b/withdraw-items-by-barcode/nodes/js/processItemUpdateSubprocessGETResponse.js new file mode 100644 index 00000000..d555b541 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/js/processItemUpdateSubprocessGETResponse.js @@ -0,0 +1,23 @@ +var itemObj = JSON.parse(itemResponse); + +if (!!itemObj) { + if (itemObj.hasOwnProperty('discoverySuppress')) { + itemObj.discoverySuppress = true; + } + + if (itemObj.hasOwnProperty('temporaryLoanType') && itemObj.temporaryLoanType) { + itemObj.temporaryLoanType.id = "e029dd79-1778-422c-b856-f0ac131f0369"; + } + + if (itemObj.hasOwnProperty('status') && !itemObj.status) { + itemObj.status.name = "Withdrawn"; + } +} + +if (logLevel === 'DEBUG') { + print('\nItem = ' + S(JSON.stringify(itemObj))); +} + + +execution.setVariable('item', S(JSON.stringify(itemObj))); +execution.setVariable('itemId', (!!itemObj && !!itemObj.id) ? itemObj.id : ''); diff --git a/withdraw-items-by-barcode/nodes/js/processItemsHoldInsResponse.js b/withdraw-items-by-barcode/nodes/js/processItemsHoldInsResponse.js new file mode 100644 index 00000000..bfb7ac59 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/js/processItemsHoldInsResponse.js @@ -0,0 +1,59 @@ +var ihiArr = JSON.parse(itemsHoldInstByBarcodeResponse); + +var itemBarcodeArr = []; +var itemIdArr = []; +var holdingsIdArr = []; +var instanceIdArr = []; + +if(!!ihiArr) { + for (var key in ihiArr) { + for(var k in ihiArr[key]) { + switch (k) { + case 'itembarcode': + itemBarcodeArr.push(ihiArr[key][k]); + break; + case 'itemid': + itemIdArr.push(ihiArr[key][k]); + break; + case 'holdingsid': + holdingsIdArr.push(ihiArr[key][k]); + break; + case 'instanceid': + instanceIdArr.push(ihiArr[key][k]); + break; + default: + break; + } + } + } +} + +if (logLevel === 'DEBUG') { + print('\nitemBarcodeArr:' + itemBarcodeArr); + print('\nitemIdArr:' + itemIdArr); + print('\nholdingsIdArr:' + holdingsIdArr); + print('\ninstanceIdArr:' + instanceIdArr); +} + +execution.setVariable('itemBarcodes', S(JSON.stringify(itemBarcodeArr))); +execution.setVariable('itemIds', S(JSON.stringify(itemIdArr))); +execution.setVariable('holdingsIds', S(JSON.stringify(holdingsIdArr))); +execution.setVariable('instanceIds', S(JSON.stringify(instanceIdArr))); + +var csvObjArray = []; + +for (var i = 0; i < itemBarcodeArr.length; i++) { + var csvObj = { + itemBarcode: itemBarcodeArr[i], + itemId: itemIdArr[i], + holdingsId: holdingsIdArr[i], + instanceId: instanceIdArr[i] + }; + csvObjArray.push(csvObj); +} + +if (logLevel === 'DEBUG') { + print('\n\n csvObjArray' + JSON.stringify(csvObjArray)); +} + +execution.setVariable('csvObjArray', S(JSON.stringify(csvObjArray))); diff --git a/withdraw-items-by-barcode/nodes/login.json b/withdraw-items-by-barcode/nodes/login.json new file mode 100644 index 00000000..70f521b6 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/login.json @@ -0,0 +1,35 @@ +{ + "id": "860ab6d6-ae0c-4756-8e8f-3678ce99e4f1", + "name": "Login", + "description": "Get Login Token.", + "deserializeAs": "RequestTask", + "request": { + "url": "{{okapi}}/authn/login", + "method": "POST", + "contentType": "application/json", + "accept": "application/json", + "bodyTemplate": "{\"username\": \"${username}\",\"password\": \"${password}\"}" + }, + "inputVariables": [ + { + "key": "username", + "type": "PROCESS" + }, + { + "key": "password", + "type": "PROCESS" + } + ], + "headerOutputVariables": [ + { + "key": "X-Okapi-Token", + "type": "PROCESS" + } + ], + "outputVariable": { + "key": "loginResponse", + "type": "PROCESS" + }, + "asyncBefore": true +} + diff --git a/withdraw-items-by-barcode/nodes/processItemHoldingInstanceResponse.json b/withdraw-items-by-barcode/nodes/processItemHoldingInstanceResponse.json new file mode 100644 index 00000000..8f51d207 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/processItemHoldingInstanceResponse.json @@ -0,0 +1,8 @@ +{ + "id": "3f689d96-30b3-4623-b27f-6ff24bd9e788", + "name": "Process Items, Holdings and Instances", + "description": "Process items, holdings, and instances response for okapi update.", + "deserializeAs": "ScriptTask", + "scriptFormat": "javascript", + "code": "processItemsHoldInsResponse.js" +} diff --git a/withdraw-items-by-barcode/nodes/query.json b/withdraw-items-by-barcode/nodes/query.json new file mode 100644 index 00000000..569541d9 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/query.json @@ -0,0 +1,19 @@ +{ + "id": "5c0a7542-bb8b-4277-ae0e-127a692d0d19", + "name": "Query Items By Barcode", + "description": "Query items, corresponding holdings and instances.", + "deserializeAs": "DatabaseQueryTask", + "inputVariables": [ + { + "key": "itemsHoldInstByBarcodeQuery", + "type": "LOCAL" + } + ], + "outputVariable": { + "key": "itemsHoldInstByBarcodeResponse", + "type": "LOCAL" + }, + "designation": "ldp", + "query": "${itemsHoldInstByBarcodeQuery}", + "asyncBefore": true +} diff --git a/withdraw-items-by-barcode/nodes/readCSV.json b/withdraw-items-by-barcode/nodes/readCSV.json new file mode 100644 index 00000000..6847c048 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/readCSV.json @@ -0,0 +1,21 @@ +{ + "id": "da587fc0-a95c-4149-b1de-3edba2c4ef3f", + "name": "Read Barcode CSV", + "description": "Read barcodes from csv file.", + "deserializeAs": "FileTask", + "inputVariables": [ + { + "key": "inputFilePath", + "type": "PROCESS" + } + ], + "outputVariable": { + "key": "barcodesCSV", + "type": "PROCESS", + "asTransient": true + }, + "path": "${inputFilePath}", + "op": "READ", + "asyncBefore": true +} + diff --git a/withdraw-items-by-barcode/nodes/start.json b/withdraw-items-by-barcode/nodes/start.json new file mode 100644 index 00000000..f8c14496 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/start.json @@ -0,0 +1,9 @@ +{ + "id": "9b59cb90-6232-40a1-aa9a-0d9eca741f83", + "name": "Start Withdraw Items By Barcode", + "description": "Workflow to email list of items withdrawn by barcode.", + "type": "MESSAGE_CORRELATION", + "deserializeAs": "StartEvent", + "expression": "/events/workflow/withdraw-items-by-barcode/start" +} + diff --git a/withdraw-items-by-barcode/nodes/writeCSV.json b/withdraw-items-by-barcode/nodes/writeCSV.json new file mode 100644 index 00000000..fece3e67 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/writeCSV.json @@ -0,0 +1,25 @@ +{ + "id": "1b41e9e4-9709-4df0-9d82-4d8ad109b636", + "name": "Write Barcodes and Status", + "description": "Write barcodes and the corresponding update status to CSV.", + "deserializeAs": "FileTask", + "inputVariables": [ + { + "key": "barcodeStatusArray", + "type": "PROCESS", + "spin": true + }, + { + "key": "timestamp", + "type": "PROCESS" + } + ], + "outputVariable": {}, + "target": "barcodeStatusArray", + "path": "/mnt/workflows/tamu/withdraw-items-by-barcode/withdraw-items-by-barcode-${timestamp}.csv", + "op": "WRITE", + "asyncBefore": true +} + + + diff --git a/withdraw-items-by-barcode/nodes/zipReport.json b/withdraw-items-by-barcode/nodes/zipReport.json new file mode 100644 index 00000000..94dae9d1 --- /dev/null +++ b/withdraw-items-by-barcode/nodes/zipReport.json @@ -0,0 +1,19 @@ +{ + "id": "23b15d29-0f7a-40c5-b670-fb71db0456e8", + "name": "Compress Book Report", + "description": "Compress withdraw items by barcode report in a ZIP format.", + "deserializeAs": "CompressFileTask", + "inputVariables": [ + { + "key": "timestamp", + "type": "PROCESS" + } + ], + "outputVariable": {}, + "source": "/mnt/workflows/tamu/withdraw-items-by-barcode/withdraw-items-by-barcode-${timestamp}.csv", + "destination": "/mnt/workflows/tamu/withdraw-items-by-barcode/wibb-report-${timestamp}.zip", + "format": "ZIP", + "container": "NONE", + "asyncBefore": true +} + diff --git a/withdraw-items-by-barcode/setup.json b/withdraw-items-by-barcode/setup.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/withdraw-items-by-barcode/setup.json @@ -0,0 +1 @@ +{} diff --git a/withdraw-items-by-barcode/triggers/startTrigger.json b/withdraw-items-by-barcode/triggers/startTrigger.json new file mode 100644 index 00000000..d2ac2795 --- /dev/null +++ b/withdraw-items-by-barcode/triggers/startTrigger.json @@ -0,0 +1,10 @@ +{ + "id": "9635e2ad-7f71-4ef1-be83-869f29a28893", + "name": "FOLIO Withdraw Items By Barcode Workflow", + "description": "Trigger to start withdraw items by barcode.", + "type": "MESSAGE_CORRELATE", + "method": "POST", + "deserializeAs": "EventTrigger", + "pathPattern": "/events/workflow/withdraw-items-by-barcode/start" +} + diff --git a/withdraw-items-by-barcode/workflow.json b/withdraw-items-by-barcode/workflow.json new file mode 100644 index 00000000..03fad63f --- /dev/null +++ b/withdraw-items-by-barcode/workflow.json @@ -0,0 +1,35 @@ +{ + "id": "3a873639-6fff-479e-97bb-09e0b0e3e6a4", + "name": "Withdraw Items By Barcode", + "description": "Send email containing a list of items withdrawn by barcode and their status.", + "versionTag": "1.0", + "historyTimeToLive": 90, + "deploymentId": null, + "active": false, + "setup": { + "asyncBefore": false, + "asyncAfter": false + }, + "nodes": [ + "{{mod-workflow}}/startEvent/9b59cb90-6232-40a1-aa9a-0d9eca741f83", + "{{mod-workflow}}/fileTask/da587fc0-a95c-4149-b1de-3edba2c4ef3f", + "{{mod-workflow}}/scriptTask/4a33bef3-4f5e-45ac-bb8a-2c376cb02cf9", + "{{mod-workflow}}/databaseConnectionTask/eca47911-5825-42d6-9e70-a0683674821d", + "{{mod-workflow}}/scriptTask/571d831b-7089-44b0-8d45-d48ea2639a55", + "{{mod-workflow}}/databaseQueryTask/5c0a7542-bb8b-4277-ae0e-127a692d0d19", + "{{mod-workflow}}/scriptTask/3f689d96-30b3-4623-b27f-6ff24bd9e788", + "{{mod-workflow}}/databaseDisconnectTask/21e28faf-4f86-45aa-b37b-c75452b4dc43", + "{{mod-workflow}}/requestTask/860ab6d6-ae0c-4756-8e8f-3678ce99e4f1", + "{{mod-workflow}}/subprocess/8ece5df1-a7f3-40fb-87a7-882cb56d7f9e", + "{{mod-workflow}}/subprocess/31e32bbe-1c40-4dc9-b395-cc37acd7d6b8", + "{{mod-workflow}}/subprocess/4dd52dbc-b8b9-4b40-9d11-561d276c5b2c", + "{{mod-workflow}}/scriptTask/90cacb73-553b-4ee5-8a30-ebddeab9c66f", + "{{mod-workflow}}/fileTask/1b41e9e4-9709-4df0-9d82-4d8ad109b636", + "{{mod-workflow}}/compressFileTask/a91519c4-d65b-46f7-90ab-999342cd0fe5", + "{{mod-workflow}}/emailTask/8e5b3afb-b48e-4647-8865-604778b45ff7", + "{{mod-workflow}}/fileTask/af3e11c4-2e8b-4839-a066-1a1453533846", + "{{mod-workflow}}/fileTask/90ef5596-41c5-4773-a51d-031ead77c1a7", + "{{mod-workflow}}/endEvent/b1bc69f5-20ca-446c-ba7b-7c53d8ce8447" + ], + "initialContext": {} +}