@@ -1047,7 +1047,7 @@ A modify workflow also follows a general pattern, like described below.
10471047The `@ modify_workflow` decorator adds some additional steps to the
10481048workflow that are always needed.
10491049
1050- ```pyrhon
1050+ ```python
10511051@ modify_workflow(" Modify node" , initial_input_form = initial_input_form_generator)
10521052def modify_node() -> StepList:
10531053 return (
@@ -1191,6 +1191,55 @@ the orchestrator, a task (a workflow with `Target.SYSTEM`) can be
11911191written that will retrieve a list of all L2VPNs from IMS and compare it
11921192against a list of all L2VPN subscription from the orchestrator.
11931193
1194+ # ## Reconcile workflow
1195+
1196+ A reconcile workflow is similar to a modify workflow but without requiring user input via forms.
1197+ This makes the reconcile workflow useful for synchronization the existing configuration of
1198+ subscriptions with OSS and / or BSS .
1199+
1200+ The `@ reconcile_workflow` removes the need for user input forms by basically running a
1201+ `modify_workflow` where the `initial_input_form` is automatically set to `None ` .
1202+
1203+ ```python
1204+ @ reconcile_workflow(" Reconcile l2vpn" )
1205+ def reconcile_l2vpn() -> StepList:
1206+ return begin >> update_l2vpn_in_external_systems
1207+ ```
1208+
1209+ 1 . Minimal required information of the subscription is collected and consists of the subscriptions
1210+ existing configuration.
1211+ 2 . Necessary subscription administration (`@ reconcile_workflow` ):
1212+ 1 . Register reconcile process for this subscription
1213+ 2 . Set subscription ‘out of sync’ to prevent the start of other processes
1214+ 3 . Interact with OSS and / or BSS , in this example
1215+ 1 . Update subscription in external systems (OSS and / or BSS ) (`update_l2vpn_in_external_systems` )
1216+ 4 . Set subscription ‘in sync’ (`@ reconcile_workflow` )
1217+
1218+ Because both a `@ modify_workflows` and `@ reconcile_workflow` need to have the same update steps for
1219+ a similar product (e.g. `l2vpn` ), these update steps can be extracted into a separate variable:
1220+
1221+ ```python
1222+ # variable containing update steps which are both used in modify and reconcile workflows
1223+ update_l2vpn_in_external_systems = begin >> update_l2vpn_in_nrm
1224+
1225+
1226+ @ modify_workflow(" Modify l2vpn" , initial_input_form = initial_input_form_generator)
1227+ def modify_l2vpn() -> StepList:
1228+ return (
1229+ begin
1230+ >> set_status(SubscriptionLifecycle.PROVISIONING )
1231+ >> update_subscription
1232+ >> update_subscription_description
1233+ >> set_status(SubscriptionLifecycle.ACTIVE )
1234+ >> update_l2vpn_in_external_systems
1235+ )
1236+
1237+
1238+ @ reconcile_workflow(" Reconcile l2vpn" )
1239+ def reconcile_l2vpn() -> StepList:
1240+ return begin >> update_l2vpn_in_external_systems
1241+ ```
1242+
11941243# # Services
11951244
11961245Services are collections of helper functions that deliver a service to
0 commit comments