Getting Started - arunkumarrawat/Wexflow GitHub Wiki

Getting Started Guide

Welcome to Wexflow! This guide will help you quickly understand how to start using Wexflow for workflow automation. Whether you are new to Wexflow or workflow automation in general, this guide will walk you through the basics step by step.

Wexflow is a powerful and flexible workflow engine that lets you create automated workflows easily. You can design workflows using a visual designer, write them in XML or JSON, and run them on your computer or server.

Table of Contents

  1. Prerequisites
  2. Admin Panel Login
  3. Designer Overview
  4. Workflow Syntax
    1. Workflow Sample
    2. Workflow Configuration
    3. Hot Reloading
    4. How Tasks Communicate
  5. Wexflow Manager
  6. Admin Panel
    1. Login
    2. Password Reset
    3. Dashboard
    4. Workflow Manager
    5. Workflow Designer
    6. Approval
    7. History
    8. Users
    9. Profiles
  7. Configuration
    1. .NET 4.8
    2. .NET 9.0+

Prerequisites

Before you begin, make sure Wexflow is installed on your system.

You can find detailed installation instructions here.

Admin Panel Login

Once Wexflow is installed, you can access the admin panel at:

Important: For your security, change the default password after your first login.

Designer Overview

Wexflow makes it easy to create automated workflows using different methods, depending on your preference or technical level.

You can design workflows in the following ways:

  • UI Designer
    This is a visual, drag-and-drop editor built into Wexflow’s web interface. It lets you create and manage workflows without writing any code. Ideal for beginners or users who prefer a user-friendly interface.

  • XML
    You can define workflows manually in XML files. This method gives you full control and flexibility over workflow configuration. It's great for developers or advanced users who want to customize workflows in detail.

  • JSON
    Similar to XML, but using JSON format. This is useful for users who are more comfortable with JSON syntax. It can also be used when integrating Wexflow into other systems or APIs that work with JSON.

Whether you choose the UI Designer or go with XML/JSON files, all workflows follow the same structure and logic. If you're just getting started, the UI Designer is a great place to begin!

Workflow Syntax

Workflow Sample

Understanding XML/JSON syntax is essential to mastering Wexflow.

Let's take a quick look at a simple example to understand how Wexflow works.

<?xml version="1.0" encoding="utf-8" ?>
<Workflow xmlns="urn:wexflow-schema" id="1" name="Sample" description="Sample workflow">
  <Settings>
    <Setting name="launchType" value="trigger" />
    <Setting name="enabled" value="true" />
    <Setting name="approval" value="false" />
    <Setting name="enableParallelJobs" value="true" />
    <Setting name="retryCount" value="0" />
    <Setting name="retryTimeout" value="1500" />
  </Settings>
  <LocalVariables />
  <Tasks>
    <Task id="1" name="FilesLoader" description="Load files" enabled="true">
      <Setting name="folder" value="C:\Input\" />
    </Task>
    <Task id="2" name="FilesMover" description="Move files" enabled="true">
      <Setting name="selectFiles" value="1" />
      <Setting name="destFolder" value="C:\Output\" />
    </Task>
  </Tasks>
</Workflow>

This sample workflow is named "Sample" and is designed to load files from a folder and move them to another folder. It consists of two tasks and is triggered manually.

Key Components

  • Workflow ID: 1
  • Name: Sample
  • Launch Type: trigger — This means the workflow runs manually (e.g., from Wexflow Manager or API).
  • Enabled: true — The workflow is active.
  • Approval: false — No manual approval is required.
  • Parallel Jobs: true — Workflow jobs can run in parallel.
  • Retry Count: 0 — Tasks won’t be retried on failure.
  • Retry Timeout: 1500ms — Time to wait between retries (if retry was enabled).

Tasks

  1. FilesLoader (id="1")

    • Description: Loads files.
    • Action: Reads all files from the folder C:\Input\.
  2. FilesMover (id="2")

    • Description: Moves files.
    • Action: Moves the files loaded by the first task into the folder C:\Output\.
    • It uses the selectFiles setting to reference the output of Task 1.
Task Names

Each task in a workflow must use a valid task name recognized by Wexflow. These task names correspond to built-in or custom tasks that define the specific action to be performed (e.g., file operations, database queries, sending emails, etc.).

In the sample workflow above, we used two tasks:

  • FilesLoader: loads files from a specified folder.
  • FilesMover: moves files to another folder.

You can find the full list of available task names, along with their descriptions, required settings, and usage examples in the official documentation:

If you're building custom tasks, make sure to register them properly and use unique names to avoid conflicts.

Tip: Use the TasksNames.json and TasksSettings.json files in the Wexflow configuration folder to customize task metadata used by the Designer UI.

What This Workflow Does

When triggered, Wexflow:

  1. Loads all files from C:\Input\.
  2. Passes them to the next task.
  3. Moves them into C:\Output\.

This workflow illustrates the basics of Wexflow: defining a sequence of tasks, configuring settings, and running them in order.

It's a perfect starting point to understand how Wexflow automates file-based operations.

If you don't define an <ExecutionGraph> in a workflow, the tasks will run sequentially in the order they are listed. To create a custom execution flow, you can define an <ExecutionGraph>. This allows you to:

  • Control the execution order of tasks.
  • Use flowchart logic nodes such as If, While, and Switch.
  • Nest flowchart nodes within each other to any depth.
  • Handle events like OnSuccess, OnWarning, and OnError to run specific flows when the workflow ends.

These features let you build complex, dynamic workflows adapted to your specific requirements.
You can learn more about the Execution Graph here.

Workflow Configuration

Below are all the configuration options of a workflow (XML):

<?xml version="1.0" encoding="utf-8" ?>
<!--
    This is the configuration file of a workflow. 
    A workflow is composed of:
      - An id which is an integer that must be unique.
      - A name which is a string that must be unique.
      - A description which is a string.
      - A Settings section which is composed of the following elements:
        - A launchType which is one of the following options:
          - startup: The workflow is launched when Wexflow Engine starts.
          - trigger: The workflow is launched manually from Wexflow Manager.
          - periodic: The workflow is launched periodically.
          - cron: The workflow is launched depending on a cron expression.
        - A period which is necessary for the periodic launchType. It is 
          a timeSpan in this format dd.hh:mm:ss. For example the period
          00.00:02:00 will launch the workflow every 2 minutes.
        - A cron expression which is necessary for the cron launchType.
          For example '0 0/2 * * * ?' will launch the workflow every 2 minutes.
        - The enabled option which allows to enable or disable a workflow.
          The possible values are true or false.
        - The approval option which marks the current workflow as an approval workflow.
          The possible values are true or false. An approval workflow must contain
          at least one Approval task or more.
        - The enableParallelJobs option Shows whether workflow jobs are executed in parallel. 
          Otherwise jobs are queued. Defaults to true.
        - The retryCount option allows to retry a task a certain number of times in case of
          failure. Defaults to 0 (no retry).
        - The retryTimeout option indicates the waiting time between two tries in milliseconds.
          Defaults to 1500ms.
      - A LocalVariables section which contains local variables.
      - A Tasks section which contains the tasks that will be executed by
        the workflow one after the other.
        - A Task is composed of:
          - An id which is an integer that must be unique.
          - A name which is one of the options described in the tasks documentation.
          - A description which is a string.
          - The enabled option which allows to enable or disable a task. The possible 
            values are true or false.
          - A collection of settings.
      - An ExecutionGraph section which contains the execution graph of the workflow.
-->
<Workflow xmlns="urn:wexflow-schema" id="$int" name="$string" description="$string">
  <Settings>
    <Setting name="launchType" value="startup|trigger|periodic|cron" />
    <Setting name="period" value="dd.hh:mm:ss" />
    <Setting name="cronExpression" value="$string" />
    <Setting name="enabled" value="true|false" />
    <Setting name="approval" value="true|false" />
    <Setting name="enableParallelJobs" value="true|false" />
    <Setting name="retryCount" value="0" />
    <Setting name="retryTimeout" value="1500" />
  </Settings>
  <LocalVariables>
    <Variable name="$string" value="$string" />
    <Variable name="$string" value="$string" />
    <!-- You can add as many variables as you want. -->
  </LocalVariables>
  <Tasks>
    <Task id="$int" name="$string" description="$string" enabled="true|false">
      <Setting name="$string" value="$string" />
      <Setting name="$string" value="$string" />
      <!-- You can add as many settings as you want. -->
    </Task>
    <Task id="$int" name="$string" description="$string" enabled="true|false">
      <Setting name="$string" value="$string" />
      <Setting name="$string" value="$string" />
    </Task>
    <!-- You can add as many tasks as you want. -->
  </Tasks>
  <!-- This section is optional and described in the samples section. -->
  <ExecutionGraph />
</Workflow>

For cron workflows, read the following documentation for more details.

Local variables are explained here.

Global variables are explained here.

The name option of a Task must be one of the names listed in the following documentation. You can find the documentation of each task in the Documentation folder of Wexflow.

The execution graph is explained in the samples section.

To learn how to make your own workflows, you can check out the workflow samples availabe in the Designer, in the samples section, and read the tasks documentation available in Configuration folder.

Hot Reloading

Wexflow detects changes and automatically adds, deletes, or reloads workflows. No service restart required.

To disable a workflow, set:

<Setting name="enabled" value="false" />

Wexflow supports hot reloading from a default folder called Workflows if you want to work with XML files without using the Designer. If the setting EnableWorkflowsHotFolder is enabled in the configuration file, any XML placed in the Workflows folder will be automatically picked up by Wexflow. This allows you to create, update, or remove workflows on the fly by simply editing files in that folder — no need to restart the service or reload manually.

How Tasks Communicate

State is transferred between tasks through selectFiles and selectEntities settings.

This works the following way:

  1. A task in a workflow does its job and produces files which it stores in a collection.
  2. Another task (must be in the same workflow) can afterwards reference those files with the selectFiles XML property, specifying the ID of the task that produced the required files. It then can use these files to do its own job.

More visually (from the examples):

<Workflow xmlns="urn:wexflow-schema" id="1" name="Workflow_Invoices" description="Workflow_Invoices">
    <Settings>
        <Setting name="launchType" value="trigger" />
        <Setting name="enabled" value="true" />
    </Settings>
    <Tasks>
        <Task id="1" name="FilesLoader" description="Loading invoices" enabled="true">
            <Setting name="folder" value="C:\WexflowTesting\Invoices\" />
        </Task>
        <!-- some more tasks here -->
        <Task id="6" name="FilesMover" description="Moving invoices" enabled="true">
            <Setting name="selectFiles" value="1" />
            <Setting name="destFolder" value="C:\WexflowTesting\Invoices_sent\" />
        </Task>
    </Tasks>
</Workflow>

selectFiles can also load files through custom tags. Refer to Xslt task for this.

selectEntities setting works the same way as selectFiles. The only difference is that selectEntities is designed to be used for tasks that manipulate custom objects from a database or web services in custom tasks. To go further, read this documentation regarding entities.

Wexflow Manager

Wexflow Manager

When you open Wexflow Manager for the first time, you will get a login window.

Here are the credentials to sign in:

  • Username: admin
  • Password: wexflow2018

You can change the password from the admin panel.

Wexflow Manager is a simple application that allows you to do the following things:

  • See all the workflows loaded by Wexflow Engine.
  • See the status of the selected workflow (running, suspended, waiting for approval or disabled).
  • Start a workflow.
  • Stop a workflow.
  • Suspend a workflow.
  • Resume a workflow.
  • Approve an approval workflow.
  • Reject an approval workflow.
  • The "Backend" button opens the admin panel from which you can manage workflows, design workflows, track workfows and have real-time statistics on workflows.
  • The "Logs" button allows to view the logs of the day.
  • The "Refresh" button allows to reload the list of workflows.
  • The "Restart server" button allows to restart Wexflow Server.
  • The "Search" button allows to search for workflows.
  • The "Help" menu opens the help page.
  • The "About" menu shows the version of Wexflow and checks if a new version is available.

To see what's going on in Wexflow, open the log file C:\Program Files\Wexflow\Wexflow.log in a text editor like Notepad++. Notepad ++ will update the log file as it fills up.

Admin Panel

The admin panel is accessible at: http://localhost:8000

The admin panel gives real-time statistics on workflows. It will let you manage, design and track your workflows with ease and flexibility. You can use the admin panel to access, configure, manage, administer, and develop your workflows with ease.

Login

When you open the admin panel for the first time, you will get a login window.

Here are the credentials to sign in:

  • Username: admin
  • Password: wexflow2018

After you sign in, you can change the password from the "Users" page.

Password reset

If a user forgot his password, he can click on "Forgot password?" link to reset his password.

When the user clicks on "Submit" button, an email is sent to him with a temporary password that he can change after he signs in.

To allow the admin panel sending emails, the SMPT configuration must be set in the configuration.

Dashboard

Dashboard

After you sign in, you will arrive on the dashboard page. Wexflow gives you a beautiful dashboard to view real-time statistics on your workflows. Indeed, the "Dashboard" page gives you real-time statistics on workflows and will let you track your workflow server with ease and detail. From the dashboard, you can also filter the workflow entries by a keyword or by date. You can also order the workflow entries by date, by name, etc.

Workflow Manager

Manager

The "Manager" page will let you manage your workflows. From this page you can start a workflow, suspend a running workflow, resume a suspended workflow, stop a running workflow and search for workflows.

Workflow Designer

Designer

The "Designer" page will let you design your workflows. From this page you can create a new workflow, edit an existing workflow or delete a workflow. Using the "Designer" page, we get a nice visual overview of the dependency graph of the workflow. Each node represents a task which has to be run.

Furthermore, the "Designer" page allows to edit workflow files through its Web XML or JSON editor.

Press Ctrl+S to save your workflow.

Press Ctrl+Alt+H in XML or JSON view for keyboard shortcuts.

Approval

The "Approval" page will let you view all approval workflows and will let you approve or disapprove workflows.

History

Logs

The "History" page will let you track all your workflows and everything that happens on the workflow server.From this page you will have an overview of all the workflow instances executed on the workflow server. Furthermore, you can filter the entries by keywords or date. You can also order the entries by date, by name, etc.

Users

The "Users" page allows to create new users, change passwords and user's informations, and delete users who have restricted access.

A user who has restricted rights has only access to the "Dashboard" page and the "History" page.

Profiles

The "Profiles" page allows to assign workflows to users. Once the workflow assigned, the user can run it, modify it and delete it.

Configuration

Wexflow works out of the box with zero configuration. You can install it and start running workflows immediately.

However, if you want to customize the behavior of the engine or environment, it’s helpful to know where the configuration files are and what they do. Below is an overview for both .NET 4.8 and .NET 9.0+ versions.

.NET 4.8

When installing Wexflow on .NET 4.8, the following folders are created:

  • C:\Wexflow\ — Main configuration folder
  • C:\WexflowTesting\ — Contains test data for workflows

Contents of C:\Wexflow\:

  • Wexflow.xml
    Main configuration file of the Wexflow server. Its path can be customized in
    C:\Program Files\Wexflow\Wexflow.Server.exe.config.

  • Database/
    Contains the internal database used by the Wexflow engine.

  • Workflows/
    Default folder for workflows. Used for hot reloading if
    EnableWorkflowsHotFolder is enabled.

  • Temp/
    Temporary working directory.

  • Tasks/ (optional)
    Can contain .dll files for custom tasks.

  • Workflow.xsd
    XML Schema Definition file for validating workflows.

  • GlobalVariables.xml
    Stores global variables accessible across workflows.

  • TasksNames.json
    Maps task names for use in the Designer interface. Refer to
    Tasks documentation.

  • TasksSettings.json
    Defines default task settings used by the Designer.

Log files:

  • Daily logs are written to C:\Program Files\Wexflow\Wexflow.log.
  • Archived logs follow this pattern: Wexflow.logyyyyMMdd.

.NET 9.0+

On .NET 9.0+, Wexflow supports cross-platform configuration:

Windows

  • Folders:
    C:\Wexflow-dotnet-core\ and C:\WexflowTesting\

  • Main config:
    C:\Wexflow-dotnet-core\Wexflow.xml (configured via Wexflow.Server\appsettings.json)

  • Logs:
    Written to Wexflow.Server\Wexflow.log

Linux

  • Folders:
    /opt/wexflow/Wexflow/ and /opt/wexflow/WexflowTesting/

  • Main config:
    /opt/wexflow/Wexflow/Wexflow.xml (configured via /opt/wexflow/Wexflow.Server/appsettings.json)

  • Logs:
    Written to /opt/wexflow/Wexflow.Server/Wexflow.log

macOS

  • Folders:
    /Applications/wexflow/Wexflow/ and /Applications/wexflow/WexflowTesting/

  • Main config:
    /Applications/wexflow/Wexflow/Wexflow.xml (configured via /Applications/wexflow/Wexflow.Server/appsettings.json)

  • Logs:
    Written to /Applications/wexflow/Wexflow.Server/Wexflow.log

For advanced setup, see the full Configuration documentation.

⚠️ **GitHub.com Fallback** ⚠️