Symptoms
Cancellation orders were stuck in "Checking provisioning conditions" status. 

Cause

The CF order type in the provided order flow has status RB, from which there is no transitions at all. But in accordance with design the transition from status PF to status RB should exist. The upgrade script added such transition. But there is no transitions from status RB here.


Resolution

In order to solve this problem there are 2 ways:

1. For this custom order flow for CF order type change transition PF->RB to PF->PR in database. And move CF order from status RB to status PR. Then this order should be cancelled automatically.


2. Configure CF order flow for statuses RB, AD, CT, TW, TP, TS, TF just like in the default order flow. This way is more correct.


In order to add new statuses and their transitions, complete the following actions:


1. Log in to PCP > Billing > Settings > Order Processing > All Order Flows and click the required order flow and then the required order type. i.e "Order Flow #2000001" and "Order Type CF"


2. In the Order Statuses tab, add new statuses. Flags for them can be taken from the status before which new statuses are added, or from the same statuses from the default order flow.


For Order Statuses :

  1. Order Status - RB
    Description - Checking provisioning conditions
    Order is visible to - Vendor and Provider
    Is Editable - Yes
    Is Addable - Yes
    Is Deletable - Yes
    Is Payable - Yes
    Is included in Order Balance - Yes
    Prohibit Order Placing - All Order Types (Per Subscription)
  2. Order Status - AD
    Description - Applying Credit Documents to Reseller-level Transactions
    Vendor Warning - @@LastOrderProcessingError@
    Order is visible to - Vendor and Provider
    Is Editable - Yes
    Is Addable - Yes
    Is Deletable - Yes
    Is Payable - Yes
    Is included in Order Balance - Yes
    Prohibit Order Placing - All Order Types (Per Subscription)
  3. Order Status - CT
    Description - Automatic Payment Creation for Reseller
    Vendor Warning - @@LastOrderProcessingError@
    Order is visible to - Vendor and Provider
    Is Editable - Yes
    Is Addable - Yes
    Is Deletable - Yes
    Is Payable - Yes
    Is included in Order Balance - Yes
    Prohibit Order Placing - All Order Types (Per Subscription)
  4. Order Status - TW
    Description - Automatic Payment for Reseller is Waiting for Completion
    Vendor Warning - @@LastOrderProcessingError@
    Order is visible to - Vendor and Provider
    Is Editable - Yes
    Is Addable - Yes
    Is Deletable - Yes
    Is Payable - Yes
    Is included in Order Balance - Yes
    Prohibit Order Placing - All Order Types (Per Subscription)
  5. Order Status - TP
    Description - Reseller Balance Reservation in External System: Waiting for Asynchronous Response
    Vendor Warning - @@LastOrderProcessingError@
    Order is visible to - Vendor and Provider
    Is Editable - Yes
    Is Addable - Yes
    Is Deletable - Yes
    Is Payable - Yes
    Is included in Order Balance - Yes
    Prohibit Order Placing - All Order Types (Per Subscription)
    Customer can cancel Order - Yes
  6. Order Status - TS
    Description - Reseller Balance Reservation in External System: Processing Response
    Vendor Warning - @@LastOrderProcessingError@
    Order is visible to - Vendor and Provider
    Is Editable - Yes
    Is Addable - Yes
    Is Deletable - Yes
    Is Payable - Yes
    Is included in Order Balance - Yes
    Prohibit Order Placing - All Order Types (Per Subscription)
    Customer can cancel Order - Yes
  7. Order Status - TF
    Description - Reseller Balance Reservation in External System: Rejected
    Vendor Warning - @@LastOrderProcessingError@
    Order is visible to - Vendor and Provider
    Is Editable - Yes
    Is Addable - Yes
    Is Deletable - Yes
    Is Payable - Yes
    Is included in Order Balance - Yes
    Prohibit Order Placing - All Order Types (Per Subscription)
    Customer can cancel Order - Yes


3. In the Order Flow Transitions tab, add their transitions. The new statuses must have the following transitions.


Order Flow Transition 'AD' -> 'PR' -> 'CT' :

  1. From - AD
  2. Success - PR
  3. Fail - CT
  4. Order Flow Handler - Empty/Null
  5. Transition Type - On Event
  6. Action - Apply Credit Documents


Order Flow Transition 'CT' -> 'TW' -> 'TS' :

  1. From - CT
  2. Success - TW
  3. Fail - TS
  4. Order Flow Handler - BM OF_CreateTopUpPayments
  5. Transition Type - Auto
  6. Action - Create Auto-Payments


Order Flow Transition 'RB' -> 'AD' -> 'RB' :

  1. From - RB
  2. Success - AD
  3. Fail - RB
  4. Order Flow Handler - BM OF_CreateResellerTransactions
  5. Transition Type - On Event
  6. Action - Create Reseller-level Transactions


Order Flow Transition 'TF' -> 'CL' -> 'TF' :

  1. From - TF
  2. Success - CL
  3. Fail - TF
  4. Order Flow Handler - BM OF_CancelOrder
  5. Transition Type - Manual
  6. Action - Cancel Order


Order Flow Transition 'TF' -> 'CT' -> 'TF' :

  1. From - TF
  2. Success - CT
  3. Fail - TF
  4. Order Flow Handler - Empty/Null 
  5. Transition Type - Manual 
  6. Action - Check Balance and Create Auto-Payment for Reseller


Order Flow Transition 'TP' -> 'CL' -> 'TP' :

  1. From - TP
  2. Success - CL
  3. Fail - TP
  4. Order Flow Handler - BM OF_CancelOrder
  5. Transition Type - Manual
  6. Action - Cancel Order


Order Flow Transition 'TP' -> 'CT' -> 'TP' :

  1. From - TP
  2. Success - CT
  3. Fail - TP
  4. Order Flow Handler - Empty/Null
  5. Transition Type - Manual
  6. Action - Check Balance and Create Auto-Payment for Reseller


Order Flow Transition 'TS' -> 'TP' -> 'TF' :

  1. From - TS
  2. Success - TP
  3. Fail - TF
  4. Order Flow Handler - BM OF_IsBalanceReservationInProgress
  5. Transition Type - Auto
  6. Action - Check Reseller Balance Reservation Status


Order Flow Transition 'TW' -> 'AD' -> 'TW' :

  1. From - TW
  2. Success - AD
  3. Fail - TW
  4. Order Flow Handler - BM OF_WaitForPaymentsCompletion
  5. Transition Type - On Event
  6. Action - Check Auto-Payment Completion


Re-submit provisioning for hanging orders.