Class ClientScriptingFunctions
java.lang.Object
com.inductiveautomation.sfc.client.scripting.ClientScriptingFunctions
- All Implemented Interfaces:
SfcScriptingFunctions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelChart
(UUID instanceId) Cancels the chart instance indicated byinstanceId
.void
debugResume
(UUID instanceId) Sends a message to the chart instance stopped at a breakpoint to resume normal operations.void
Sends a message to the chart instance stopped at a breakpoint to step to the next step.Returns information about the currently running charts.getRunningCharts
(String chartPath) Returns information about the currently running instances of a given chart path.getVariables
(UUID instanceId) Returns the chart scope for the specified instance.void
pauseChart
(UUID instanceId) Pause the chart instance indicated byinstanceId
.void
redundantCheckpoint
(UUID instanceId) For charts that have the "redundancy sync" setting enabled, this method synchronizes chart and step variables of the specified chart instance across the redundant cluster, allowing the instance to continue where it left off if a redundant failover occurs.void
resumeChart
(UUID instanceId) Resume the chart instance indicated byinstanceId
.void
setVariables
(UUID instanceId, UUID stepId, org.python.core.PyObject variablesMap) void
setVariables
(UUID instanceId, org.python.core.PyObject variablesMap) Updates the chart indicated byinstanceId
by copying all of the variables from the providedvariableMap
into the chart's scope.Start a Chart in ProjectprojectName
from the definition atchartPath
.startChart
(String chartPath, Map<String, Object> parameters) Start a chart in ProjectProject.GLOBAL_PROJECT_NAME
from the definition atchartPath
.
-
Constructor Details
-
ClientScriptingFunctions
public ClientScriptingFunctions()
-
-
Method Details
-
startChart
Description copied from interface:SfcScriptingFunctions
Start a chart in ProjectProject.GLOBAL_PROJECT_NAME
from the definition atchartPath
.- Specified by:
startChart
in interfaceSfcScriptingFunctions
- Parameters:
chartPath
- the path to the chart definition.parameters
- the parameters passed to the chart scope.- Returns:
- The
UUID
of the running chart instance. - Throws:
Exception
-
startChart
public UUID startChart(String projectName, String chartPath, Map<String, Object> parameters) throws ExceptionDescription copied from interface:SfcScriptingFunctions
Start a Chart in ProjectprojectName
from the definition atchartPath
.- Specified by:
startChart
in interfaceSfcScriptingFunctions
- Parameters:
projectName
- the name of the project the chart definition resides in.chartPath
- the path to the chart definition.parameters
- the parameters passed to the chart scope.- Returns:
- The
UUID
of the running chart instance. - Throws:
Exception
-
cancelChart
Description copied from interface:SfcScriptingFunctions
Cancels the chart instance indicated byinstanceId
.- Specified by:
cancelChart
in interfaceSfcScriptingFunctions
- Parameters:
instanceId
- theUUID
of the chart instance to stop.- Throws:
Exception
-
pauseChart
Description copied from interface:SfcScriptingFunctions
Pause the chart instance indicated byinstanceId
.- Specified by:
pauseChart
in interfaceSfcScriptingFunctions
- Parameters:
instanceId
- theUUID
of the chart instance to pause.- Throws:
Exception
-
resumeChart
Description copied from interface:SfcScriptingFunctions
Resume the chart instance indicated byinstanceId
.- Specified by:
resumeChart
in interfaceSfcScriptingFunctions
- Parameters:
instanceId
- theUUID
of the chart instance to resume.- Throws:
Exception
-
debugStep
Description copied from interface:SfcScriptingFunctions
Sends a message to the chart instance stopped at a breakpoint to step to the next step.- Specified by:
debugStep
in interfaceSfcScriptingFunctions
- Throws:
Exception
-
debugResume
Description copied from interface:SfcScriptingFunctions
Sends a message to the chart instance stopped at a breakpoint to resume normal operations.- Specified by:
debugResume
in interfaceSfcScriptingFunctions
- Throws:
Exception
-
getRunningCharts
Description copied from interface:SfcScriptingFunctions
Returns information about the currently running charts.- Specified by:
getRunningCharts
in interfaceSfcScriptingFunctions
- Returns:
- Chart information about all of the currently running charts.
- Throws:
Exception
-
setVariables
Description copied from interface:SfcScriptingFunctions
Updates the chart indicated byinstanceId
by copying all of the variables from the providedvariableMap
into the chart's scope.- Specified by:
setVariables
in interfaceSfcScriptingFunctions
- Parameters:
instanceId
- the of the chart instance to update.variablesMap
- a dictionary containing key-value pairs of serializable things to update in chart scope.
-
setVariables
- Specified by:
setVariables
in interfaceSfcScriptingFunctions
-
getRunningCharts
Description copied from interface:SfcScriptingFunctions
Returns information about the currently running instances of a given chart path.- Specified by:
getRunningCharts
in interfaceSfcScriptingFunctions
- Throws:
Exception
-
getVariables
Description copied from interface:SfcScriptingFunctions
Returns the chart scope for the specified instance. Step scopes for active steps are found under the "activeSteps" key.- Specified by:
getVariables
in interfaceSfcScriptingFunctions
- Throws:
Exception
-
redundantCheckpoint
Description copied from interface:SfcScriptingFunctions
For charts that have the "redundancy sync" setting enabled, this method synchronizes chart and step variables of the specified chart instance across the redundant cluster, allowing the instance to continue where it left off if a redundant failover occurs.- Specified by:
redundantCheckpoint
in interfaceSfcScriptingFunctions
- Parameters:
instanceId
- the UUID of the chart instance to update.- Throws:
Exception
- if the redundant peer is not set up or connected, or if the chart does not have redundancy sync enabled.
-