Versions Compared

Key

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

...

 

 

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteActivateModel edmiRemoteCreateInstanceAndPutAttrsBN(SdaiServerContext serverContextId, 
                                                  SdaiString        remoteArchivedModelNameremoteRepositoryName, 
                                    SdaiRepository              SdaiString        remoteRepositoryNameremoteModelName, 
                                                  SdaiString        remoteModelName,entityName, 
                                                  SdaiOptionsSdaiInteger       optionsattributes, 
                                      SdaiModel            SdaiAppInstance  *modelId *newInstanceId, 
                                                  SdaiInvocationId  *edmiInvocationId); 


<Description>

Arguments

TypeNameComment
sdaiStringresultStringComment

Return Value

...

 

Options

  

OptionComment
Option nameComment

 

Example

 

Code Block
languagecpp
 

 

See also

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

 

, 
                                                  /* [SdaiString  attributeName,  SdaiPrimitiveType valueType, SdaiVoid value] */ 
                                                  ...); 


This operation creates an entity instance in an edmModel in a remote EDMdatabase and in the same operation, optionally puts values into any number of its attributes.
This operation is only applicable on data models.
Related functions: edmiRemoteCreateInstanceAndPutAttrs, edmiRemoteCreateInstanceAndPutAttrsBNEx, edmiRemoteCreateInstanceAndPutAttrsEx
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteCreateInstanceAndPutAttrsBN(SdaiServerContext serverContextId, 
                                                 SdaiString        remoteRepositoryName, 
                                                 SdaiString        remoteModelName, 
                                                 SdaiString        entityName, 
                                                 SdaiInteger       attributes, 
                                                 SdaiAppInstance   *newInstanceId, 
                                                 SdaiInvocationId  *edmiInvocationId, 
                                                 /* [SdaiString attributeName,  SdaiPrimitiveType valueType, SdaiVoid value] */ 
                                                 ...); 
 
Arguments:

Arguments

...

 

For each attribute value to assign, the three following arguments in the following order must be specified:

< attributeName >:



3. <value>:
1TypeNameComment
2 SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

3 SdaiString

remoteRepositoryName

The name of the edmRepository in the remote  EDMdatabase  that contains the edmModel in which to create an instance. Repository names are case sensitive.

4 SdaiString

remoteModelName

The name of the edmModel in which to create an instance. Model names are case sensitive.

5 SdaiString

entityName

Name of the entity that defines the instance type to create. Entity names are case insensitive. The entity must be defined in the underlying schema of the edmModel specified by the <remoteModelName> argument.

6 SdaiInteger

attributes

The number of attribute values given in the variable argument list <values>.

7 SdaiAppInstance

newInstanceId

Variable that will receive the numeric instanceID that uniquely identifies the created instance in the remote  EDMdatabase

8 SdaiInvocationId

edmiInvocationId

Currently not used.

9

values

 SdaiString

values

The name of the attribute to assign a value. Attribute names are case insensitive. The attribute name must be qualified with the entity name when the attribute name is not unique.

<valueType> :

10
SdaiPrimitiveType 
 

The specified primitive type must be the same or a compatible data type of the actual attribute domain as defined in the attribute declaration in the related EXPRESS schema.

All data types except sdaiAGGR can be handled by this operation. Aggregates cannot be assigned as attribute data value by this operation. Aggregates must be assigned to attributes by either edmiRemoteCreateAggrAndWriteAggrElements or edmiRemoteCreateAggrAndWriteAggrElementsBN operations. The primitive type sdaiSELECT can be used to write any data type. The primitive type sdaiADB can be used to write any data type except typed values.

  The primitive type sdaiINTEGER is compatible with sdaiREAL, and sdaiBOOLEAN is compatible with sdaiLOGICAL, hence automatic conversion between these compatible data types will be performed when required.

The data type sdaiAGGR is illegal in this operation.

11
SdaiVoid 
value
The data value to assign to the attribute in the created instance. The type of <value>must be the same as that specified in the <valueType> argument.

...

 

 

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

 

Example

...

 

Code Block
languagecpp
 EdmiError rstat;
 SdaiServerContext myContext;
 SdaiInstance instId;
  
 /* Create Server Context */
 rstat = edmiDefineServerContext("MyContext",

...


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

...

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

...

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

...

 
  
 rstat = edmiRemoteCreateInstanceAndPutAttrsBN(myContext,

...


 "DataRepository", "MySocialNetwork",

...

  
 "PERSON", 4, &instId, NULL,

...

 
 "NAME", sdaiSTRING, "Lucy Schmidt",

...

 
 "AGE", sdaiINTEGER, 32,

...

 
 "WEIGHT", sdaiREAL, 59.5,

...

 
 "MARRIED", sdaiBOOLEAN, sdaiFALSE);

...

 
 . . .

 

See also

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