Performing Copy and Model After Operations in Subscriptions

You can configure subscriptions to perform copy or model after operations for nodes that are added to the target viewpoint.

Terminology Note:

For subscriptions, when adding nodes from a source viewpoint into a target viewpoint these operations enable you to copy property values from the target viewpoint, and to insert the new nodes into hierarchies that only exist in the target viewpoint.

You can also specify a set of properties to match on so that when a node is added in the target, the property values are copied from a sibling node that has the same values for the properties that you specified. For example, when adding an employee node in a subscription you can match on Location so that when the employee is added to the target viewpoint, the system automatically copies property values from a sibling node in the target viewpoint that has the same location.

Configuring a Subscription For Copy or Model After

Use the Copy Action and, optionally, the Properties to Match fields on the Definition tab of the subscription inspector to specify a copy or model after operation, as follows:

  • Copy Action: Enables you to specify a copy or model after operation:
    • None: Do not perform a copy or model after operation.
    • Properties: Perform a copy operation to copy properties of the specified node in the target viewpoint.
    • Model After: Perform a model after operation to copy properties and relationship values of the specified node in the target viewpoint.

    Note:

    When the target viewpoint is a list, selecting either Properties or Model After will copy properties only.
  • Properties to Match (hierarchy source viewpoints only): Enables you to select one or more properties to identify a node that will be copied for each node that is added to the target viewpoint. The first sibling of an added node that has the same values of the properties that you select is used for the copy or model after operation.

    Tip:

    The Properties to Match option enables you to perform copy or model after operations in the target viewpoint when you did not perform a copy or model after operation in the source viewpoint.

See Creating, Editing, and Validating Subscriptions.

Copy and Model After Processing in Subscriptions

After you configure your subscription with a copy or model after operation, those operations are processed in the target viewpoints as follows:

  • Generating the subscription request file:
    • When you copy or model after a node in the source viewpoint, the name of that node is placed in the Copy Node column and the action is placed in the Copy Action column of the request file for the subscription request.
    • When you add a node (including add actions that result from inserting or moving a node under a top node filter) and you have configured Properties to Match, the system checks to see if there are other sibling nodes in the source that have the same property values as the ones that you specified to match. If so, the first sibling that has the same values is placed in the Copy Node column of the request file for the subscription request and the action is placed in the Copy Action column

      Note:

      All Properties to Match must have exact matching values on the source node, and none of them can be null or blank. If any of the properties to match has a null or blank value, the Copy Node and Copy Action columns are not populated in the request file for the subscription.

    See Request Load File Format.

  • Processing the subscription request file:
    • Copy operations: Defined property values of the node in the Copy Node column of the subscription request file are copied in the target viewpoint.

      Note:

      Only property values from the source viewpoint that are different from the values in the target viewpoint are copied.
    • Model After operations:
      • Defined property values of the node in the Copy Node column of the subscription request file are copied in the target viewpoint.

        Note:

        Only property values from the source viewpoint that are different from the values in the target viewpoint are copied.
      • Parents of the node in the Copy Node column of the subscription request file are copied in the target viewpoint.

        Note:

        Only relationship values from the source viewpoint that are different from the values in the target viewpoint are copied.

Note:

If the Core.Name property for the node type of a node being added via a copy or model after operation is configured to be calculated and stored (see Calculated and Stored Properties), the name of the new node is automatically calculated.

For an example of a model after operation in a subscription, see Model After Subscription Example.