Skip to content

Action Schema

txt
EMRALD_Model#/definitions/Action
AbstractExtensibleStatusIdentifiableCustom PropertiesAdditional PropertiesAccess RestrictionsDefined In
Can be instantiatedNoUnknown statusNoForbiddenForbiddennoneEMRALD_JsonSchemaV3_0.json*

Action Type

object (Action)

Action Properties

PropertyTypeRequiredNullableDefined by
idstringOptionalcannot be nullEMRALD_Model
objTypestringRequiredcannot be nullEMRALD_Model
namestringRequiredcannot be nullEMRALD_Model
descstringRequiredcannot be nullEMRALD_Model
actTypestringRequiredcannot be nullEMRALD_Model
mainItembooleanRequiredcannot be nullEMRALD_Model
mutExclbooleanOptionalcannot be nullEMRALD_Model
newStatesarrayOptionalcannot be nullEMRALD_Model
scriptCodestringOptionalcannot be nullEMRALD_Model
variableNamestringOptionalcannot be nullEMRALD_Model
codeVariablesarrayOptionalcannot be nullEMRALD_Model
sim3DMessagestringOptionalcannot be nullEMRALD_Model
extSimstringOptionalcannot be nullEMRALD_Model
sim3DVariablestringOptionalcannot be nullEMRALD_Model
openSimVarParamsbooleanOptionalcannot be nullEMRALD_Model
sim3DModelRefstringOptionalcannot be nullEMRALD_Model
sim3DConfigDatastringOptionalcannot be nullEMRALD_Model
simEndTimestringOptionalcannot be nullEMRALD_Model
makeInputFileCodestringOptionalcannot be nullEMRALD_Model
exePathstringOptionalcannot be nullEMRALD_Model
processOutputFileCodestringOptionalcannot be nullEMRALD_Model
formDataNot specifiedOptionalcannot be nullEMRALD_Model
templateobjectOptionalcannot be nullEMRALD_Model
returnProcessstringOptionalcannot be nullEMRALD_Model
changeLogarrayOptionalcannot be nullEMRALD_Model
raTypestringOptionalcannot be nullEMRALD_Model
updateVariablesarrayOptionalcannot be nullEMRALD_Model
requiredbooleanOptionalcannot be nullEMRALD_Model

id

Optional, internal use only.

id

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

id Type

string

objType

For event type of etDistribution this is the name of the distribution parameter.

objType

  • is required

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

objType Type

string

objType Constraints

enum: the value of this property must be equal to one of the following values:

ValueExplanation
"Diagram"
"State"
"Action"
"Event"
"ExtSim"
"LogicNode"
"Variable"
"EMRALD_Model"

name

referenace name in the model for the action

name

  • is required

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

name Type

string

desc

User entered description of the action

desc

  • is required

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

desc Type

string

actType

The type of action

actType

  • is required

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

actType Type

string

actType Constraints

enum: the value of this property must be equal to one of the following values:

ValueExplanation
"atTransition"
"atCngVarVal"
"at3DSimMsg"
"atRunExtApp"

mainItem

Is this a global item to show up in the global list, If false it showes up in local or all list.

mainItem

  • is required

  • Type: boolean

  • cannot be null

  • defined in: EMRALD_Model

mainItem Type

boolean

mutExcl

Optional. Only one action may be taken so the probability determines if this action is taken vs another in the EventAction list. If false then the probability is used to sample if this action occured and multiple or no actions could happen when the event is triggered.

mutExcl

  • is optional

  • Type: boolean

  • cannot be null

  • defined in: EMRALD_Model

mutExcl Type

boolean

newStates

Optional. If this is a transition action then these are the states that it could be transitioned to.

newStates

newStates Type

object[] (NewState)

scriptCode

Optionsl. Script code to be executed if the action type has a script

scriptCode

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

scriptCode Type

string

variableName

Optional. For change var value actions, the result of the script is assigned to this variable name reference.

variableName

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

variableName Type

string

codeVariables

Optional. If action has a script, these are the variable name references for variables used in the script. All variables used in script must be in this list.

codeVariables

  • is optional

  • Type: string[]

  • cannot be null

  • defined in: EMRALD_Model

codeVariables Type

string[]

sim3DMessage

Optional. For action type at3DSimMsg, this is the message to be sent to the coupled external simulation.

sim3DMessage

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

sim3DMessage Type

string

extSim

Optional. For action type at3DSimMsg, this is the name of the coupled external sim to send the message to.

extSim

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

extSim Type

string

sim3DVariable

Optional. For action type at3DSimMsg and a sim3DMessage of atCompModify, this is the name of the variable in the external simulation to be modified by the message.

sim3DVariable

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

sim3DVariable Type

string

openSimVarParams

Optional. For action type at3DSimMsg with a sim3DMessage of type atOpenSim, this flag indicates that the JSON has the properties for sim3DModelRef, sim3DConfigData, and simEndTime.

openSimVarParams

  • is optional

  • Type: boolean

  • cannot be null

  • defined in: EMRALD_Model

openSimVarParams Type

boolean

sim3DModelRef

Optional. For action type at3DSimMsg with a sim3DMessage of type atOpenSim, this is the data defined by the user that is used by the external simulation on startup. Typically a path to a model it need to open.

sim3DModelRef

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

sim3DModelRef Type

string

sim3DConfigData

Optional. For action type at3DSimMsg with a sim3DMessage of type atOpenSim, this is the data defined by the user that is used by the external simulation on startup.

sim3DConfigData

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

sim3DConfigData Type

string

simEndTime

Optional. For action type at3DSimMsg with a sim3DMessage of type atOpenSim, this is the end simulation time defined by the user that is used by the external simulation on startup.

simEndTime

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

simEndTime Type

string

makeInputFileCode

Optional. For action type atRunExtApp. It is the C# script to be executed and the result strig passed as a parameter to the executable to be run.

makeInputFileCode

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

makeInputFileCode Type

string

exePath

Optional. For action type atRunExtApp. It is the path of the exe to be run. It can be relative to the location of the EMRALD model.

exePath

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

exePath Type

string

processOutputFileCode

Optional. For action type atRunExtApp. It is the C# script to be executed after the accociated exe is ran. Typically it reads a result file and script typically returns a string list with +/-[StateName] to shift out or into a state because of the results..

processOutputFileCode

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

processOutputFileCode Type

string

formData

Used for executing applications with custom form data. This can be anything needed by the custom form, but in the end only the standard atRunExtApp fields are used to do the action.

formData

  • is optional

  • Type: unknown

  • cannot be null

  • defined in: EMRALD_Model

formData Type

unknown

template

Optional. For action type atRunExtApp. It is used for custom app form.

template

template Type

object (Details)

returnProcess

Optional. For action type atRunExtApp. It is flag to indicate the type of return from the processOutputFileCode. If rtNone then it has no return, othrwise the C# script must return a List of strings with +/-[StateName] to shift out or into a state.

returnProcess

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

returnProcess Type

string

changeLog

Type of the diagram.

changeLog

changeLog Type

object[] (ChangeLogItems)

raType

String for the run application action, only for UI used. Options depend on the custom UI forms made. "code" means default user defined pre and post execution code is used.

raType

  • is optional

  • Type: string

  • cannot be null

  • defined in: EMRALD_Model

raType Type

string

updateVariables

Used for custom form, variables used in the form.

updateVariables

  • is optional

  • Type: array

  • cannot be null

  • defined in: EMRALD_Model

updateVariables Type

array

required

If this is a template then it indicates the item must exist in the current model before using the template.

required

  • is optional

  • Type: boolean

  • cannot be null

  • defined in: EMRALD_Model

required Type

boolean