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:
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
Result:
-----------------------------------------------------
| 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.
help
With the help option, you can get information on how to use a specific command or see which commands are available.
wfg --help
Result:
Usage:
wfg [options] [command]
Options:
--debug
--verbose
--version Show version information
-?, -h, --help Show help and usage information
Commands:
login <url>
config
process
project
global-list
application
graphql <query>
debug
With the debug option, you can display more logs in your terminal during the command execution.
wfg process get --debug
verbose
The verbose option is like the debug option, but the CLI will display more logs than it does for debug.
wfg process get --verbose
version
The version option returns your current WorkflowGen CLI version.
wfg --version
Enabling tab completion
Install the dotnet-suggest global tool:
dotnet tool install --global dotnet-suggest
Open your PowerShell profile and add the following code to it. You can get the path to your profile path with echo $PROFILE.