Input Flow

1. Overview

The Input Flow provisions a CPE from a provisioning request. It is the main flow of the Provision Portal. The Single device tab, the Multiple device tab, ProvisioningForDevice and ProvisioningForDevices start the Input Flow. The /provision/* REST endpoints also start the Input Flow. For the full list, see Flows and Entry Points.

provisioningStarter receives the request. It runs the Input Flow once for each CPE of the request. The Business Process Model and Notation (BPMN) process of the Input Flow is inputFlowV3 in inputFlowV3.bpmn. For the processing modes, see Batch Processing.

For one CPE, the Input Flow does these steps:

  1. Saves the request data to the provision database (provision DB).

  2. Finds the CPE in the ACS or creates the CPE. Updates the device info and the domain.

  3. Collects the objects, standalone services and parameters.

  4. Creates or updates the objects and sub-objects on the CPE.

  5. Sets the non-object parameters.

  6. Waits for the ACS tasks, reboots the CPE on request and writes the final status.

The options Delete previous, Current only, Reprovision, Secondary provision and Reboot change the path. See Common Options.

2. Flow Diagram

The numbers in the circles are status codes. For their meaning, see Status Codes Reference.

Input Flow page 1
Figure 1. Input Flow, page 1: provision DB update and CPE search in the ACS
Input Flow page 2
Figure 2. Input Flow, page 2: objects and standalone services
Input Flow page 3
Figure 3. Input Flow, page 3: new and existing objects, sub-objects
Input Flow page 4
Figure 4. Input Flow, page 4: non-object parameters, task results and reboot

2.1. Differences from the Diagram

The portal differs from the diagram in these places:

  • Waiting for task results (1880 and 1890, 1930 and 195, 2940 and 2950, 1980 and 1990, 2350 and 2460): the diagram ends every timeout with the timeout code and needs Completed tasks != 0 for success. At the timeout, the portal writes the failure code (1890, 195, 2950, 1990, 2460) if a task failed or was rejected. It writes the timeout code (1880, 1930, 2940, 1980, 2350) only if tasks are still pending. A transaction with all counts 0 is polled until the timeout and then counts as completed.

  • Second parameter call for an existing instance (293, 295, 2950): after status 194 the diagram always sets the remaining parameters. The portal sets them only if the object has more than one parameter. With one parameter, the flow continues after 194 without 293 and 295.

  • New object without waiting (180, 305): the diagram goes to the next object. For an object with sub-objects, the portal still calls FTGetDeviceParametersByTransID. If the ACS answers with parameters, the portal creates the sub-objects and writes no 801 or 804.

  • SN added to the records of the MAC address (177, 1770): the diagram writes 1770 if the update of the records fails. If the update fails, the portal still writes 177, ends the flow there and writes no 1770.

  • Objects without a match left (182): the diagram continues with the non-object parameters after status 182. The portal does this only if the request or the provision DB has no objects at all. If it has objects, but none is left after the matching with Objects.xml, the portal writes 182, 183 and the online status, and the flow ends with status 1840.

  • Instance lookup for sub-objects (8040, 8050, 8080): the diagram ends the flow if the ACS answers FTGetDeviceParametersByTransID with an error code. The portal ends the flow with the failure code only if the call itself fails. With an error code, the portal creates no sub-objects of a new object and writes no code. For an existing object, the portal writes 804 (805, 808) and processes the sub-objects under the instance of the existing object.

  • Reboot of an offline CPE (168, 1680): the diagram calls FTRPCInvoke and writes 1680 if the call fails. The portal sends the call in the background and writes 168 and 247 at once. It writes 1680 only if it cannot start the call.

3. Steps

3.1. Save the Request to the Provision DB

A single-device request with XML that cannot be read, also an empty one (an empty SOAP xmlData tag, an empty REST body), provisions no CPE. The answer has Result 200, the Bid 00000000-0000-0000-0000-000000000000, no Message and no Status; the REST answer has HTTP status 200.

The flow reads the CPE identifier from the request XML. The MAC address comes first. If the request has no MAC address, the flow uses the serial number (SN).

  1. The flow searches the provision DB for the identifier.

  2. If the request has Delete previous, the flow deletes the existing records.

  3. The flow creates or updates the records for the SN or the MAC address.

The flow checks all records before it saves the first one. If a record is longer than its column of the provision DB, for example a value longer than 255 characters, the flow saves nothing. The flow writes status 1700 and ends. A single-device request is answered with Result 200, the Bid of the run and Status 1700.

Code Meaning

251, 151

MAC address, SN in the request XML

1500

No SN and no MAC address in the request XML. The flow ends.

266, 271

MAC address in the provision DB: yes, no

161, 166

SN in the provision DB: yes, no

276, 171

Previous records of the MAC address, SN deleted

176

Provision DB updated

1700

Database exception. The flow ends.

3.2. Find the CPE in the ACS

If the identifier is an SN, the flow checks the ACS for the CPE:

  • The ACS has the CPE: the flow continues.

  • The ACS does not have the CPE, and <createDevice> is true: the flow creates the CPE with FTCreateDevice.

  • The ACS does not have the CPE, and <createDevice> is false: the flow ends with status 196.

<createDevice> is a setting in Configuration.xml. After status 196, the data waits for the CPE. When the CPE connects, the ACS Event Flow applies the stored data.

If the identifier is a MAC address, the flow gets the SN with FTFindCPEByWANMAC. Then the flow adds the SN to the records of the MAC address. If the ACS does not know the MAC address, the flow ends with status 261. The data waits for the CPE.

For a CPE in the ACS, the flow then does these steps:

  1. FTGetDeviceInfo gets the OUI and the Product Class.

  2. If device info exists, FTUpdateDeviceInfo sends the device info.

  3. If the request has a domain, FTSetCPEDomain sets the domain.

  4. If the request has Delete previous, FTRemoveCPEProvisionData removes the previous provisioning data from the ACS.

With Current only, the device info comes from the request. Otherwise, the device info comes from the provision DB. The flow ignores a device info item without a value, such as <item name="fullname"/>, and does not store it. The value of that item in the provision DB stays as it was; to clear it, send $$. With Current only, if no device info item of the request has a value, the flow logs 443 and does not call FTUpdateDeviceInfo.

Code Meaning

206

Search for the CPE in the ACS

186, 191

SN in the ACS: yes (the ACS answers with the error code 100), no (any other answer)

700, 7000

FTCreateDevice: success, failure. The call needs the OUI and the Product Class.

196

CPE not in the ACS. The data waits for the CPE. Final status for an SN.

286, 291

SN for the MAC address in the ACS: yes, no

261

CPE not in the ACS. The data waits for the CPE. Final status for a MAC address.

177, 1770

SN added to the records of the MAC address: success, failure. If the update of the records fails, the flow ends with status 177.

216, 2160

OUI and Product Class: received, FTGetDeviceInfo failure

440 to 443, 110, 112

Source of the device info: request XML or provision DB

108, 1080

FTUpdateDeviceInfo: success, failure

600

No domain in the request

601, 6010

FTSetCPEDomain: success, failure

201, 2010

FTRemoveCPEProvisionData: success, failure

3.3. Collect Objects and Standalone Services

The flow decides what to send. With Current only, the flow reads only the request XML. Without Current only, the flow reads the provision DB. The provision DB already contains the data of the request.

Item What the flow does

Standalone services

A standalone service is a service in the request without its own objects or parameter values. The flow sends the defaults of the service. The flow takes the TR-069 objects of the service from Objects.xml. The default parameters come from Params.xml in Set Non-Object Parameters.

Objects

The flow matches the objects and sub-objects of the request with Objects.xml.

Object related parameters

The flow matches the parameters of these objects with Objects.xml. The flow adds the default values from Objects.xml.

If the flow finds at least one object name, the flow continues with Create and Update Objects. Otherwise, the flow writes status 182. If the request or the provision DB has no objects at all, the flow continues with Set Non-Object Parameters. If it has objects, but none is left after the matching, the flow continues with Create and Update Objects, which ends with status 1840.

Code Meaning

450 to 453, 169, 170

Standalone services in the request XML or the provision DB

214, 212

Standalone service in Objects.xml: yes, no

172, 1720

Object names for the standalone services: received, failure

460 to 463, 173, 174

Objects in the request XML or the provision DB

175, 1750

Objects matched with Objects.xml: success, mismatch

470 to 473, 178, 181

Object related parameters in the request XML or the provision DB

179, 1790

Object related parameters matched with Objects.xml: success, mismatch

183, 1830

Default parameters of the objects from Objects.xml: received, mismatch

182

No Objects.xml data. No objects to process.

3.4. Create and Update Objects

First, the flow checks the online status of the CPE. An offline CPE can get new objects. The tasks wait in the ACS until the CPE connects. An offline CPE cannot get an object with a specific instance. In this case, the flow ends with status 5007.

The flow processes the objects one by one. The instance of an object decides the action. See also Provisioning Objects.

Instance Action

0

The flow creates a new object with its parameters. The flow uses FTAddObject. If the CPE is online and the reprovision flag is not 2, the flow waits for the task result.

1 to 9

The flow sets one parameter of the instance with FTSetDeviceParameters. The result of this call shows if the instance exists. If the instance exists, the flow sets all parameters of the instance with FTSetDeviceParameters. If the instance does not exist, the flow creates the object with FTAddObject. With reprovision flag 2, the flow cannot process a specific instance. The flow ends with status 3070.

A request can list one object (the same service and object id) more than once. Each listing is a copy of the object. The flow stores every copy in the provision DB and sends every copy to the CPE:

  • several copies with instance 0, for example two new voice profiles;

  • several sub-objects with one sub-object id under one copy, also with instance 0;

  • sub-objects under different copies of the object: each sub-object goes under its own parent copy.

Two copies with the same instance 1 to 9 in one request are one copy. Each parameter takes the value of the first copy that gives it a value. A copy with an empty instance counts as a copy with instance 0. When such a copy of an object gives parameter values, the flow neither stores nor sends it, and it does not change which stored copy the other copies match.

A later request with deleteprevious="0" matches its copies with the stored copies of the object. In the examples, 1,A is a copy with instance 1 and the value A.

Copy in the request What the portal does Stored before → request → stored after

Instance 1 to 9, a copy with this instance is stored

The portal updates the stored copy.

1,A → 1,B → 1,B

Instance 1 to 9, no copy with this instance is stored

The portal adds a copy.

1,A → 2,B → 1,A and 2,B

Instance 0

The first copy with instance 0 in the request overwrites the first stored copy with instance 0, the second overwrites the second, and so on. When fewer copies with instance 0 are stored, the portal adds the others.

0,C → 0,D → 0,D

A stored copy that the request does not list

The copy stays.

1,A and 0,C → 1,B → 1,B and 0,C

Inside its parent copy, each sub-object (the same sub-object id) follows the same rules. One difference: a sub-object with an empty instance and parameter values is stored when its parent object has an instance, and it counts as instance 0. A parameter of a stored copy that the request leaves out stays in the provision DB. Without Current only, the flow sends every stored copy of the object to the CPE.

The CPE gets the copies of one object in the order of their numbers in the provision DB. With Current only, that is the order of the request. Without it, the stored copies go first, in the order in which they were first stored, and the new copies follow in the order of the request. The order decides which instance number the CPE gives each new copy with instance 0. Each entry of a batch file is a request of its own: a later entry of the same device follows these rules.

The device page of the UI shows one copy of each object: the first stored copy, and in it the first stored copy of each sub-object. A save from the page changes that copy only. The other copies stay in the provision DB, and without Current only the flow sends them to the CPE as they are stored. With Delete previous, the save removes them from the provision DB. To change another copy, send a SOAP or REST request.

The instance of an object or a sub-object is one digit, 0 to 9. A single-device request (SOAP ProvisioningForDevice, REST POST /provision/from-request-data) with any other instance starts no flow. The answer has Result 200, the Bid 00000000-0000-0000-0000-000000000000, an empty Status and a message that names each wrong instance:

Invalid object instance: '10' (allowed: 0-9)
Invalid sub-object instance: '12' (allowed: 0-9)

Several problems come in one message, separated by `; `. The portal does not check an instance that the request leaves out or leaves empty.

After the flow creates an object, the flow processes the sub-objects. FTGetDeviceParametersByTransID gets the instance number of the new parent object. The flow creates the sub-objects under this instance. If the ACS answers with an error code other than 100, the flow creates no sub-objects and writes no code. For an existing object, the flow uses the instance of the object.

Code Meaning

221, 211, 5000

CPE online, CPE offline, online status unknown

5007

Specific instance for an offline CPE. The flow ends.

184, 1840

First object selection: success, failure

185

Instance 0

187, 1850

FTAddObject with parameters: success, failure

305

FTAddObject with reprovision flag 2. The flow does not wait.

180

FTAddObject for an offline CPE. The flow does not wait.

1880, 5008

Task still pending after the timeout, task status unknown

189, 1890

Object created, task failed or rejected

190

Instance 1 to 9

3070

Specific instance with reprovision flag 2. The flow ends.

192, 1900, 1930, 5009

Check of the instance with FTSetDeviceParameters, and its task

194, 195

Instance exists, instance may not exist

293, 2930, 2940, 5012, 295, 2950

Parameters of an existing instance

197, 1970, 1980, 5010, 199, 1990

New instance with FTAddObject

800 to 808, 8040, 8050, 8080

Sub-objects

204, 205

Next object selected, no objects left

3.5. Set Non-Object Parameters

The flow collects the parameters outside objects:

  • the default parameters of the standalone services, from Params.xml

  • the non-object parameters of the request

  • without Current only, the non-object parameters of the provision DB

The flow matches the non-object parameters with Params.xml. The flow also adds the default parameters of their services. One FTSetDeviceParameters call sends all these parameters.

If the flow has no parameters and handled no objects, the flow ends with status 248. In this case, the CPE got only the device info.

Code Meaning

480 to 483, 157, 158

Standalone services in the request XML or the provision DB

219, 213

Standalone service in Params.xml: yes, no

159, 1590

Default parameters of the standalone services: received, failure

490 to 493, 113, 114

Non-object parameters in the request XML or the provision DB

217, 2171

Parameters matched with Params.xml: success, mismatch

163, 1630

Services and default parameters matched: success, failure

231, 2310

FTSetDeviceParameters: success, failure

160

No parameter data for the CPE

320, 322

Objects handled: at least one, none

248

Only the device info sent. Final status.

3.6. Wait for Results, Reboot and Finish

Case Action Final status

Reprovision flag 2

The flow does not wait for task results. If the request has Reboot, the flow reboots the CPE with FTRPCInvoke.

314

CPE online

The flow waits for the parameter task. See Waiting for Task Results. If the request has Reboot, the flow then reboots the CPE.

246

CPE offline

The flow does not wait. If the request has Reboot, the flow queues the reboot. The ACS runs the tasks when the CPE connects.

247

Code Meaning

215, 2150

FTCPEStatus: success, failure

321, 319

Non-object parameters handled: at least one, none

2350, 5001

Parameter task still pending after the timeout, task status unknown

164, 2460

Parameters set, task failed or rejected

165, 1650, 168, 1680, 313, 3130

Reboot with FTRPCInvoke: success, failure

246

Provisioning of an online CPE complete. Final status.

247

Offline CPE. The data waits for the CPE. Final status.

314

Provisioning with reprovision flag 2 complete. Final status.