edmiRemoteRollbackModel

EdmiError edmiRemoteRollbackModel(SdaiServerContext serverContextId,
                                    SdaiString        repositoryName,
                                    SdaiString        modelName,
                                    SdaiString        modelVersionName,
                                    SdaiOptions       options,
                                    SdaiInvocationId  *edmiInvocationId);

Rolls back the current version of an edmModel to a previous version. The model version is identified by the names of the edmRepository, the edmModel and the version. By default, all versions succeeding the new current version will be permanently deleted. Use options to prevent deletion of versions.

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiString

repositoryName

The name of the edmRepository in the  EDMdatabase  holding the edmModel to be rolled back. Repository names are case sensitive.

SdaiString

modelName

The name of the edmModel to roll back. Model names are case sensitive. The combination of the arguments <repositoryName> and <modelName> uniquely identifies an edmModel in the remote  EDMdatabase.

SdaiString

modelVersionName

The name of the model version to roll back to.

SdaiOptions

options

See description of available options below.

SdaiInvocationId

edmiInvocationId

Currently not used.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

Options


  

OptionComment
KEEP_ALL_MODEL_VERSIONSAll versions of the edmModel will be preserved when rolling back. If this option is not used, all versions newer than the one specified by the argument <modelVersionName> will be permanently deleted.

 

Example


 

 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

There are no items with the selected labels at this time.

Â