Skip to content

Approval Rules

Approval Rules

Command Description
getApproverRules [options] list all the rules for auto approval
setApproverRules [options] set a new rule for auto approval
deleteApproverRules [options] deleted a rule for auto approval

Approver rules automate the approval or rejection of proposals (manifests). Rules are read in priority order (highest first) and each transaction in the manifest is submitted to the JEXL script in the Text property. If, the JEXL script returns ACCEPT, the transaction will be automatically approved. If it returns REJECT it will be automatically rejected. If it returns MANUAL, it will be held for manual approval. If none of the rules return anything, the transaction will be automatically accepted.

ledgerswarm getApproverRules

ledgerswarm help getApproverRules

Imag1

ledgerswarm getApproverRules -d table

Imag1

ledgerswarm setApproverRules

ledgerswarm help setApproverRules

Imag1

ledgerswarm setApproverRules -n Dozens -p 100 -t 'if(amount == 12) { return MANUAL; }'

This will set up a rule to force a manual approval if the amount of the transaction is equal to 12.

ledgerswarm deleteApproverRules

ledgerswarm help deleteApproverRules

Imag1

ledgerswarm deleteApproverRules -i 11

This will delete the approver rule with id 11.