These are methods for approving or declining an order programmatically.
Advances an order from its current step. All documents subject to the current steps must have an ApprovalAction object passed in for them or an error will occur.
Method
AdvanceApproval(string OrderID, ReviewAction[] Actions, userID)
Parameters
■ OrderID — Internal order identifier whose approval you want to advance.
■ Actions — Array of ApprovalAction objects which specify whether the document is approved or rejected and, optionally, a comment.
■ userID — Internal user identifier that will be recorded as the reviewer. Can be null.
Returns
None
Remarks
Can only be called after the order is placed. This call mimics an approver user taking action on the current step. To find out details on the current approval step you can use the OrderProperty CurrentStepID to get the ID of the current step and then use the SINI call GetApprovalStep to retrieve the list of documents and reviewers assigned to the current step.
ApproveOrder (deprecated)
Note: This event has been deprecated. Use AdvanceApproval() call instead (described above).
Approve an order, just as if a reviewer clicked on Approve in the Approvals Review page.
Method
int ApproveOrder(string orderID,
string orderComment,
KeyValuePair[] documentComments)
Parameters
■ orderID — Internal order identifier
■ orderComment — Comment to associate with the order.
■ documentComments — Comments to associate with the documents contained in the order; the Name field of each KeyValuePair should contain the internal document identifier of a document in the order, and the Value field should contain the Reviewer’s comment for that document.
Returns
Returns eInvalidValue if the user does not require approval, or if the order has already been approved or declined.
DeclineOrder (deprecated)
Since version 2.5
Note: This event has been deprecated. Use AdvanceApproval() call instead (described above).
Declines an order, just as if a reviewer clicked on Decline in the Approvals Review page.
Method
int DeclineOrder(string orderID,
string orderComment,
KeyValuePair[] documentComments)
Parameters
■ orderID — Internal order identifier
■ orderComment — Comment to associate with the order.
■ documentComments — Comments to associate with the documents contained in the order; the Name field of each KeyValuePair should contain the internal document identifier of a document in the order, and the Value field should contain the Reviewer’s comment for that document.
Returns
Returns eInvalidValue if the user does not require approval, or if the order has already been approved or declined.
Since version 7.5
This method can query any order for all ApprovalEvents associated with the order.
Method
(ApprovalEventEntry[])GetApprovalEvents(string OrderID);
Parameters
■ OrderID — Internal order identifier whose Approval Events you wish to retrieve.
Returns
An array of ApprovalEventEntry objects for an order.
Remarks
See the “Classes and Properties” section for the definition of the ApprovalEventEntry class.
This method can retrieve any specific ApprovalStep.
Method
(ApprovalStep)GetApprovalStep(string ApprovalStepID)
Parameters
■ ApprovalStepID — The id of the ApprovalStepID you wish to retrieve.
Returns
An ApprovalStep object. This call is used most often with the OrderProperty CurrentStepID to get the ID of the current step or a particular order.
Remarks
See the “Classes and Properties” section for the definition of the ApprovalStep class.
This method can query any order for all ApprovalSteps associated with the order.
Method
(ApprovalStep[])GetApprovalSteps(string OrderID)
Parameters
■ OrderID—Internal order identifier whose Approval Steps you wish to retrieve.
Returns
An array of ApprovalStep objects associated with the order.
Remarks
See the “Classes and Properties” section for the definition of the ApprovalStep class.