Invalid scope (should be exclusive or shared)
The scope parameter to xdmp:lock-acquire is not one of "shared" or "exclusive".
xdmp:lock-acquire
Correct your code.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.