Before the upgrade of an order flow the pre-check script is run automatically. This pre-check script checks existing order flows for a possible upgrade. The following checks are performed:

  • Whether identifiers of new order flow handlers already exist and contain different methods. In this case, the pre-check script writes this inconsistency into a log file.
  • Whether “EC” status already exists for “SO” order. Refer to https://cloudblue.freshdesk.com/support/solutions/articles/44001910499
  • Whether “AP”, “AU” statuses already exist and have incorrect handlers for “SO” order. In this case, the pre-check script writes this inconsistency into a log file.
  • Whether “AP” status already exists but status "AU" doesn't “SO” order. In this case, the pre-check script writes this inconsistency into a log file.
  • Whether “AU” status already exists but status "AP" doesn't “SO” order. In this case, the pre-check script writes this inconsistency into a log file.

If the precheck script fails or founds any inconsistencies, perform the following actions:

  1. Ensure that the following identifiers exist in the “FlowHandler” table: 151, 152. If there are no such identifiers, add them or replace the incorrect identifiers with the correct ones using the move_old_handlers.py script. To use this script, copy it to the billing application node and run.
  2. Fix inconsistencies found by precheck in custom order flows. Use the default order flow as an example.
    • If order flow already has “AP” and “AU” statuses, rename them using the interactive rename-status.py script. Note that this script does not change the default record in the “OrderOperation” table. If you want to rename the initial status of an order flow, this record must be updated manually and with care. 
    • Make sure to perform the steps from https://cloudblue.freshdesk.com/support/solutions/articles/44001910499 and configure the order flow in accordance with this article.
      If these steps did not help, configure the order flow after the upgrade:
      • Insert new status transition AP -> AU before the EC status for “SO” orders. The flow must be as follows:
        AP -> AU -> EC.
      • Add the following handlers to the new statues:
        • AP: 'OF_FinishProvisioningSO'
        • AU: 'OF_FinishProvisioningSOForUpgradeOItems'
    • To add new statuses and their transitions, complete these steps:
      1. Log in to the PCP, go to Billing > Settings > Order Processing > All Order Flows and click the required order flow, and then the required order type.
      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.
      3. In the Order Flow Transitions tab, add their transitions. The new statuses must have the following transitions (you can copy them from the default order flow):
        For “SO” orders:
        • From: "AP"; Success: "AU"; Fail: "AP"; Action: "Start Subscription"; Order Flow Handler: "OF_FinishProvisioningSO"; Transition Type: "On Event"
        • From: "AU"; Success: "EC"; Fail: "AU"; Action: "Finish Provisioning"; Order Flow Handler: "OF_FinishProvisioningSOForUpgradeOItems"; Transition Type: "On Event"
          If you have any customized transitions, you must update them too. If an order flow still cannot be modified, send its copy to the support team for investigation.
          The "EC" status must already exist, refer to https://cloudblue.freshdesk.com/support/solutions/articles/44001910499 for details.
  3. Run the upgrade script.