WaveMaker Docs

WaveMaker Docs

  • Get started
  • Widgets
  • Mobile
  • How-to
  • Enterprise
  • Releases
  • Blog
  • Sign-in

›Actions

Getting started

  • Introduction
  • Walkthrough

Pages

  • Pages Overview
  • Creating a Page
  • Layout and Styles

    • Page Layout
    • Templates
    • Themes
    • Accessibility

    Page Configure

    • Page Artefacts
    • Page Cache
    • Partial Page
    • Page Parameters
    • Examples

    Page Actions

    • Navigation
    • Events

    Custom Development

    • Theme Editor
    • Manual Theme
    • Create Template

SSPA

  • Micro Frontend App

Databases

  • Database Services Overview
  • Database Tools
  • Database Designing

    • Working with Databases
    • Data Modelling
    • DataBase Schema Modes
    • Working with DB Schema
    • Database Views
    • Temporal Support

    Accessing Database

    • Accessing Database

    Queries and Procedures

    • Working with Queries
    • Working with Stored Procedures
    • Version Queries & Procedures
    • Blob Queries and Procedures
    • Queries & Procedures - Java Services

    Database Variables & API

    • Database CRUD
    • CRUD Event Listeners
    • Database APIs
    • Database Service APIs

REST & SOAP

  • Web Services Overview
  • Restful

    • REST Services
    • Secure Server-side Properties
    • REST Request Timeouts
    • REST Services using OAuth 2.0

    SOAP

    • Working with SOAP Services
    • Imported SOAP APIs

    Websocket

    • Working with WebSockets

    APIs

    • API Designer
    • Mocking APIs
    • Mocking REST API
    • Swagger Import

    Variables

    • CRUD Variable
    • Service Variable
    • WebSocket Variable

Java Services

  • Java Service
  • Java Services

    • Java Integration Services
    • DB Service Integration
    • API Composition
    • Variables for Invocation
    • Generated REST APIs (API Designer)

    Java Services Variables & API

    • Variable for Java Service
    • Java Service APIs

    Source Files

    • Resources and Third-party Libraries
    • Using 3rd party JavaScript files
    • Using 3rd party jar files

Variables & Actions

    Variables

    • Variables Overview
    • Model Variable
    • Device Variables

    Binding

    • Variable Binding
    • Custom Formatter

    Actions

    • Actions
    • Navigation Action
    • Login Action
    • Logout Action
    • Timer Action
    • Notification Action

    Events

    • Events
    • JavaScript Access

Security

    App Security

    • Overview
    • Authentication
    • Authorization
    • Access Levels & Permissions
    • Login Configuration
    • Session Persistence
    • SSL Encryption
    • XSS antisamy policy configuration
    • OWASP
    • XSS Prevention
    • Central Authentication System
    • Token Based Authentication
    • SAML Integration
    • Secure Connection for Deployed Apps
    • Concurrent Sessions
    • HostHeader Injection

    Security Variable and API

    • Security Variables
    • Remember Me
    • Variable for Security Service
    • Security Service APIs

Developer options

  • Test and Run (Preview) Apps
  • Chrome Extension: Devtool
  • Debugging
  • Inspection Framework
  • Build Options
  • WaveMaker Mobile Apps Automation
  • Developer Integration

    • Project User Management
    • Developer Collaboration
    • Extending the Application using IDEs
    • Import, Export & Update Apps
    • Project Shells

    Add-ons

    • Localization
    • Artifacts Repository

Deployment

  • Overview
  • Deployment Profile
  • One-click Deployment
  • WaveMaker CI/CD Pipeline

    • Overview
    • Configuration Profiles
    • Configuration Management
    • Pipelines and Phases

    Pipeline Configuration

    • Default Pipelines in WMO
    • Configure Pipeline in WME

    Deploy to Cloud Providers

    • AWS
    • Azure
    • Google Cloud
    • DigitalOcean

    Pipeline Configuration cont.

    • Phase configurations
    • Webhooks Integration
    • Tests Integration

    Manage Deployed Apps

    • Manage Deployed Apps

    Integrate with your CI/CD Providers

    • Push Code to External repo
    • Custom VCS Integration
    • Export WaveMaker Application
    • Building Project with Maven
    • Build with Docker
    • Jenkins Integration
    • Deploy using Docker Compose
    • Deployment to Heroku

    WaveMaker apps Interation with CDN

    • App Integration with AWS CDN
    • App Integration with Azure CDN

    Deployment to external web servers

    • Application Server Overview
    • Deploy to Tomcat
    • WebSphere
    • JBoss - WildFly
    • WebLogic Server

Connectors

  • Introduction
  • Architecture
  • Import Connectors
  • List of Connectors
  • Build a New Connector

Teams

  • Overview
  • Team Setup
  • Dashboard
  • Manage Users
  • Manage Projects
  • Manage Prefabs
  • Project Branches
  • Manage Roles
  • Code Repository
  • Import VCS Project
  • Team Profile
  • Manage Subscription
  • FAQs
Edit

Timer Action

Timer action can be used to trigger events repeatedly at timed intervals.

Action Creation

  1. To create a Timer Action:
    • Select the Action option from Variables on the Workspace Toolbar and click New Action from the Actions dialog.
  2. A New Action wizard will open.
    1. Choose **Timer **Type
    2. Name - set by default which can be modified
    3. Owner - the scope of the Variable being created. By default it is set to Page, you can change it to Application if you want this variable to be available across the app.
    4. You can set the Properties (know more)
    5. Click Done to create the Action
  3. You will be directed to the Actions dialog, with the new action listed. As you can see:
    1. a Timer Action is created,
    2. the properties tab contains the behavior properties. Know more about properties.
    3. the events tab will contain the events that can be configured to trigger any action. Know more about events.

Properties

Timer Variables are special variables that can be used to trigger a particular event at regular time intervals.

PropertyDescription
Behavior
Trigger on page loadSelecting this option will ensure that the timer starts at page load.
Trigger after a delayDefines the time delay, in milliseconds, before triggering the specified event.
Repeat after delaySpecifies whether the timer is one-time or a repeating event.

Events

Once a Timer Action is triggered, if it is Page scoped, then the action (and its repeating event) is destroyed when you navigate away from the page. If it is App scoped, it has to be manually stopped through cancel method.

  1. on Timer Fire: This event will be triggered on the completion of the timer. If the Delay property on the Timer Action is set then the event is invoked after the milliseconds of time supplied in ‘delay’ property of the timer action. The event is invoked once if ‘repeating’ flag is off and repetitively after every ‘delay’ milliseconds if ‘repeating’ flag is on. The repeating Timer Action event can be stopped in either of the two ways:

    1. Calling the cancel method on the Timer Action through the script at any point in time.
    2. If it is Page scoped, the action (and its repeating event) is destroyed once you navigate away from the page. If it is App scoped, it has to be manually stopped through the above step.

    Usage Examples:

    You can assign a Variable (or multiple Variables) or a Javascript method with custom logic in for dynamic behavior as required.

  2. Call a Variable that fetches the updates from Employee database with the latest after every 30 seconds.

  3. A Variable that gives Facebook-like feeds after a certain timestamp. Assign Javascript to the onTimerFire event and write following logic. Once the Timer Action is triggered, if repeating property is set, then the variable will be invoked after every delay milliseconds.

    Page.timerAction1onTimerFire = function(variable, data){ // set the dynamic input on the variable Page.Variables.WebServiceVariabe.setInput('timestamp', Date.now()); Page.Variables.WebServiceVariabe.invoke(); };

Methods

invokecancel

invoke(object, success callback, error callback)

This method invokes the timer variable

Parameters:

  • options: object with no fields, an empty object has to be passed
  • success: callback
  • error: callback

Return Value: None

Example:

Page.Actions.timerAction1.invoke();

cancel()

This method aborts the timer variable.

Parameters: none

Return Value: none

Example:

Page.Actions.timerAction1.cancel();

< Variables & Actions

  1. Data Integration - Variables
  • 6.1 Binding Layer
    • i. Overview
  • 6.2 Variables and Actions
    • i. Overview
    • ii. Variables
      • a. Database CRUD
        • ○ Overview
        • ○ Variable Creation
        • ○ Properties
        • ○ Events
        • ○ Methods
      • b. Database API
        • ○ Overview
        • ○ Variable Creation
        • ○ Properties
        • ○ Events
        • ○ Methods
      • c. Web Service
        • ○ Overview
        • ○ Variable Creation
        • ○ Properties
        • ○ Events
        • ○ Methods
      • d. Java Service
        • ○ Overview
        • ○ Variable Creation
        • ○ Properties
        • ○ Events
        • ○ Methods
      • e. Security Service
        • ○ Overview
        • ○ Variable Creation
        • ○ Properties
        • ○ Events
        • ○ Methods
      • f. Model
        • ○ Overview
        • ○ Variable Creation
        • ○ Properties
        • ○ Events
        • ○ Methods
      • g. Device Variables
        • ○ Overview
        • ○ Services
        • ○ Operations
        • ○ Events
        • ○ Methods
        • ○ Usage
    • iii. Actions
      • i. Navigation
        • ○ Overview
        • ○ Action Creation
        • ○ Properties
        • ○ Methods
      • ii. Login
        • ○ Overview
        • ○ Action Creation
        • ○ Properties
        • ○ Data
        • ○ Events
      • iii. Logout
        • ○ Overview
        • ○ Action Creation
        • ○ Properties
        • ○ Events
      • iv. Timer
        • ○ Overview
        • ○ Action Creation
        • ○ Properties
        • ○ Events
        • ○ Methods
      • v. Notification
        • ○ Overview
        • ○ Action Creation
        • ○ Properties
        • ○ Events
        • ○ Methods
    • iv. Scoping
    • v. Variable Events
    • vi. Error Handling
  • 6.3 Variable Binding
    • i. Overview
    • ii. Data Binding
    • iii. Widget Binding
    • iv. Binding Options
  • 6.4 JavaScript Access
    • i. Overview
    • ii. Widget Controllers
    • iii. Page Scripting
    • iv. Script Access
Last updated on 11/27/2019 by Swetha Kundaram
← Logout ActionNotification Action →
  • Action Creation
  • Properties
  • invoke(object, success callback, error callback)
  • cancel()
WaveMaker
  • PRICING
  • PARTNERS
  • CUSTOMERS
  • ABOUT US
  • CONTACT US
Terms of Use | Copyright © 2013-2023 WaveMaker, Inc. All rights reserved.