Commands

The following commands can be executed by the Engine Command activity.

GetActivityStats

Retrieves information about the activities that have been executed for a given process definition from the time the process instrumentation statistics have been turned on. The process instrumentation statistics can be turned on in any of the following ways:
  • using the StartStatsCollection command
  • from the command line using the enablestats command
  • from the Admin UI to set the Process Instrumentation property
For information on using the command line and the Admin UI, see Enabling and Disabling Process Statistics in the TIBCO ActiveMatrix BusinessWorks™ Administration guide.

The activity information is cumulative. A single activity name represents all executions of that activity.

The ExecutionTime computation for the Call Process activity includes the sum of the execution times for all activities in the called process, not just the execution time for the Call Process activity itself.

Note: If the Process Definition Name is not defined in either the General tab or in the Input field, the command is executed for all processes in the application.
Input Item Datatype Description
ProcessDefinitionName string Name of the process definition.

Specifying a value for this element overrides the process definition specified on the General tab.

Output Item Datatype Description
ProcessDefinitionName string Name of the process definition.
ActivityName string Name of the activity.
ExecutionCount long Number of times the activity has been executed.
ElapsedTime long Elapsed time of an activity is the time difference (in milliseconds) between start time and end time of the activity. Between the start and end time, control may get switched with other activities from the other jobs. This is the time taken to execute an activity plus all the delays in acquiring resources like engine threads, JDBC connections, network, and so on.

The elapsed time includes the execution time plus time taken for evaluating all the forward transitions from that particular activity and getting the next activity ready to execute, which includes executing its input mapping if all dependencies are met.

ExecutionTime long The Execution Time for an activity is the actual time (in milliseconds) required by the activity to complete while using the engine thread. Asynchronous activities may use other threads not included in this time.
ErrorCount long Total number of executions of the activity that have returned an error.
LastReturnCode string Status code returned by most recent execution of this activity.
MinElapsedTime long Elapsed clock time (in milliseconds) of the activity execution that has completed in the shortest amount of elapsed time.
MaxElapsedTime long Elapsed clock time (in milliseconds) of the activity execution that has completed in the longest amount of elapsed time.
MinExecutionTime long Execution time (in milliseconds) of the activity execution that has completed in the shortest amount of execution time.
MaxExecutionTime long Execution time (in milliseconds) of the activity execution that has completed in the longest amount of execution time.
MostRecentElapsedTime long Elapsed clock time (in milliseconds) of the most recently completed activity execution.
MostRecentExecutionTime long Execution time (in milliseconds) of the most recently completed activity execution.
ExecutionCountSinceReset long Number of times the activity has been executed since the last reset of the statistics.

GetProcessDefinitionStats

Retrieves information about process definitions. The process instrumentation statistics can be turned on in any of the following ways:
  • using the StartStatsCollection command
  • from the command line using the enablestats command
  • from the Admin UI to set the Process Instrumentation property
For information on using the command line and the Admin UI see Enabling and Disabling Process Statistics in the TIBCO ActiveMatrix BusinessWorks™ Administration guide.
Note: If the Process Definition Name is not defined in either the General tab or in the Input field, the command is executed for all processes in the application.
Input Item Datatype Description
ProcessDefinitionName string Name of the process definition. Specifying a value for this element overrides the process definition specified on the General tab.
Output Item Datatype Description
ProcessDefinitionName string Name of the process definition.
NumberCreated long Number of process instances created for this process definition.
NumberSuspended long Number of times process instances have been suspended.
NumberAborted long Number of times process instances have been aborted.
NumberCompleted long Number of process instances that have successfully completed.
TotalExecutionTime long Total execution time (in milliseconds) for all successfully completed process instances.
AverageExecutionTime decimal Average execution time (in milliseconds) for all successfully completed process instances.
TotalElapsedTime long Total elapsed time (in milliseconds) for all successfully completed process instances.
AverageElapsedTime decimal Average elapsed clock time (in milliseconds) for all successfully completed process instances.
MinElapsedTime long Elapsed clock time (in milliseconds) of the process instance that has completed in the shortest amount of elapsed time.
MaxElapsedTime long Elapsed clock time (in milliseconds) of the process instance that has completed in the longest amount of elapsed time.
MinExecutionTime long Execution time (in milliseconds) of the process instance that has completed in the shortest amount of execution time.
MaxExecutionTime long Execution time (in milliseconds) of the process instance that has completed in the longest amount of execution time.
MostRecentExecutionTime long Execution time (in milliseconds) of the most recently completed process instance.
MostRecentElapsedTime long Elapsed clock time (in milliseconds) of the most recently completed process instance.
NumberCompletedSinceReset long Number of process instances that have completed since the last reset of the statistics.

GetProcessInstanceInfo

The values of the input elements for this command specify for which process instances you want to retrieve information. If you specify more than one input element, the values are treated as an AND condition. For example, If you specify the process definition name and the minimum duration, information for process instances for the specified process definition that meet the minimum duration time is returned.

Note: If the Process Definition Name is not defined in either the General tab or in the Input field, the command is executed for all processes in the application.
Input Item Datatype Description
ProcessId string ID for the process instance.
ProcessDefinitionName string Name of the process definition. Specifying a value for this element overrides the process definition specified on the General tab.
MinimumDuration string Minimum time (in milliseconds) in elapsed clock time since the process instance started. All process instances with greater elapsed times are retrieved.
Output Item Datatype Description
ProcessId string ID for the process instance.
ProcessDefinitionName string Name of the process definition.
Status string Status of the process.
StartTime string Time (in milliseconds) when the process instance started.
ElapsedTimeSinceStarted long Elapsed clock time (in milliseconds) since the process instance started.
MainProcessName string Name of the main process definition. If the process is a regular process, or a spawned subprocess, the name of the process is returned. If the process is an in-line subprocess, the name of the root process that initiated the subprocess call is returned.
ParentProcessName string Name of the parent process. If the process is a regular process, or a spawned subprocess, the parent process name is null. If the process is an inline-subprocess, the name of the immediate parent process is returned.
SubProcessName string Name of the subprocess. If the process is a regular process, or a spawned subprocess, the subprocess name is null. If the process is an inline-subprocess, the name of the subprocess is returned.

GetProcessStarterStats

Retrieves information about either active or inactive process starters. The information is cumulative. A single process starter name represents all executions of that process starter.

Output Item Datatype Description
ProcessName String Name of the process definition.
NumberCreated integer Number of process instances created by this process starter.
NumberCompleted integer Number of process instances that have completed.
NumberRunning integer Number of process instances currently executing.
NumberCreatedPerHour integer Number of process instances per hour created by this process starter.
StartTime String Time at which the process starter was started.
ElapsedTimeSinceStarted integer Elapsed clock time since the process starter was started.
ProcessStarterName String Name of the process starter. It is of the form processName+ProcessStarterName
Status String Status of the process starter. The status can be CANNOT_START, STARTED, or STOPPED.
RestartedFromCheckpoint boolean True if the process was restarted from a checkpoint.

GetRecoverableProcesses

Retrieves the process instances that can be recovered. Use the returned process ID in the RestartRecoverableProcess or RemoveRecoverableProces commands.

Output Item Datatype Description
ProcessId string ID for the process instance.
ProcessDefinitionName string Name of the process definition.
Status string Status of the process.

KillProcessInstance

Kills the specified process instance. The process instance is stopped immediately and permanently removed from the engine.

Input Item Datatype Description
ProcessId string Process ID of the process instance you want to kill.

RemoveRecoverableProcess

Removes the specified recoverable process instance from the list of potential recoverable processes. After executing this command, the checkpoint data of the specified process instance is removed and the process instance can no longer be recovered.

Input Item Datatype Description
ProcessId string Process ID of the checkpointed process instance you want to remove.

Obtain the process ID of the recoverable process with the GetRecoverableProcesses command.

RestartRecoverableProcess

Restarts the specified recoverable process instance.

Input Item Datatype Description
ProcessId string Process ID of the checkpointed process instance you want to restart.

Obtain the process ID of the recoverable process with the GetRecoverableProcesses command.

ResumeProcessInstance

Resumes the specified process instance.

Input Item Datatype Description
ProcessId string Process ID of the process instance you want to resume.

ResumeProcessStarter

Resumes the specified process starter.

Note: If the Process Definition Name is not defined in either the General tab or in the Input field, the command is executed for all process starters in the application.
Input Item Datatype Description
ProcessDefinitionName string The name of the process definition whose process starter you want to resume.

Specifying a value for this element overrides the process definition specified on the General tab.

StartStatsCollector

Enables process instrumentation statistics for the application in the current appnode.

StopStatsCollector

Disables process instrumentation statistics for the application in the current appnode.

StopApplication

Gracefully stops the application.

SuspendProcessInstance

Suspends the specified process instance.

Input Item Datatype Description
ProcessId string Process ID of the process instance you want to suspend.

SuspendProcessStarter

Suspends the specified process starter.

Note: If the Process Definition Name is not defined in either the General tab or in the Input field, the command is executed for all process starters in the application.
Input Item Datatype Description
ProcessDefinitionName string The name of the process definition whose process starter you want to suspend.

Specifying a value for this element overrides the process definition specified on the General tab.