We're starting to use a request type at Lehigh that we've never used before – the Page/Delivery Request. Our circulation folks want it to work like this:
When the request comes in, they go get the item off the shelf
They scan it's barcode back at the circulation desk on the "Return" screen, as if the item has just been checked in.
When the item is scanned, a notice should go out to the patron who requested it saying that the request has been processed and the item is out for delivery.
This is all very similar to the workflow that we have for Page/Hold requests, which are held at the desk for the user to come pick up. The rule title "Place Request for accept item" in our place-request.drl rules file works fine. I started with that rule, copied it to a new rule named "Place request for page delivery", then changed the request type code, desired patron types, and desired item types appropriately in the "when" clause according to what our circulation folks told me. In the "then" clause, I made more changes. I changed the "requestExpirationDays" to 5 because that's what the circulation folks told me to it should be. I changed the value in "setNoticeType" from NOTICE_RECALL to ONHOLD_NOTICE. I removed the lines about the "Recall Notice", "minimumLoanPeriod", "recallLoanPeriod", "On Hold Courtesy Notice", and "On Hold Expiration Notice" because they don't apply to a Page/Delivery request – there is no recall or recall notice, and no on hold courtesy or hold expiration notice for this request type. I did add an "ON_HOLD_NOTICE_CONTENT_CONFIG_NAME" to the drools response, and used a content configuration name that I created – "Delivery Request Notice". This content configuration exists in our OLE database and has notice type "OnHoldNotice". The notice type is misleading since the notice isn't actually for a Hold request, but it should work within the existing workflow so that the notice should go out when the staff scan the item at the desk from the "Return" screen. I then restarted OLE on our test server to make sure the rules change took effect.
When I created a request of this type, the only notice created in the notices table was the expiration notice. The expiration notice was for 5 days in the future, so it seems my new rule was used to created it, but the on-hold notice was not created as I expected. An on-hold notice is created for Page/Hold requests. I tried putting back everything I took out of the "Place request for accept item" rule, and I tried changing the value passed to setNoticeType to "NOTICE_RECALL", but these changes had no effect. No on-hold notice was created when I created a "Page/Delivery Request". I've attached the place-request.drl file with the "Place Request for page delivery" rule written as I thought it should be. Please help me figure out how to write this rule to get the desired result. Thanks!