Class: Timer

Timer

The Timer control can be used to fire any time-related event. A Timer control provides the following configuration properties in Process Designer:

Timeout value (msecs.): Specify the number of milliseconds before this timer "pops". integer
Repeatable: When enabled, the timer will repeat until stopped based on the interval set in the timeout boolean
Initially stopped: When true the timer does not start running until specifically started with the start() method. boolean

Events

On Timeout:
Description: Triggers when the timer times out. Will trigger multiple times if timer is set to repeatable.
Example:
${CounterDisplay}.setText(me.getTicks())
On Boundary Event:
Description: Triggers upon reaching a Stay On Page event after a boundary event is fired through this control. For information on the status context variable see the context.trigger() method in the Knowledge Center.
Example:
alert("Stay on Page status '" + status + "'")
Context Variables status {string}
Article(s)
Timer

new Timer()

This constructor is never used explicitly.

Extends

Members

Methods

Add/replace CSS class(es) for this control
Name Type Description
name string CSS class name(s) to add to the control. Separate class names by a space if more than one class.
replaced string optional CSS class name(s) to be replaced by the first argument. Separate class names by a space if more than one class.
Example
Button.addClass("green");

getTicks(){integer}

Returns the current number of timer ticks
Returns:
Type Description
integer

getTimeout(){integer}

Gets the timeout value (milliseconds)
Returns:
Type Description
integer timeout Milliseconds until timer ticks

getType(){string}

Get descriptive string representing the type of control
Returns:
Type Description
string

isRepeatable(){boolean}

gets the value of the Repeatable flag
Returns:
Type Description
boolean

isRunning(){boolean}

Indicates whether or not the timer is started
Returns:
Type Description
boolean
Propagates value change of control up through parent views
Name Type Description
event Event Value change event (usually an onchange event)
Returns:
Type Description
boolean True if a formula update was triggered on the control's parent, otherwise false
Example
MyView.propagateUp(event);

resetTicks(ticks)

Sets the current number of timer ticks to the specified value or 0 when unspecified
Name Type Default Description
ticks integer 0 optional Number of ticks to set
Show/hide the label of this view/control
Name Type Description
visible boolean Label visibility flag (true to show view label, false to hide)
Example
MyView.setLabelVisible(false);

setRepeatable(flag)

sets the Repeatable flag
Name Type Description
flag boolean {true | false} Set to true to make the timer repeatable

setTimeout(timeout)

Sets the timeout value (milliseconds)
Name Type Description
timeout integer Milliseconds until timer ticks

start()

Starts a timer

stop()

Stops a timer

toggle()

Toggles the timer on or off
Broadcasts the expression trigger for the specified view
Name Type Default Description
phase int bpmext.ui.PHASE_NORMAL optional The phase we are currently in
Example
MyView.triggerFormulaUpdates();