Change Tracking Commands (Template Language)

Change tracking commands of Software Ideas Modeler template language.
Command Result Type Description
IsAdded(element:ModelElement, propertyName:String) Boolean

Evaluates if a specific property of the given model element was empty before and has had data added to it, according to change tracking data. This function returns true if the property was previously empty and now contains data.

Parameters:

  • element: The model element to evaluate.
  • propertyName: The name of the property to check for added data.
IsRemoved(element:ModelElement, propertyName:String) Boolean

Evaluates if data from a specific property of the given model element has been removed, leaving the property empty when it previously contained data, based on change tracking data. Returns true if the property was previously filled but is now empty.

Parameters:

  • element: The model element to evaluate.
  • propertyName: The name of the property to check for removed data.
IsChanged(element:ModelElement, propertyName:String) Boolean

Determines if the value of a specific property for the given model element has been modified, according to change tracking data. Returns true if the property's current value differs from its previous value.

Parameters:

  • element: The model element in question.
  • propertyName: The name of the property to evaluate for changes.
IsUnchanged(element:ModelElement, propertyName:String) Boolean

Checks if the value of a specific property for the given model element remains unchanged, according to change tracking data. Returns true if the current value of the property is the same as its previous value.

Parameters:

  • element: The model element being evaluated.
  • propertyName: The name of the property to check for stability.
GetPrevious(element:ModelElement, propertyName:String) Object

Retrieves the previous value of a specified property for the given model element, as recorded by change tracking data, before any changes were applied.

Parameters:

  • element: The model element in question.
  • propertyName: The property whose previous value is being requested.
GetAddedItems(previousItems:Collection, currentItems:Collection) Collection

Returns a collection of items that have been added to the current collection in comparison to the previous collection, according to change tracking data.

Parameters:

  • previousItems: The collection of items before the change.
  • currentItems: The current collection of items, after the change.
GetRemovedItems(previousItems:Collection, currentItems:Collection) Collection

Returns a collection of items that have been removed from the current collection in comparison to the previous collection, based on change tracking data.

Parameters:

  • previousItems: The collection of items before the change.
  • currentItems: The current collection of items, after the change.
GetChangedItems(previousItems:Collection, currentItems:Collection) Collection

Identifies items within a collection that have been modified, comparing the current collection to its previous state, as recorded by change tracking data. This may include items that have been added, removed, or whose properties have changed.

Parameters:

  • previousItems: The initial collection of items.
  • currentItems: The modified collection of items, post-change.

New Comment

Comment