standard_billing_validation
Purpose
The purpose of the rule is to ensure that there is some good status data(has status = measured or estimated) for billing determinants calculation. The rule cancels the flow in case all data is missing or there is at least one datapoint without good status.
Detailed description
- Check if any channel in the billing request, defined in the flow properties, is fully missing
- if yes, cancel the flow (FlowCancelException).
- Get all status columns from self.dataframe .
- Loop through each column and check
- if all rows =
measuredorestimated, continue to the next column. - if at least one row ≠
measuredorestimated, cancel the flow (FlowCancelException).
Common use cases
The rule is used in billing or other flows to be sure that the data to be processed is with a good status (measured or estimated).