Skip to content

Use Cases with Deleted Scenarios

This section provides specific examples of how Scenario Sync works in different situations, with a focus on the impact of deleted scenarios. The sequence of events is shown by labels similar to “time:1”, “time:2”, etc.

Note About Best Practices

You should ensure that all sites participating in a realm agree on whether or not deletes are included. Scenario Sync does not enforce this, so you must configure this manually.

If a given site needs to interact with some sites that expect deletes and others that do not, the best practice would be to create separate realms/jobs such that for each realm the participating job configurations are consistent.

Use Case 1: Simple, with no conflicting actions

Description: Several sites are importing and exporting from each other, with the goal that all sites have the same scenarios with some time delay.

  • Scenario 1 exists in all three sites (A, B, C)

User actions:

  • Scenario 1.a is updated at Site A (“time:0”).
  • Scenario 1.b is updated at Site B (“time:1”).
  • Scenario 1.c is deleted from Site C (“time:2”).

Sync actions:

  • Scenario sync job (both import and export) from Site A (“time:3”)
    • Updated Scenario 1.a gets moved to the realm.
    • Nothing to import
  • Scenario sync (both import and export) from Site B (“time:4”)
    • Updated Scenario 1.a is not imported because it has an earlier timestamp than Scenario 1.b. Scenario 1.b is moved to the realm.
    • Nothing to import
  • Scenario sync (both import and export) from Site C (“time:5”)
    • Updated Scenario 1.a is not imported because it has an earlier timestamp than deleted Scenario 1.c.
    • Updated Scenario 1.b is not imported because it has an earlier timestamp than deleted Scenario 1.c.
    • Deleted Scenario 1.c is moved to the realm (actually a delete action is moved to the realm).
  • Scenario sync job from Site A (“time:6”)
    • Delete Scenario 1.c is carried out and the scenario is removed from Site A
    • Nothing to import, or export
  • Scenario sync job from Site B (“time:7”)
    • Deleted Scenario 1.c is carried out and the scenario is removed from Site B
    • Nothing to import, or export

Use Case 2: Deleted scenario is updated at another site after initial delete

Description: Several sites are importing and exporting from each other, with the goal that all sites have the same scenarios with some time delay.

  • Scenario 1 exists in all three sites (A, B, C)

User actions:

  • Scenario 1.a is updated at Site A (“time:0”).
  • Scenario 1.b is updated at Site B (“time:1”).
  • Scenario 1.c is deleted from Site C (“time:2”).
  • Scenario 1.a was updated again at Site A (Scenario 1.a2) (“time:6”)

Sync Actions:

  • Scenario sync job (both import and export) from Site A (“time:3”)
    • Updated Scenario 1.a gets moved to the realm.
    • Nothing to import
  • Scenario sync (both import and export) from Site B (“time:4”)
    • Updated Scenario 1.a is not imported because it has an earlier timestamp than Scenario 1.b. Scenario 1.b is moved to the realm.
    • Nothing to import
  • Scenario sync (both import and export) from Site C (“time:5”)
    • Updated Scenario 1.a is not imported because it has an earlier timestamp than deleted Scenario 1.c.
    • Updated Scenario 1.b is not imported because it has an earlier timestamp than deleted Scenario 1.c.
    • Deleted Scenario 1.c is moved to the realm (actually a delete action is moved to the realm).
  • Scenario sync job from Site A (“time:7”)
    • Delete Scenario 1.c action is carried out because (even though delete took place before the Scenario 1.a2 update); so, Scenario 1 is removed from Site A
    • Nothing to import, or export
  • Scenario sync job from Site B (“time:8”)
    • Deleted Scenario 1.c is carried out and the scenario is removed from Site B
    • Nothing to import, or export

Note:

Delete takes precedence over Update, ignoring the later modifications.

Use-Case 3: One exporter site, others are importers, deletes from importers are not propagated

Description: Several target sites are importing from a single source site

  • Site A exports scenarios and Sites B + C import scenarios from site A (they do not export).
  • Scenario 1 exists in all three sites (A, B, C)

User actions:

  • Scenario 1.a is deleted from Site A (“time:0”).
  • Scenario 1.b is updated at Site B (“time:0” + 1).
  • Scenario 1.c is updated at Site C (“time:0” + 2).

Sync Actions:

  • Scenario sync job (export) at Site A (“time:0” + 3)
  • Deleted Scenario 1.a is logged in operational database; delete sync request moved to the realm. No other exports.
  • Scenario sync job (import) at Site B (“time:0” + 4)

  • Scenario 1.b is removed from Site B even though Scenario 1.a has an earlier timestamp than Scenario 1.b (the recent update); because delete takes precedence over updates.

  • Nothing to export

  • Scenario sync job (import) at Site C (“time:0” + 5)

  • Same result as Site B (i.e. Scenario 1.c is removed)

Note:

If Scenario 1 is deleted in Site B (or Site C), it will not be deleted from Site A since Site A is not a target import site for a sync job from Site B. This means that updates from A to Scenario 1.a will cause Scenario 1.a to be exported to Site B again.

Use-Case 4: Alternatives of the same scenario on the different sites: Update

Description: Two sites A and B are syncing everything with each other.

  • Site A exports everything that has changed at its site and imports everything that B has changed.
  • Site B same process as Site A (except it exports changed scenarios from B and imports changed scenarios from A).

User actions:

  • Scenario 1.a created at Site A: (“time:0”)
  • Scenario 1.b created at Site B: (“time:1”)

Sync Actions:

  • Sync by A sends update action for Scenario 1.a into realm: (“time:3”)
  • Sync by B causes Scenario 1.a to be ignored (Scenario 1.b has later timestamp); Scenario 1.b update action is added to the realm: (“time:4)
  • Sync by A causes Scenario 1.a to be overwritten by Scenario 1.b: (“time:5”)

Use-Case 5: Alternatives of the same scenario on the different sites: Delete)

Description: Two sites A and B are syncing everything with each other.

User actions:

  • Scenario 1.a created at Site A: (“time:0”)
  • Scenario 1.b created at Site B: (“time:1”)
  • Scenario 1.b deleted at Site B: (“time:2”)

Sync Actions:

  • Sync by A sends update action for Scenario 1.a into realm: (“time:3”)
  • Sync by B causes Scenario 1.a to be ignored (Scenario 1.b has later timestamp); Scenario 1.b deleted action is added to the realm: (“time:4”)
  • Sync by A causes Scenario 1.a to be deleted at Site A: (“time:5”)

Use-Case 6: Scenario re-creation after delete is processed

Description: Several sites are importing and exporting from each other, with the goal that all sites have the same scenarios with some time delay.

User actions:

  • Scenario 1.a created at Site A: (“time:0”)
  • Scenario 1.b deleted at Site B: (“time:1”)
  • Scenario 1.c created at Site C: (“time:5”)

Sync Actions:

  • Scenario sync job (both import and export) from Site A (“time:2”)
    • Scenario 1.a gets moved to the realm.
    • Nothing to import
  • Scenario sync (both import and export) from Site B (“time:3”)
    • Scenario 1.a is not imported because it has an earlier timestamp than Scenario 1.b. Deleted marker for Scenario 1.b is moved to the realm.
    • Nothing to import
  • Scenario sync (both import and export) from Site C (“time:4”)
    • Updated Scenario 1.a is not imported, and no delete takes place as scenario does not exist at site C.
    • Nothing to export
  • Scenario sync job (both import and export) from Site A (“time:6”)
    • Delete for Scenario 1.a was propagated to all sites and is cleaned up from repo
    • Nothing to import/export
  • Scenario sync (both import and export) from Site C (“time:7”)
    • Scenario 1.c is exported to the realm
    • Nothing to import
  • Scenario sync job (both import and export) from Site A (“time:8”)
    • Scenario 1.c is imported – scenario gets re-created after delete
  • Scenario sync job (both import and export) from Site B (“time:9”)
    • Scenario 1.c is imported – scenario gets re-created after delete

Use-Case 7: Scenario re-creation after delete is ignored

Description: Several sites are importing and exporting from each other, with the goal that all sites have the same scenarios with some time delay.

User actions:

  • Scenario 1.a created at Site A: (“time:0”)
  • Scenario 1.b deleted at Site B: (“time:1”)
  • Scenario 1.c created at Site C: (“time:2”)

Sync Actions:

  • Scenario sync job (both import and export) from Site A (“time:3”)
    • Scenario 1.a gets moved to the realm.
    • Nothing to import
  • Scenario sync (both import and export) from Site C (“time:4”)
    • Scenario 1.c is moved to the realm.
    • Nothing to import
  • Scenario sync (both import and export) from Site B (“time:5”))
    • Scenario 1.a and Scenario 1.c are not imported, deleted marker is exported for Scenario 1.b.
  • Scenario sync job (both import and export) from Site A (“time:6”)
    • Scenario 1.a is deleted
    • Nothing to export
  • Scenario sync (both import and export) from Site C (“time:7”)
    • Scenario 1.c is deleted
    • Nothing to export

The order of the sync jobs and the scenario modification time are important for scenario recreation, but the rule is that Scenario Sync ignores subsequent updates until the Delete is processed by all sites. It takes them into account after the Delete is handled by all sites and cleaned up from repository.