Getting Started

Log in to your WorkflowGen server

Before using the WorkflowGen CLI to interact with your WorkflowGen server, you need to log in to it. See the login section for more information.

wfg login http://localhost/wfgen -u wfgen_admin -p myPassword -c DEV

Managing a project

A project is composed of processes, sub-processes, custom workflow applications, global lists, and webform assets.

A project is based on a manifest file definition (see the Project Manifest section).

Managing a project with the CLI allows you to export or import the content easily.

Create a simple project

In most cases, a WorkflowGen project is composed of processes and sub-processes. The following manifest defines a project with one process and two sub-processes, with one global list:

  "version": "1.0",
  "tag": "1.2.0",
  "globalLists": [

You can use the project init command to build the manifest with the CLI, or write the definition directly in a manifest.json file.

If you add webform assets to your manifest, be sure that you have correctly set the path to the webform folder on the WorkflowGen server.

The webform path is also required if you want to export process code (contained in the Default.aspx file).

Export your project

Once your manifest.json file is correctly defined, you can use the project export command to download all sources' links to your project.

wfg project export -p pathToTheFolderWithTheManifest

For the manifest definition, you should have a folder structure like the following:

| manifest.json
| definitions/
|    globallists/
|        Country.Xml
|    subprocesses/
|        CREATE_AD_ACCOUNTv1.xml
|        CREATE_ERP_ACCESSv1.xml
|    processes/
| src/
|    processes/
|                V1/
|                    Default.aspx
|                    Default.aspx.cs
|                V1/
|                    Default.aspx
|                    Default.aspx.cs
|                V1/
|                    Default.aspx
|                    Default.aspx.cs

Import your project

With the project import command you can import your project into another WorkflowGen server (such as the production server).

wfg project import --source pathToYourProjectFolder

The CLI will import all definitions into your WorkflowGen application, and will create processes, sub-processes, applications, and global lists, and move webform assets to the webform folder.

Video example

Using a multiple server configuration

The CLI uses contexts to identify which server and user to use to connect to WorkflowGen. You can define more than one configuration, one for each of your WorkflowGen servers.

The login command contains the --context option to give a name to your context.

With the config get-contexts command you can display all contexts defined.

wfg config get-contexts


 | Current | Context name | Server name | User name  |
 |         | PROD         | CG9FDCK57K  | ZQPWB00VS3 |
 | *       | DEV          | CB6YHR11DD  | ACJTLYG0AZ |
 Count: 2

You can switch to another context with the config use-context command.

wfg config use-context PROD

Global options

The CLI provides some global options to give you some other information.


With the help option, you can get information on how to use a specific command or see which commands are available.

wfg --help


  wfg [options] [command]

  --version         Show version information
  -?, -h, --help    Show help and usage information

  login <url>
  graphql <query>


With the debug option, you can display more logs in your terminal during the command execution.

wfg process get --debug


The verbose option is like the debug option, but the CLI will display more logs than it does for debug.

wfg process get --verbose


The version option returns your current WorkflowGen CLI version.

wfg --version

Enabling tab completion

  1. Install the dotnet-suggest global tool:

    dotnet tool install --global dotnet-suggest
  2. Open your PowerShell profile and add the following code to it. You can get the path to your profile path with echo $PROFILE.

    # dotnet suggest shell start
    $availableToComplete = (dotnet-suggest list) | Out-String
    $availableToCompleteArray = $availableToComplete.Split([Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries) 
    Register-ArgumentCompleter -Native -CommandName $availableToCompleteArray -ScriptBlock {
        param($commandName, $wordToComplete, $cursorPosition)
        $fullpath = (Get-Command $wordToComplete.CommandElements[0]).Source
        $arguments = $wordToComplete.Extent.ToString().Replace('"', '\"')
        dotnet-suggest get -e $fullpath --position $cursorPosition -- "$arguments" | ForEach-Object {
            [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
    # dotnet suggest script end

Last updated