List of Commands

login

The login command lets you add your WorkflowGen credentials to authorize the CLI. The CLI supports basic and Open ID Connect authentication.

Basic or Integrated Windows authentication

1
wfg login [WORKFLOWGEN_URL] -u [WORKFLOWGEN_USERNAME] -p [WORKFLOWGEN_PASSWORD] --password-file [PASSWORD_PATH] -c [CONTEXT_NAME]
Copied!
Basic and Integrated Windows authentication are available since WorkflowGen version 7.0.0.

Auth0 authentication

1
wfg login [WORKFLOWGEN_URL] --authentication-mode AUTH0 --domain [DOMAIN] --client-id [CLIENT_ID] --client-secret [CLIENT_SECRET] -c [CONTEXT_NAME]
Copied!
Auth0 authentication is available since WorkflowGen version 7.11.0.

MSIDV2 (Microsoft Identity Platform v2) authentication

1
wfg login [WORKFLOWGEN_URL] --authentication-mode MSIDV2 --tenant-id [TENANT_ID] --client-id [CLIENT_ID] --client-secret [CLIENT_SECRET] -c [CONTEXT_NAME]
Copied!
MSIDV2 authentication is available since WorkflowGen version 7.16.0.
For MSIDV2 mode, you must first have registered a new dedicated application (server-side application) in your Azure Active Directory and on your WorkflowGen server by following the instructions in the Azure AD Configuration for Server-Side Scripts chapter in the WorkflowGen for Azure guide.
All of the operations invoked from the WorkflowGen CLI will therefore use the user account specific in the Impersonate username field of the Non-interactive client application associated to the WorkflowGen CLI in WorkflowGen.

Okta authentication

1
wfg login [WORKFLOWGEN_URL] --authentication-mode OKTA --metadata-url [METADATA_URL] --client-id [CLIENT_ID] --client-secret [CLIENT_SECRET] -c [CONTEXT_NAME]
Copied!
Okta authentication is available since WorkflowGen version 7.13.0.

AD FS authentication

1
wfg login [WORKFLOWGEN_URL] --authentication-mode ADFS --domain [DOMAIN] --client-id [CLIENT_ID] --client-secret [CLIENT_SECRET] -c [CONTEXT_NAME]
Copied!
AD FS authentication is available since WorkflowGen 7.11.0.

Argument

Name
Type
Description
Behavior
url
String
WorkflowGen URL
Required

Options

Alias
Type
Description
Default value
Behavior
--username or -u
String
WorkflowGen username
None
Required
--password or -p
String
WorkflowGen password
None
Optional
--webforms or -w
String
Webforms path
C:\inetpub\wwwroot\wfgen\wfapps\webforms
Optional
--context or -c
String
Context name
DEFAULT
Optional
--authentication-mode
String
Authentication mode (BASIC, AUTH0, MSIDV2, ADFS, OKTA)
BASIC
Facultatif
--client-id
String
Client's public identifier
None
Facultatif
--domain
String
ADFS or AUTH0 domain
Aucune
Facultatif
--tenant-id
String
MSIDV2 tenant ID
None
Facultatif
--metadata-url
String
OKTA metadata URL
Aucune
Facultatif
--client-secret
String
Data known only to the application and the authorization server
Aucune
Facultatif
--client-secret-file
String
File containing the client secret known only to the application and the authorization server
None
Facultatif
--port
String
WorkflowGen port
None
​

πŸ“Œ Basic authentication login examples

1
wfg login http://localhost/wfgen -u wfgen_admin -p myPassword
Copied!
1
wfg login http://localhost/wfgen -u wfgen_admin --password-file ./path/to/password.txt
Copied!

πŸ“Œ Auth0 login examples

1
wfg login http://localhost/wfgen --authentication-mode AUTH0 --domain myDomain.auth0.com --client-id myClientId
Copied!
1
wfg login http://localhost/wfgen --authentication-mode AUTH0
Copied!

πŸ“Œ MSIDV2 login examples

1
wfg login http://localhost/wfgen --authentication-mode MSIDV2 --tenant-id myTenantId --client-id myClientId
Copied!
1
wfg login http://localhost/wfgen --authentication-mode MSIDV2 --tenant-id myTenantId --client-id myClientId --client-secret myClientSecret
Copied!

πŸ“Œ Okta login examples

1
wfg login http://localhost/wfgen --authentication-mode OKTA --metadata-url https://MyOktaDomain/.well-known/openid-configuration --client-id myClientId
Copied!
1
wfg login http://localhost/wfgen --authentication-mode OKTA --metadata-url https://MyOktaDomain/.well-known/openid-configuration --client-id myClientId --client-secret myClientSecret
Copied!

πŸ“Œ AD FS login examples

1
wfg login http://localhost/wfgen --authentication-mode ADFS --domain myAdfsDomain --client-id myClientId
Copied!
1
wfg login http://localhost/wfgen --authentication-mode ADFS --domain myAdfsDomain --client-id myClientId --client-secret myClientSecret
Copied!

config

The config command lets you configure the CLI.
Available since WorkflowGen version 7.0.0.

current-context

Displays the current context.

Usage

1
wfg config current-context
Copied!

delete-context

Deletes the specified context from the configuration.

Usage

1
wfg config delete-context [CONTEXT_NAME]
Copied!
[CONTEXT_NAME] represents the name given to the CLI context that contains your server and user information.

Argument

Name
Type
Description
Behavior
name
String
Name of the context to delete
Required

πŸ“Œ Example

1
wfg config delete-context WFGEN_PROD
Copied!

delete-server

Deletes the specified server from the configuration.

Usage

1
wfg config delete-server [SERVER_NAME] --force
Copied!

Argument

Name
Type
Description
Behavior
name
String
Name of the server to delete
Required

Option

Alias
Type
Description
Default value
Behavior
--force or -f
Boolean
Force the server deletion and delete associated contexts
false
Optional

πŸ“Œ Example

1
wfg config delete-server WFGEN_PROD_SERVER --force
Copied!

delete-user

Deletes the specified user from the configuration.

Usage

1
wfg config delete-user [USER_NAME] --force
Copied!

Argument

Name
Type
Description
Behavior
name
String
Name of the user to delete
Required

Option

Alias
Type
Description
Default value
Behavior
--force or -f
Boolean
Forces the user deletion and deletes associated contexts
false
Optional

πŸ“Œ Example

1
wfg config delete-user ADMIN_PROD_ACCOUNT --force
Copied!

get-contexts

Describes one or several contexts.

Usage

1
wfg config get-contexts [CONTEXT_NAME1] [CONTEXT_NAME2] [CONTEXT_NAME3]
Copied!
[CONTEXT_NAME] represents the name given to the CLI context that contains your server and user information.

Argument

Name
Type
Description
Behavior
names
String
Name(s) of context(s) to get
Optional

πŸ“Œ Example

1
wfg config get-contexts WFGEN_PROD
Copied!

get-servers

Displays servers defined in the configuration.

Usage

1
wfg config get-servers
Copied!

get-users

Displays users defined in the configuration.

Usage

1
wfg config get-users
Copied!

rename-context

Renames a context in the configuration.

Usage

1
wfg config rename-context [CONTEXT_OLD_NAME] [CONTEXT_NEW_NAME]
Copied!
[CONTEXT_NAME] represents the name given to the CLI context that contains your server and user information.

Arguments

Name
Type
Description
Behavior
old-name
String
Context name to rename
Required
new-name
String
New context name
Required

πŸ“Œ Example

1
wfg config rename-context WFGEN_PROD WFGEN_DEV
Copied!

rename-server

Renames a server in the configuration.

Usage

1
wfg config rename-server [SERVER_OLD_NAME] [SERVER_NEW_NAME]
Copied!

Arguments

Name
Type
Description
Behavior
old-name
String
Server name to rename
Required
new-name
String
New server name
Required

πŸ“Œ Example

1
wfg config rename-server WFGEN_PROD_SERVER WFGEN_DEV_SERVER
Copied!

rename-user

Renames a user in the configuration.

Usage

1
wfg config rename-user [USER_OLD_NAME] [USER_NEW_NAME]
Copied!

Arguments

Name
Type
Description
Behavior
USER_OLD_NAME
String
Username to rename
Required
USER_NEW_NAME
String
New username
Required

πŸ“Œ Example

1
wfg config rename-user ADMIN_PROD_ACCOUNT ADMIN_DEV_ACCOUNT
Copied!

set-context

Sets a context entry in the configuration.

Usage

1
wfg config set-context [CONTEXT_NAME] --server [SERVER_NAME] --user [USER_NAME]
Copied!
[CONTEXT_NAME] represents the name given to the CLI context that contains your server and user information.

Argument

Name
Type
Description
Behavior
name
String
Context name
Required

Options

Alias
Type
Description
Default value
Behavior
--server or -s
String
Server name
None
Required
--user or -u
String
Username
None
Required

πŸ“Œ Example

1
wfg config set-context WFGEN_PROD --server WFGEN_PROD_SERVER --user ADMIN_PROD_ACCOUNT
Copied!

set-server

Sets a server entry in the configuration.

Usage

1
wfg config set-server [SERVER_NAME] --url [URL] --version [SERVER_VERSION]
Copied!

Argument

Name
Type
Description
Behavior
name
String
Server name
Required

Options

Alias
Type
Description
Default value
Behavior
--url or -u
String
WorkflowGen URL
None
Optional
--webforms or -w
String
WorkflowGen webforms path
None
Optional
--version or -v
String
WorkflowGen version
None
Optional

πŸ“Œ Example

1
wfg config set-server WFGEN_PROD_SERVER --url http://localhost/wfgen/admin --version 7.22.0
Copied!

set-user

Sets a user entry in the configuration.

Usage

1
wfg config set-user [USER_NAME] --username [USER_USERNAME] --password [USER_PASSWORD]
Copied!

Argument

Name
Type
Description
Behavior
name
String
Username
Required

Options

Alias
Type
Description
Default value
Behavior
--username or -u
String
WorkflowGen username
None
Required
--password or -w
String
WorkflowGen password
None
Required

πŸ“Œ Example

1
wfg config set-user ADMIN_PROD_ACCOUNT --username wfgen_admin --password QWRtaW4xMjMh
Copied!

use-context

Sets the current context in the configuration.

Usage

1
wfg config use-context [CONTEXT_NAME]
Copied!

Argument

Name
Type
Description
Behavior
name
String
Context name
Required

πŸ“Œ Example

1
wfg config use-context WFGEN_PROD
Copied!
[CONTEXT_NAME] represent the name given to the CLI context that contains your server and user information.

project

The project command lets you either export or import an entire WorkflowGen project from a manifest.
Available since WorkflowGen version 7.17.0.

init

The init command allow you to generate a manifest.json file interactively.
Usage
1
wfg project init --path projectPath
Copied!
Options
Alias
Type
Description
Default value
Behavior
--path or -p
String
Directory path where the project will be initialized
Current directory
Optional
--bare
Boolean
Generates a manifest.json file with the bare minimum content
false
Optional
--force or -f
Boolean
Forces the manifest.json generation
false
Optional

πŸ“Œ Examples

1
wfg project init --path ./MyProject
Copied!
1
wfg project init --path ./MyProject --bare --force
Copied!

export

Exports a project from your WorkflowGen server to a local repository.

Usage

1
wfg project export --path [PROJECT_PATH]
Copied!

Option

Alias
Type
Description
Default value
Behavior
--path or -p
String
Path to folder where the project's manifest and files are located.
Current directory
Optional

πŸ“Œ Example

1
wfg project export --path ./MyProject
Copied!

import

Imports a project from a local repository to your WorkflowGen server.

Usage

1
wfg project import --source [PATH] --force
Copied!

Options

Alias
Type
Description
Default value
Behavior
--source or -s
String
Project path
Current directory
Optional
--force or -f
Boolean
Updates the project's existing global lists and applications
false
Optional

πŸ“Œ Example

1
wfg project import --source c:\repository
Copied!

show

Displays the content of a manifest link to a project.
Usage
1
wfg project show --path [PROJECT_PATH]
Copied!

Option

Alias
Type
Description
Default value
Behavior
--path or -p
String
Project path
Current directory
Optional

πŸ“Œ Example

1
wfg project show --path c:\repository
Copied!

process

The process command lets you export, import, get, update, or delete a process.
Available since WorkflowGen version 7.17.0.

export

Exports a specific process from your WorkflowGen server to a local repository.

Usage

1
wfg process export [PROCESS_NAME] [PROCESS_VERSION] --destination [PATH]
Copied!

Arguments

Name
Type
Description
Behavior
name
String
Process name
Required
version
Int
Process version
Required

Option

Alias
Type
Description
Default value
Behavior
--destination or -d
String
Export path
Current directory
Optional

πŸ“Œ Example

1
wfg process export SIMPLE_APPROVAL 1
Copied!

import

Imports a specific process from a local repository to your WorkflowGen server.

Usage

1
wfg process import [PROCESS_PATH] --useVersionNumber --state [STATE] --folder [PROCESS_FOLDER]
Copied!

Argument

Name
Type
Description
Behavior
file-path
String
Path of the process XML file
Required

Options

Alias
Type
Description
Default value
Behavior
--use-version-number
Boolean
Use the process version from the XML file
false
Optional
--state or -s
String
Specify with which status the process will be imported
TEST
Optional
--folder
String
Destination name of the process folder into which to import the process; the folder should exist
DEFAULT
Optional

UseVersionNumber

    <use-version-number = true> will try to add the process with the version number inside the XML file, if it doesn't already exist.
    <use-version-number = false> will add the process with the latest version number plus one (e.g. if the latest current version is 3, setting this to false will import the process as version 4).

state

The state can be one of the following:
    TEST (default)
    ACTIVE
    DEV
    ARCHIVE

πŸ“Œ Example

1
wfg process import c:\repository\SIMPLE_APPROVALv1.xml
Copied!

get

Displays one or several processes.

Usage

1
wfg process get [PROCESS_NAME] [PROCESS_VERSION] --output
Copied!

Arguments

Name
Type
Description
Behavior
name
String
Process name
Optional
version
Int
Process version
Optional (except if a name is specified)

Option

Alias
Type
Description
Default Value
Behavior
--output or -o
String
Define the output format. Valid values: json, table.
table
Optional

πŸ“Œ Example

1
wfg process get SIMPLE_APPROVAL 1 -o json
Copied!

update

Updates information for a single process.

Usage

1
wfg process update [PROCESS_NAME] [PROCESS_VERSION] -d [DESCRIPTION] -s [STATE]
Copied!

Arguments

Name
Type
Description
Behavior
name
String
Process name
Required
version
Int
Process version
Required

Options

Alias
Type
Description
Default value
Behavior
--description or -d
String
Specifies the description with which the process will be updated
None
Optional
--state or -s
String
Specify with which status the process will be updated
None
Optional

state

The state can be one of the following:
    TEST
    ACTIVE
    DEV
    ARCHIVE

πŸ“Œ Example

1
wfg process update SIMPLE_APPROVAL 1 -s DEV
Copied!

delete

Deletes a single process by name and version.

Usage

1
wfg process delete [PROCESS_NAME] [PROCESS_VERSION]
Copied!

Arguments

Name
Type
Description
Behavior
name
String
Process name
Required
version
Int
Process version
Required

πŸ“Œ Example

1
wfg process delete SIMPLE_APPROVAL 1
Copied!

test

Runs test cases of your processes.
Usage
1
wfg process test [PATH_TEST_FILES] --verbosity [LEVEL] --doctor
Copied!
Arguments
Name
Type
Description
Behavior
test-files
String
Path(s) to the test file(s)
Required
Option
Name
Type
Description
Behavior
--verbosity or -v
String
Establishes the level of verbosity
Possible values: q[uiet],n[ormal] (default) ,d[etailed]
Optional
--doctor
String
Check if test cases are compliant. Only available as of WorkflowGen version 8.0.3.
Optional
πŸ“Œ Example
1
wfg process test c:\repository\SIMPLE_APPROVALv1_Test.json c:\repository\SIMPLE_REQUESTv1_Test.json --verbosity quiet
Copied!
πŸ“Œ Example of a test file
1
{
2
"processName": "SIMPLE_APPROVAL",
3
"processVersion": 1,
4
"tests": [
5
{
6
"describe": "First test",
7
"requestParameters": [],
8
"actions": [
9
{
10
"name": "INITIATES",
11
"operation": "COMPLETE",
12
"parameters": [
13
{
14
"name": "REQUEST_SUBJECT",
15
"textValue": "OK"
16
}
17
],
18
"assertions": {
19
"status": "CLOSED",
20
"subStatus": "COMPLETED"
21
}
22
},
23
{
24
"name": "VALIDATES",
25
"operation": "COMPLETE",
26
"parameters": [
27
{
28
"name": "APPROVAL_DECISION",
29
"textValue": "YES"
30
}
31
],
32
"assertions": {
33
"status": "CLOSED",
34
"subStatus": "COMPLETED",
35
"data": [
36
{
37
"name": "APPROVAL_DECISION",
38
"textValue": "YES"
39
}
40
]
41
}
42
}
43
},
44
{
45
"describe": "Second test",
46
"requestParameters": [],
47
"actions": [
48
{
49
"name": "INITIATES",
50
"operation": "COMPLETE",
51
"parameters": [
52
{
53
"name": "REQUEST_SUBJECT",
54
"textValue": "OK"
55
}
56
],
57
"assertions": {
58
"status": "CLOSED",
59
"subStatus": "COMPLETED"
60
}
61
},
62
{
63
"name": "VALIDATES",
64
"operation": "COMPLETE",
65
"parameters": [
66
{
67
"name": "APPROVAL_DECISION",
68
"textValue": "NO"
69
}
70
],
71
"assertions": {
72
"status": "CLOSED",
73
"subStatus": "COMPLETED",
74
"data": [
75
{
76
"name": "APPROVAL_DECISION",
77
"textValue": "NO"
78
}
79
]
80
}
81
},
82
{
83
"name": "UPDATES",
84
"operation": "COMPLETE",
85
"parameters": [
86
{
87
"name": "REQUEST_SUBJECT",
88
"textValue": "OK2"
89
}
90
],
91
"assertions": {
92
"status": "CLOSED",
93
"subStatus": "COMPLETED"
94
}
95
},
96
{
97
"name": "VALIDATES",
98
"operation": "COMPLETE",
99
"parameters": [
100
{
101
"name": "APPROVAL_DECISION",
102
"textValue": "YES"
103
}
104
],
105
"assertions": {
106
"status": "CLOSED",
107
"subStatus": "COMPLETED",
108
"data": [
109
{
110
"name": "APPROVAL_DECISION",
111
"textValue": "YES"
112
}
113
]
114
}
115
}
116
}
117
],
118
"deleteRequest": false
119
}
Copied!

global-list

The global-list command lets you export, import, get, or delete a global list.
Available since WorkflowGen version 7.17.0.

export

Exports a specific global list from your WorkflowGen server to a local repository.

Usage

1
wfg global-list export [GLOBAL_LIST_NAME] --destination [PATH]
Copied!

Argument

Name
Type
Description
Behavior
name
String
Global list name
Required

Option

Alias
Type
Description
Default value
Behavior
--destination or -d
String
Export path
Current directory
Optional

πŸ“Œ Example

1
wfg global-list export Country
Copied!

import

Imports a specific global list from your local repository to your WorkflowGen server.
Known issue (#3373): See the WorkflowGen 7.22.2 release notes.

Usage

1
wfg global-list import [GLOBAL_LIST_PATH] --force
Copied!

Argument

Name
Type
Description
Behavior
file-path
String
The path to the global list's XML file
Required

Option

Alias
Type
Description
Default value
Behavior
--force or -f
Boolean
Updates specified global list
false
Optional

πŸ“Œ Example

1
wfg global-list import C:\repository\Country
Copied!

get

Displays one or several global lists.

Usage

1
wfg global-list get [GLOBAL_LIST_NAME] --output
Copied!

Argument

Name
Type