Getting Started

This page will guide you to create your workspace and your first Smartmate application in just a few minutes.

Pre-requisites

To develop Smartmate apps you will need the following software installed:

Installation

  1. Install the smartmate cli:

npm install -g smartmate-cli
  1. Install the smartmate-bpmn-editor extension in VSCode

Smartmate BPMN Editor VS Code Extension

Create your workspace

mkdir myWorkspace
cd myWorkspace
sm init

Add an application

You don’t need to start from scratch, we have some pre-built Smartmate apps that you can customize.

For this example, let’s add the vacationsApprovalSimple application.

sm add app

Select Add a prebuilt app from https://github.com/smartmate/apps and then select examples/vacationsApprovalSimple.

Open the folder using Visual Studio Code, and you will see a few .yaml, .bpmn20.xml and .pug files. They define the application.

This application has just one process, which is defined by 2 files: processes/requestVacations.yml and processes/requestVacations.bpmn20.xml.

When opening a .bpmn20.xml file in VSCode, a graphical BPMN editor will show up.

Vacations Approval Process

As you can see in the diagram, it’s a really simple process that starts when an employee request vacations. The request is then assigned to a manager to be approved. If approved, an email is sent. If rejected, an email is sent. If changes are requested, a “Make Changes” task is assigned to the initiator of the process.

The information of this process will be stored in the requests table, which is defined in the tables/request.yaml file.

The emails are defined in the templates/approved.pug and templates/rejected.pug files.

Publish your app

For now we will publish the application as it is, without modifying it. (Customizing an app will be covered later).

First login using the cli:

sm login myworkspace

Replace myworkspace with the name of your workspace. Then enter your username and password.

You are now ready to publish you app.

sm publish

Done! Use your app

Login to your workspace at smartmate.io.

You will see a Vacations Approval Simple Example application. You can configure in the app settings which users are managers and which users are employees. For now you can add yourself to both groups to test the process.

Vacations Approval Settings

At the app home, you are able to start the processes of the app, in this case we have just one process: Request Vacations.

Vacations Approval Smartmate UI

Start adding users and groups, and invite them to use the app you just published!