Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteCreateModelVersion(SdaiServerContext  serverContextId,
                                       SdaiString        repositoryName,  
                                       SdaiString        modelName,         
                                       SdaiString        modelVersionName,    
                                       SdaiModelVersion  *newModelVersionId,     
                                       SdaiInvocationId  *edmiInvocationId);
  

Stores the current version of an edmModel using the built in revision control system of edm.

...

Any number of versions may be generated for an edmModel. All new

...

versions of an edmModel will be a appended to the list of modelVersionIds in the VERSIONS attribute of the model. A modelVersionId is an instance of the entity EDM_MODEL_VERSION in the ExpressDataManager model. This instance contains administrative information about the model version such as name, creation date and ownership.

...

Arguments

...

TypeNameComment
 SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

 SdaiString

repositoryName

The name of the repository that contains the model of interest in the remote _EDMdatabase{_}. remote  EDMdatabase  Repository names are case sensitive.

 SdaiString

modelName

The name of the edmModel for which a new version shall be created.

 SdaiString

modelVersionName

Optional name of the new model version. A model version name must start with a letter followed by any sequence of alphanumeric characters and underscore. Model names are case sensitive. All named versions of an edmModel must have unique names.

SdaiModelVersion  

newModelVersionId

Variable that will receive the modelVersionId that uniquely identifies the model version in the remote EDMdatabase.

SdaiInvocationId  

edmiInvocationId

Currently not used.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

 

Example

...

 

Code Block
languagecpp
 EdmiError rstat;
 SdaiInteger nWrn, nErr;
 SdaiModelVersion modelVersionId;
 SdaiInstance instId;
 SdaiServerContext myContext;
  
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",

...


 "Johnny", "Supervisor", "cf37ftr",

...

 
 "TCP", "9090", "MyServerHost",

...

 
 NULL, NULL, NULL, NULL, NULL, &myContext);

...

 
  
 /* Compile schema */

...


 rstat = edmiRemoteDefineSchema(myContext, EXPRESS_SCHEMA_TYPE,

...


 "c:/data/MyFile.exp", "c:/tmp/MyFile.dia", "MySchema",

...

 
 DELETING_EXISTING_SCHEMAS | STORING_SOURCE,

...

 
 &nWrn, &nErr, NULL);

...

 
  
 /* Create Model */

...


 rstat = edmiRemoteCreateModel(myContext,

...


 "MyRepository", "MyModel", "MySchema",

...

  
 USE_DEFAULT_OPTIONS, NULL);

...

 
  
 /* Populate Model */

...


 rstat = edmiRemoteCreateInstanceAndPutAttrsBN(myContext,

...


 "MyRepository", "MyModel", "MyEntity", 1, &instId, NULL,

...

 
 "REAL_ATTR", sdaiREAL, 3.14);

...

 
  
 /* Create version 1 */

...


 rstat = edmiRemoteCreateModelVersion(myContext,

...


 "MyRepository", "MyModel", "V1", &modelVersionId, NULL);

...

 
  
 /* Change population */

...


 rstat = edmiRemotePutAttrsBN(myContext, instId, 1, NULL,

...


 "REAL_ATTR", sdaiINTEGER, 1);

...

 
  
 /* Create version 2. Named 'version2' by default. */

...


 rstat = edmiRemoteCreateModelVersion(myContext,

...


 "MyRepository", "MyModel", NULL, &modelVersionId, NULL);

...

 
  
 /* Roll back to version 1 */

...


 rstat = edmiRollbackModelBN("MyRepository", "MyModel", "V1",

...


 KEEP_ALL_MODEL_VERSIONS);

...

 
  
 /* Delete version 2 */

...


 rstat = edmiRemoteDeleteModelVersion(myContext,

...


 "MyRepository", "MyModel", "version2", NULL);

...

 
 . . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"