Getting Started with WDK

The Workflow Developer Kit (WDK) accelerates building of workflows using a low-code environment with an optional graphical interface

Deployment Options

WDK offers a number of deployment options depending on your organization requirements and preferences:

1. Docker

The easiest way to get started is by using the WDK Docker image. This will require Docker Desktop to be installed but no other tooling is necessary.

If you wish to run WDK Studio, the graphical interface for WDK, then the WDK Studio Docker image is the only deployment option supported.

2. JAR

You can also download the latest JAR from the Releases page on the WDK repository. This will require a local Java runtime (11+) to be installed for launching the JAR, but no compilation is necessary.

3. Project

The last option involves a complete project where gradle is used to obtain the JAR and also to build custom activities. This approach is only for advanced use where WDK needs to be extended with custom behaviour.

Generate Project

The Symphony Generator offers a fast way to bootstrap your Symphony WDK project.

Prerequisite: Install NodeJS first, either directly or via nvm

$ npm i -g yo @finos/generator-symphony
$ mkdir wdk-bot && cd $_
$ yo @finos/symphony

This will prompt you with a number of questions about your bot and pod configuration. Type in your bot's information, using arrow keys to scroll and press enter to move on to the next prompt.

 __   __     ___                 _
 \ \ / /__  / __|_  _ _ __  _ __| |_  ___ _ _ _  _
  \ V / _ \ \__ \ || | '  \| '_ \ ' \/ _ \ ' \ || |
   |_|\___/ |___/\_, |_|_|_| .__/_||_\___/_||_\_, |
                 |__/      |_|                |__/


Welcome to Symphony Generator v2.7.1
Application files will be generated in folder: /home/user/code/wdk-bot
______________________________________________________________________________________________________
? Enter your pod host mycompany.symphony.com
? Enter your bot username wdk-bot
? Select your type of application Workflow Application (WDK) Docker

Generating RSA keys...
   create symphony/publickey.pem
   create symphony/privatekey.pem
   create symphony/application.yaml
   create startup.sh

No change to package.json was detected. No package manager install will be executed.

You can now update the service account wdk-bot with the following public key on https://mycompany.symphony.com/admin-console :

-----BEGIN RSA PUBLIC KEY-----
MIICCgKCAgEA7wBwCGQm30vU7krseefqhwRkENQFk6dtL12pmxZ91d+IIBwVioUj
...
LqPq1P4cmTqyKeVphuQ3B2vPpEJoqr1XTykg2B/k67+nat+gEGFZVbkCAwEAAQ==
-----END RSA PUBLIC KEY-----

Your workflow bot has been successfully generated !

Configuration

The WDK is built on top of the BDK for Java Spring Starter, so the BDK configuration options will all still apply to WDK instances.

pageConfiguration

There is also WDK-specific configuration:

wdk:
  workflows.path: .
  encrypt.passphrase: my-secret-passphrase
  properties:
    monitoring-token: my-monitoring-token
    management-token: my-management-token
  studio:
    github-token: my-github-token
    admins: 123456789,234567890

spring:
  datasource:    
    camunda.jdbc-url: jdbc:h2:file:./data/camunda;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
    wdk.jdbc-url: jdbc:h2:file:./data/wdk;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
WDK PropertyDescription

workflows.path

Path to directory where SWADL files are stored

encrypt.passphrase

Passphrase used to encrypt secrets

properties.monitoring-token

Token used to make calls to the Monitoring APIs

properties.management-token

Token used to make calls to the Management APIs

studio.github-token

GitHub token used to browse WDK Gallery in WDK Studio

studio.admins

Comma-separated list of user IDs who will have administrative permissions in WDK Studio

Spring PropertyDescription

datasource.camunda.jdbc-url

Connection string for workflow engine database

datasource.wdk.jdbc-url

Connection string for metadata database

Create Service Account

For any bot to work, it requires a service account with a matching username and public key. The Symphony Generator creates a configuration file based on the answers supplied, including the bot username and the path to the generated key pair. These can be changed by modifying the config.yaml file. If you do not already have a service account set up, follow the instructions on this page to continue.

pageCreating a Service Account

Test your Bot

Create a sample workflow in ./workflows/ping.swadl.yaml

id: ping
activities:
  - send-message:
      id: pong
      on:
        message-received:
          content: /ping
      content: Pong

Launch the WDK bot using the respective command and wait for startup to complete

$ ./startup.sh

Launch Symphony, send a /ping message to the bot and ensure it replies with Pong.

Build your Workflows

Now that you have a basic workflow project ready, you can proceed to find out more about building workflows using the WDK:

pageWorkflow Developer Kit

Last updated