Enum Class RebateRecordStatus
- All Implemented Interfaces:
Serializable,Comparable<RebateRecordStatus>,Constable
The status is in the status field. The platform sets it when the record goes through its approval
workflow, when a user revokes it, and when its Rebate Agreement is revoked or replaced by a revision. A new record
is DRAFT. Submitting it makes it SUBMITTED, and approval makes it APPROVED. Only a
record in DRAFT can be edited.
The agreementStatus field of the record holds the status of its Rebate Agreement
(RebateAgreementStatus). A change of the agreement updates agreementStatus on every linked record,
but it does not change the status of an approved Rebate Record. This does not apply to Rebate Record Groups:
revoking the agreement makes every group REVOKED, approved ones included, and undoing the revocation makes
every group APPROVED, whatever its status was before. The Rebate Record logic decides which combinations of
the two statuses are valid.
Example, select the approved Rebate Records of a Rebate Record Set:
import net.pricefx.common.api.RebateRecordStatus
def q = api.queryApi()
def t = q.tables().rebateRecords(17)
return q.source(t, [t.uniqueName(), t.status(), t.agreementStatus()],
t.status().equal(RebateRecordStatus.APPROVED))
.stream { it.collect { it } }
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe approval workflow approved the record, or the workflow had no approval steps.The record is new, or its approval was withdrawn or denied.A revision of the Rebate Agreement was approved while the record was not approved.A user revoked the record or its Rebate Record Group, or its Rebate Agreement was revoked.The record was submitted and is in its approval workflow. -
Method Summary
Modifier and TypeMethodDescriptionstatic RebateRecordStatusReturns the enum constant of this class with the specified name.static RebateRecordStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.booleanWhether a record reaching this status is no longer open for approval, so that a pending approval of it has to be invalidated and its approve/deny refused.
-
Enum Constant Details
-
DRAFT
The record is new, or its approval was withdrawn or denied. Only a record in this status can be edited. -
SUBMITTED
The record was submitted and is in its approval workflow. -
APPROVED
The approval workflow approved the record, or the workflow had no approval steps. Undoing the revocation of a Rebate Record or a Rebate Record Group returns it to this status. Undoing the revocation of the Rebate Agreement returns its revoked Rebate Records toDRAFTinstead, and its Rebate Record Groups to this status. Only an approved record can be revoked on its own. -
REVOKED
A user revoked the record or its Rebate Record Group, or its Rebate Agreement was revoked. When the agreement is revoked, every Rebate Record Group changes to this status, but a Rebate Record changes only if it is not approved. In that case a pending approval workflow of the record or group is cancelled. Revoking a Rebate Record Group changes all its Rebate Records to this status, whatever their status, and does not cancel their workflows. -
INVALIDATED
A revision of the Rebate Agreement was approved while the record was not approved. A pending approval workflow of the record is cancelled.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
voidsPendingApproval
public boolean voidsPendingApproval()Whether a record reaching this status is no longer open for approval, so that a pending approval of it has to be invalidated and its approve/deny refused.- Returns:
trueforREVOKEDandINVALIDATED,falsefor the other statuses
-