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 DEVManaging 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.1.0",
"processes":[
{
"name":"EMPLOYEE_ONBOARDING",
"version":1,
"folder":"HR"
}
],
"subProcesses":[
{
"name":"CREATE_AD_ACCOUNT",
"version":1,
"folder":"IT"
},
{
"name":"CREATE_ERP_ACCESS",
"version":1,
"folder":"IT"
}
],
"globalLists": [
"Country"
]
}You can use the project init command to build the manifest with the CLI, or write the definition directly in a manifest.json 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.
For the manifest definition, you should have a folder structure like the following:
Import your project
With the project import command you can import your project into another WorkflowGen server (such as the production server).
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.
Result:
You can switch to another context with the config use-context command.
Global options
The CLI provides some global options to give you some other information.
help
helpWith the help option, you can get information on how to use a specific command or see which commands are available.
Result:
debug
debugWith the debug option, you can display more logs in your terminal during the command execution.
verbose
verboseThe verbose option is like the debug option, but the CLI will display more logs than it does for debug.
version
versionThe version option returns your current WorkflowGen CLI version.
Enabling tab completion
Install the
dotnet-suggestglobal tool:Open your PowerShell profile and add the following code to it. You can get the path to your profile path with
echo $PROFILE.
Install the
dotnet-suggestglobal tool:Open your bash profile (
~/.bash_profile) and add the following code to it:
Last updated