SysMLConnector
PrintChangeSet
print the entries of a change set
ClearChangeSet
clear internal change set
Calling Sequence
Parameters
Returns
Description
Examples
PrintChangeSet(cs, 'prune'=p)
ClearChangeSet()
cs
-
(optional) change set; default: internally stored change set
p
(optional) true or false (default); controls whether changes for invalid UUIDs should be removed or not
PrintChangeSet returns a list of invalid UUID strings.
ClearChangeSet returns NULL.
A change set is a collection of changes to SysML model elements for the current branch. Each entry basically stores the UUID of an element being changed, the feature being changed, and the new value. The purpose of a change set is to collect a bunch of logically connected changes to a SysML model so they can be committed together in an atomic transaction.
The PrintElement(cs) calling sequence prints the entries of the change set cs. If cs is omitted, then the entries of the internally stored change set are printed. For each entry, the UUID of the model element, a name n, the feature name f, the new value, and the current value are printed.
Currently the only features f which can be changed are value, element or instance in the defaultValue of a Property or in the value of a Slot (in either case, a Value Specification; see PutValue), as well as f=body of the specification (Opaque Expression) of the first ownedRule (Constraint) of a Constraint Block (see PutConstraint). For a Property or a Constraint Block, its name is printed for n. For a Slot, both the name of its defining feature (Property) and the name of its owner (Instance Specification), if any, are printed for n.
By default, if one of the UUIDs in the change set does not correspond to a valid model element, PrintChangeSet will print out that information. However, if the option prune=true, or just prune for short, is specified, then any changes corresponding to invalid UUIDs will be removed from the change set instead.
The ClearChangeSet() calling sequence discards the internally stored change set and re-initializes it to an empty change set. For a change set cs stored by the user, the same can be achieved with the command cs := table().
with⁡SysMLConnector
ClearChangeSet,Commit,Connect,GetBinding,GetChildren,GetConstraint,GetInstances,GetSlots,GetValue,Login,Logout,PrintChangeSet,PrintElement,PutConstraint,PutValue,QualifiedNameOf,QueryModel,Warnlevel
Login⁡https://twc.mycompany.com:8111/,user=alice,password=a%5Wr^Xt0p@2
Connect⁡JMPTWCSysML:
Query by fully qualified name. The result is a Property with stereotype Value Property.
Velocity_in≔QueryModel⁡Model-Turbofan::System Breakdown::System Structure::Analysis Block::Velocity_in
Velocity_in≔ad42d107-2e10-477c-bb4d-32eed2dac1ba,uml:Property,ValueProperty,Velocity_in
So far the internal change set is empty.
PrintChangeSet⁡
Change the default values of two value properties.
PutValue⁡Velocity_in3,200.
PutValue⁡Model-Turbofan::System Breakdown::System Structure::Analysis Block::h_aircraft,40000.
Review the current change set.
665e7b57-6b20-47e7-bda1-aeae991ef08b (Velocity_in): value = "200.0" ("212.43")
5af8953e-f79c-463a-b28f-28ea0ff54ff1 (h_aircraft): value = "40000.0" ("42000.0")
Note the UUIDs are the ones of the Value Specifications referred to by the defaultValue features of the Value Properties.
The next step at this point would be to Commit the change set. Instead, for demonstration purposes, we discard the changes instead.
ClearChangeSet⁡
Logout⁡
See Also
Commit
Connect
PutConstraint
PutValue
QueryModel
Download Help Document