Apama API Reference for .NET  10.11.3.3
Apama.Services.Scenario.IScenarioInstance Interface Reference

IScenarioInstance supports getting the owner, last update time and current input/output parameter values of a scenario instance, listening for changes in individual instance parameters, and performing delete and edit operations on the instance. More...

Public Member Functions

void AddListener (PropertyChangedEventHandler listener)
 Add a listener to that will receive a notification each time an input or output parameter value changes. More...
 
void AddListener (string propertyName, PropertyChangedEventHandler listener)
 Add a listener to that will receive a notification each time a specified input or output parameter value changes. More...
 
bool Delete ()
 Delete this instance. More...
 
object GetValue (string parameterName)
 Get the value of a single specific (input or output) parameter of this instance. More...
 
void RemoveListener (PropertyChangedEventHandler listener)
 Remove a listener from the list of those interested in changes to any object property, or scenario instance parameter. More...
 
void RemoveListener (string propertyName, PropertyChangedEventHandler listener)
 Remove a listener from the list of those interested in changes to the object property with given name, or the scenario instance parameter with the given name. More...
 
bool SetValue (string parameterName, object value)
 Set the value of a single specific (input) parameter of this instance. More...
 
bool SetValues (Dictionary< string, object > valuesMap)
 Set several (input) parameter values of this instance. More...
 

Properties

long Id [get]
 Get the Id of the instance. More...
 
long LastUpdateTime [get]
 Get the timestamp (milliseconds) of the last known update event for this instance. The folloing events will set an update time - Created, Edited, Update. More...
 
string Owner [get]
 Get the owner (username) of the instance. More...
 
IScenarioDefinition ScenarioDefinition [get]
 Get the Scenario Definition. More...
 
InstanceState State [get]
 Get the current state of the instance. More...
 

Detailed Description

IScenarioInstance supports getting the owner, last update time and current input/output parameter values of a scenario instance, listening for changes in individual instance parameters, and performing delete and edit operations on the instance.

Member Function Documentation

◆ AddListener() [1/2]

void Apama.Services.Scenario.IScenarioInstance.AddListener ( PropertyChangedEventHandler  listener)

Add a listener to that will receive a notification each time an input or output parameter value changes.

Parameters
listenerproperty change listener to invoke.

◆ AddListener() [2/2]

void Apama.Services.Scenario.IScenarioInstance.AddListener ( string  propertyName,
PropertyChangedEventHandler  listener 
)

Add a listener to that will receive a notification each time a specified input or output parameter value changes.

Parameters
propertyNamename of the parameter to register interest in.
listenerproperty change listener to invoke.

◆ Delete()

bool Apama.Services.Scenario.IScenarioInstance.Delete ( )

Delete this instance.

Returns
true if the instance deleted, false otherwise.
Exceptions
IllegalCallingThreadExceptionif called from the data processing thread (i.e. from a PropertyChangeListener listening to an instance or definition).

◆ GetValue()

object Apama.Services.Scenario.IScenarioInstance.GetValue ( string  parameterName)

Get the value of a single specific (input or output) parameter of this instance.

Parameters
parameterNameThe name of the parameter to be retrieved.
Returns
The current value of the specified parameter.

◆ RemoveListener() [1/2]

void Apama.Services.Scenario.IScenarioInstance.RemoveListener ( PropertyChangedEventHandler  listener)

Remove a listener from the list of those interested in changes to any object property, or scenario instance parameter.

Parameters
listenerproperty change listener to remove from the interest list.

◆ RemoveListener() [2/2]

void Apama.Services.Scenario.IScenarioInstance.RemoveListener ( string  propertyName,
PropertyChangedEventHandler  listener 
)

Remove a listener from the list of those interested in changes to the object property with given name, or the scenario instance parameter with the given name.

Parameters
propertyNamename of the property or parameter to remove interest in.
listenerproperty change listener to remove from the interest list.

◆ SetValue()

bool Apama.Services.Scenario.IScenarioInstance.SetValue ( string  parameterName,
object  value 
)

Set the value of a single specific (input) parameter of this instance.

Parameters
parameterNameThe name of the parameter to be set.
valueThe new value.
Returns

true if edit was successful, false otherwise.

Exceptions
InvalidInputParameterExceptionwhen value is invalid. Note that future versions of this API may also throw this exception to indicate constraint violations.
IllegalCallingThreadExceptionif called from the data processing thread (i.e. from a PropertyChangeListener listening to an instance or definition).

◆ SetValues()

bool Apama.Services.Scenario.IScenarioInstance.SetValues ( Dictionary< string, object >  valuesMap)

Set several (input) parameter values of this instance.

Parameters
valuesMapa Map (key String parameterName : value Object) of the values to be set in this instance.
Returns

true if edit was successful, false otherwise.

Exceptions
InvalidInputParameterExceptionwhen any value in the valuesMap is invalid. Note that future versions of this API may also throw this exception to indicate constraint violations.
IllegalCallingThreadExceptionif called from the data processing thread (i.e. from a PropertyChangeListener listening to an instance or definition).

Property Documentation

◆ Id

long Apama.Services.Scenario.IScenarioInstance.Id
get

Get the Id of the instance.

Returns
The Id.

◆ LastUpdateTime

long Apama.Services.Scenario.IScenarioInstance.LastUpdateTime
get

Get the timestamp (milliseconds) of the last known update event for this instance. The folloing events will set an update time - Created, Edited, Update.

Returns
the timestamp from the last seen update event, as millis since the epoch.

◆ Owner

string Apama.Services.Scenario.IScenarioInstance.Owner
get

Get the owner (username) of the instance.

Returns
The owner.

◆ ScenarioDefinition

IScenarioDefinition Apama.Services.Scenario.IScenarioInstance.ScenarioDefinition
get

Get the Scenario Definition.

Returns
The Scenario Definition.

◆ State

InstanceState Apama.Services.Scenario.IScenarioInstance.State
get

Get the current state of the instance.

See also
InstanceState

for list of states

Returns
The current state of the instance
Submit a bug or feature
Copyright (c) 2013-2022 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.