Libraries.System.ProcessEvent Documentation

This class represents an event that happened while using a process. There are four kinds, a process starting, stopping, output through standard out, or output through standard error. The event code needs to be checked in order to use the event.

Inherits from: Libraries.Language.Object

Variables Table

VariablesDescription
integer OUTPUT_EVENTThis constant indicates the process has output from standard out.
integer START_EVENTThis constant indicates the process has started.
integer STOP_EVENTThis constant indicates the process has stopped.
integer ERROR_EVENTThis constant indicates the process has output from standard error.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetEventCode()

This returns which event code is on this event.

Return

integer: the event code for the event.

GetExit()

Returns the exit code from the process. An exit code of 0 means that the process ended normally. Anything except for zero means that the process ended in an error. Non-zero codes, to our knowledge, do not have a standardized meaning, so they should not be relied upon.

Return

integer: the exit code.

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetName()

Returns the name of the process

Return

text: the name.

GetOutput()

Returns output from the process. Whether this was on standard error or standard out, the call is the same. The only different is that the event code will indicate where the output came from.

Return

text: the output.

GetParameters()

Returns the parameters of the process

Return

Libraries.Containers.Array: the parameters.

GetProcess()

Returns the process on which the event was fired.

Return

Libraries.System.Process: the process.

SetEventCode(integer code)

This sets the event code is on this event.

Parameters

  • integer code: the event code for the event.

SetExit(integer exit)

Returns the exit code from the process. An exit code of 0 means that the process ended normally. Anything except for zero means that the process ended in an error. Non-zero codes, to our knowledge, do not have a standardized meaning, so they should not be relied upon.

Parameters

  • integer exit: the exit code.

SetName(text name)

Sets the name of the process

Parameters

  • text name: the name of the process.

SetOutput(text out)

Sets output from the process. Generally, we need to set where the output is coming from and this is automatic by the system.

Parameters

  • text out: the output.

SetParameters(Libraries.Containers.Array<text> flags)

Sets the parameters of the process

Parameters

SetProcess(Libraries.System.Process process)

Sets the process on which the event was fired.

Parameters