The processmaker command is used to perform maintenance tasks in ProcessMaker. Because some of these tasks involving altering the file structure, it is required to have root or administrator access in order to run the processmaker command.

Using the processmaker command

In the server where ProcessMaker is installed, login as the root user or administrator. On Windows systems, start the command prompt as the administrator. On Linux/UNIX systems, open a terminal and login as root user or use the sudo command to gain root privileges:

su or sudo -i

Then, use the cd command to switch the directory where ProcessMaker is installed. The location may vary depending on your system:

Linux/UNIX:

cd /opt/processmaker

Windows:

Bitnami Installer in version 3.0.1.8 and later:
cd C:\Bitnami\processmaker-3.X.X\apps\processmaker

Automatic Installer in version 3.0.1.7 or earlier in Windows XP/Server 2003:
cd "C:\Program Files\ProcessMaker-3_X_X\processmaker"

Automatic Installer in version 3.0.1.7 or earlier in Windows Vista/Server 2008 or later:
cd C:\Users\USERNAME\AppData\Roaming\ProcessMaker-3_X_X\processmaker

Note: The AppData directory is a hidden directory, but the File Explorer can be configured to show hidden files.

The processmaker command can be issued from the base directory of the processmaker installation: php processmaker

For Windows system, it may be necessary to specify the path to the php.exe file:

Bitnami Installer for ProcessMaker 3.0.1.8 and later: C:\Bitnami\processmaker-3.X.X\php\php.exe processmaker

Automatic Installer in ProcessMaker 3.0.1.7 or earlier in Windows XP/2003: "C:\Program Files\ProcessMaker-3_X_X_X\php\php.exe" processmaker

Automatic Installer in ProcessMaker 3.0.1.7 or earlier in Windows Vista/7/8/10/2008/2012: C:\Users\USERNAME\AppData\Roaming\ProcessMaker-3_X_X\php\php.exe processmaker

Note: To avoid writing out the path to php.exe, add the PHP directory to the PATH system variable.

List of options

To see the list of options available for the processmaker command, issue the command with the help option.

For example, on a Linux/UNIX system:

$ su Password: enter root password # cd /opt/processmaker # php processmaker help usage: processmaker [options] [args] If using Linux/UNIX, prepend './' to specify the directory: processmaker [options] [args] Type 'processmaker help ' for help on a specific task. Available tasks: browser-cache-files-upgrade build-js cacheview-repair change-password-hash-method check-workspace-disabled-code database-generate-self-service-by-value database-upgrade database-verify-consistency database-verify-migration-consistency flush-cache help hotfix-install info mafe-translation migrate-cases-folders migrate-content migrate-itee-to-dummytask migrate-list-unassigned migrate-new-cases-lists plugins-database-upgrade plugins-translation-create plugins-translation-update translation-repair unify-database upgrade workspace-backup workspace-restore workspace-upgrade

Help for an option

To display help for an option of the processmaker command, issue the command in this way:

php processmaker help OPTION

For example to get help for the database-upgrade option: # php processmaker help database-upgrade database-upgrade: Upgrade or repair the database schema to match the latest version Usage: processmaker database-upgrade [WORKSPACE...] Specify the workspaces whose database schema should be upgraded or repaired. If no workspace is specified, then the database schema will be upgraded or repaired on all available workspaces. This command will read the system schema and attempt to modify the workspaces tables to match this new schema. Use this command to fix corrupted database schemas or after ProcessMaker has been upgraded, so the database schemas will be changed to match the new ProcessMaker code.

browser-cache-files-upgrade

Safe upgrade for files cached by the browser. This command should be run after any upgrade/modification of files cached by the browser.

php processmaker browser-cache-files-upgrade

Example:

# cd /opt/processmaker # php processmaker browser-cache-files-upgrade Safe upgrade for files cached by the browser Upgrade successful

build-js

Regenerate ProcessMaker's JavaScript files. This command should be run after any modification of JavaScript files in the gulliver/js/ directory.

Usage: php processmaker build-js

Options:

  • -lLANG, --lang=LANG Set the language, such as es (Spanish) or pt-BR (Brazilian Portuguese), to be used when regenerating the JavaScript file. Note that this option currently does not work.

Example:

# cd /opt/processmaker # php processmaker build-js BUILD-JS Processing maborak library: maborak 51578 -> 29503 42.80% common 63760 -> 39835 37.52% effects 6267 -> 4198 33.01% webResource 6720 -> 3544 47.26% tree 2420 -> 1610 33.47% form 135674 -> 65764 51.53% pagedTable 6692 -> 4445 33.58% grid 65507 -> 36732 43.93% js-calendar 35234 -> 33878 3.85% bsn.AutoSuggest 21578 -> 13376 38.01% pmtooltip 2294 -> 1552 32.35% tinymce 524249 -> 320860 38.80% -------------------- ------- ------- ------ maborak.js 921973 -> 555297 39.77% /opt/pm3.0.1.8/gulliver/js/maborak/core/maborak.js Processing maborak.loader library: module.panel 53200 -> 35303 33.64% module.validator 5574 -> 3614 35.16% module.app 51376 -> 35887 30.15% module.rpc 6906 -> 3369 51.22% module.fx 8761 -> 5814 33.64% module.drag 13504 -> 7857 41.82% module.drop 4586 -> 2667 41.84% module.dom 7930 -> 5311 33.03% module.abbr 320 -> 297 7.19% module.dashboard 8401 -> 5331 36.54% cases 1909 -> 1433 24.93% cases_Step 30765 -> 21471 30.21% processmap 110699 -> 65364 40.95% appFolderList 8935 -> 7212 19.28% editor 49171 -> 26385 46.34% -------------------- ------- ------- ------ maborak.loader.js 362037 -> 227315 37.21% /opt/pm3.0.1.8/gulliver/js/maborak/core/maborak.loader.js Processing ext-all library: ext-all 717499 -> 717161 0.05% ux-all 153425 -> 153168 0.17% pmos-common 17237 -> 11520 33.17% miframe 59832 -> 59653 0.30% Ext.ux.LocationBar 13729 -> 5703 58.46% ext-statusbar 14541 -> 2335 83.94% Ext.ux.tree.TreeFilterX 4668 -> 1058 77.34% -------------------- ------- ------- ------ ext-all.js 980931 -> 950598 3.09% /opt/pm3.0.1.8/gulliver/js/ext/min/ext-all.js Safe upgrade for files cached by the browser BUILD-JS DONE

cacheview-repair

Create and populate the APP_CACHE_VIEW table. In order to improve performance, ProcessMaker includes a cache of cases in the APP_CACHE_VIEW table. This table must be in sync with the list of cases in the APPLICATION and APP_DELEGATION tables to present updated information in the cases list. This command will recreate the table and populate it with the updated information. This only needs to be used after upgrading ProcessMaker or if the cases inbox is out of sync.

Usage: php processmaker cacheview-repair [WORKSPACE...]

Options:

  • -lLANG   or   --lang=LANG
    Specify the language to rebuild the case cache list. If not specified, then 'en' (English) will be used by default.
    Ex: -lfr (French)
    Ex: --lang=zh-CN (Mainland Chinese)

  • WORKSPACES
    Specify the workspaces whose cases cache should be repaired. If no workspace is specified, then the cases will be repaired on all available workspaces.

Example:

# php processmaker cacheview-repair --lang=en workflow Upgrading cache view for workflow -> Creating tables -> Update DEL_LAST_INDEX field in APP_DELEGATION table -> Creating triggers -> Rebuild Cache View with language en...

change-password-hash-method (Enterprise only)

Set the passwords to use SHA256 or MD5 hashes. See Password Encryption SHA-256.

Usage:

php processmaker change-password-hash-method WORKSPACE HASH

check-workspace-disabled-code (Enterprise only)

Checks any disabled code in the specified workspace(s).

Usage:

php processmaker check-workspace-disabled-code [WORKSPACE...]

If no workspace is specified, the command will be run in all workspaces. More than one workspace can be specified.

Example:

# cd /opt/processmaker # php processmaker check-workspace-disabled-code > Workspace: workflow The workspace it's OK Done!

database-generate-self-service-by-value

Generate or update the "self-service by value" table (APP_ASSIGN_SELF_SERVICE_VALUE) for cases whose tasks use Self Service Value Based Assignment for their Assignment Rule.

Usage:

php processmaker database-generate-self-service-by-value [WORKSPACE...]

If no workspace is specified, the command will be run in all workspaces. More than one workspace can be specified.

Example:

# cd /opt/processmaker # php processmaker database-generate-self-service-by-value Generating the table "self-service by value" for workflow Done!

database-upgrade

Upgrade or repair the database schema to match the installed version of ProcessMaker. This command updates the database to match the schema specified in the files workflow/engine/config/schema.xml and rbac/engine/config/schema.xml.

Use this command to fix databases whose structure has become corrupted or after ProcessMaker has been upgraded, so the database schemas will be changed to match the new ProcessMaker code. This command is executed automatically by processmaker upgrade, but it can be executed separately.

Usage: php processmaker database-upgrade [WORKSPACE...]

Specify the workspaces whose database schema should be upgraded or repaired. If no workspace is specified, then the database schema will be upgraded or repaired on all available workspaces.

Example:

# cd /opt/processmaker # php processmaker database-upgrade Upgrading database in workflow -> 1 tables to alter -> Nothing to change in the data base structure of RBAC -> Row updated in DASHLET -> Row updated in DASHLET -> Row updated in DASHLET -> Row updated in DASHLET -> Verifying roles permissions in RBAC All roles permissions already updated -> Migrating the Intermediate Email Event Migrating Itee Done 0 records where patched to use SELF_SERVICE feature. -> Schema fixed

database-verify-consistency

Verify that the database data is consistent with the schema, which is specified in the files workflow/engine/config/schema.xml and rbac/engine/config/schema.xml. Use this command to verify the database integrity. Use this command to check the database data consistency before issuing the processmaker database-upgrade or processmaker upgrade commands.

Usage:

php processmaker database-verify-consistency [WORKSPACE...]

Specify the workspace(s) whose database schema should be verified. If no workspace is specified, then all available workspaces will be verified.

Example:

# cd /opt/processmaker # php processmaker database-verify-consistency Verifying data in workspace workflow > Number of user related inconsistencies for workspace workflow: 19 > Number of task related inconsistencies for workspace workflow: 0 > Number of processes related data inconsistencies for workspace workflow: 0 > Number of delegations related data inconsistencies for workspace workflow: 0

database-verify-migration-consistency

Verify that the migrated case data is consistent and there was no data loss of any kind.

Usage: php processmaker database-verify-migration-consistency [WORKSPACE...]

Specify the workspace(s) whose case data should be verified for consistency. If no workspace is specified, then all available workspaces will be verified.

This command will check for any missing cases which are Cancelled, Completed, in Inbox and My Inbox (To Do and Draft), Participated, and Unassigned. It is recommended to execute this command if problems occur after importing a workspace or upgrading ProcessMaker.

Example:

# php processmaker database-verify-migration-consistency Verifying data in workspace workflow > Number of missing cancelled cases for workspace workflow: 8 > Number of missing completed cases for workspace workflow: 31 > Number of missing inbox cases for workspace workflow: 0 > Number of missing participated history entries for workspace workflow: 1 > Number of missing participated last entries for workspace workflow: 6 > Number of missing my inbox entries for workspace workflow: 17 > Number of unassigned cases for workspace workflow: 6

flush-cache

Flush the cache files for the specified workspace(s).

Usage:

php processmaker flush-cache [WORKSPACE...]

If no workspace is specified, then the cache will be flushed in all available workspaces.

This command deletes the system cache files located in the shared/compiled directory. It also deletes the workspace cache files located in the shared/sites/WORKSPACE/cache/ and shared/sites/WORKSPACE/cachefiles/ directories. Any deleted cache files will be regenerated when needed by ProcessMaker. This command is useful after installing or updating a new PO translation file or when the cache copy of forms gets corrupted.

Example:

# php processmaker flush-cache Flush system cache ... DONE Flush workspace workflow cache ... DONE

hotfix-install

Install a hotfix or patch in the ProcessMaker code.

Usage: php processmaker hotfix-install HOTFIX-FILE.tar

This command installs a hotfix or patch, which updates ProcessMaker in order to add improvements, fix bugs and security holes and change the database schema. Hotfixes are generally only available for the Enterprise Edition. See: How to install a Hotfix or a Patch.

info

Print information about the current system and any specified workspaces.

Usage: php processmaker info [WORKSPACE-NAME...]

If no workspace is specified, show information about all available workspaces

Example:

# php processmaker info ProcessMaker Version 3.1.2 System Debian GNU/Linux 8.4 (jessie) (Linux) PHP Version 5.6.20-0+deb8u1 Server Address Client IP Address Plugins charts openFlash pmosCommunity processTemplate Workspace Name workflow Workflow Database mysql://wf_workflow312:g.s9Q8xS$yKT3%h@localhost/wf_workflow312 MySql Version MySql (Version 5.5.47-0+deb8u1)

mafe-translation

Creates translation labels in the Michealangelo Font End (MAFE) which are inserted in the database. This command should be run after adding or deleting translation labels in ProcessMaker's JavaScript code.

Usage: php processmaker mafe-translation [WORKSPACE...]

If no workspace is specified, then the translation labels will be created in all available workspaces.

Options:

  • -lLANG, --lang=LANG Specify the language to create the translation labels. If not specified then the language will be 'en' (English) by default.
    Ex: -lfr (French)
    Ex: --lang=zh-CN (Mainland Chinese)

Example:

# php processmaker mafe-translation -len worflow Updating labels Mafe ... Updating labels for workspace workflow Errors upgrading labels for workspace workflow: labels.php not exist in MAFE Create successful

migrate-cases-folders

Migrate the cases folders of the workspace to break the directory for each case into multiple subdirectories to avoid problems with Ext3 file systems which are limited to 32K subdirectories. See: Managing 32K Folders.

Usage: php processmaker migrate-cases-folders

Options:

  • -wWORKSPACE, --workspace=WORKSPACE
    Select the workspace whose case folders will be migrated, if multiple workspaces are present in the server.
    Ex: -wworkflow
    Ex: --workspace=workflow

In version 3, all installations already have broken the case directories into multiple subdirectories, so this command only needs to be used if ProcessMaker was originally installed in version 2. Upgrading to version 3 won't automatically split the case directories to avoid the 32K limit in Ext3.

Example: # php processmaker migrate-cases-folders -wworkflow Updating workspaces (1/1): workflow > Updating cases directories structure... Version Directory Structure is 2 now. <*> Database Upgrade Structure Process took 0.88987612724304 seconds.

migrate-content

Most of the names/titles of objects are currently stored in the CONTENT table in the database. In order to speed up accessing the names of groups, departments, processes, tasks and Input Documents, fields were added to a number of database tables in version 3.1, so it was no longer necessary to do separate queries in the CONTENT. If necessary, the migrate-content option adds new fields to the various tables to hold the names/titles from the CONTENT table. It also copies the names/titles from the CONTENT table to the many different tables. Use this command if upgrading ProcessMaker 3.1 or later from a previous version of ProcessMaker or if the content gets out of sync.

Usage: php processmaker migrate-content [WORKSPACE...]

Specify the workspace(s) where the content should be migrated. If no workspace is specified, then the content will be migrated on all available workspaces.

Example: # php processmaker migrate-content workflow > Optimizing content data... Regenerating content in: workflow -> Regenerating content |--> Add content data in table GROUPWF |--> Add content data in table PROCESS |--> Add content data in table DEPARTMENT |--> Add content data in table TASK |--> Add content data in table INPUT_DOCUMENT |--> Add content data in table APPLICATION <*> Optimizing content data Process took 68.826770067215 seconds.

migrate-indexing-acv

Increases the performance populating with integer values the new columns created in APP_* tables by the migrate-new-cases-lists command. This command must be run after migrate-new-cases-lists.

php processmaker migrate-indexing-acv [WORKSPACE...]

migrate-itee-to-dummytask

Migrates the Intermediate throw Email Event to Dummy task.

Usage: php processmaker migrate-itee-to-dummytask [WORKSPACE...]

Specify the workspaces where the processes will be updated. If no workspace is specified, then all available workspaces will be updated.

Example: # php processmaker migrate-itee-to-dummytask -> Migrating the Intermediate Email Event Migrating Itee Done

migrate-list-unassigned (Enterprise only)

Migrates information in the APP_CACHE_VIEW table in the database to the LIST_UNASSIGNED table, so that the "Unassigned" list of cases under the Home menu can be loaded more quickly. Use this command if upgrading the Enterprise Edition to version 3.1 or later.

Usage:

php processmaker migrate-list-unassigned [WORKSPACE...]

Specify the workspace(s) where the APP_CACHE_VIEW table will be updated. If no workspace is specified, then all available workspaces will be processed.

Example:

# php processmaker migrate-list-unassigned Upgrading Unassigned List in workflow > Completed table LIST_UNASSIGNED > Unassigned List is done

migrate-new-cases-lists (Enterprise only)

Migrate the case list information found in the APPLICATION and APP_DELEGATION tables to the new LIST_* tables found in version 3.1 and later, so that case lists under the Home menu can be loaded faster in the Enterprise Edition.

Usage: php processmaker migrate-new-cases-lists [WORKSPACE...]

Specify the WORKSPACE where the case information will be migrated to the LIST_* tables. More than one workspace can be specified. If no workspace is specified, then case information in all available workspaces will be migrated to the LIST_* tables.

plugins-database-upgrade

Upgrade or repair the database schema to match the latest version of a plugin. Run this command after upgrading the source code for a plugin. The database schema file for a plugin is found at the location plugins/pluginName/pluginName/config/schema.xml.l

Usage:

php processmaker plugins-database-upgrade [WORKSPACE...]

Specify the workspaces whose database should be upgraded or repaired to match the schema files of all its available plugin(s). If no workspace is specified, then the database schema will be upgraded or repaired on all available workspaces.

This is the same as the database-upgrade command, but it works with the schema files provided by plugins. This is useful if plugins are installed that include database schemas.

plugins-translation-create

Create a .po translation file for a specified plugin. After the .po file is generated, it can be translated into another language and then imported into ProcessMaker so that the plugin is available in another language.

Usage: php processmaker plugins-translation-create [PLUGIN] [LANG]

PLUGIN is the name of the plugin directory. If not specified, then translation files will be created for all available plugins.

LANG is the language for which the .po file will be generated, such as fr (French) or zh-CN (mainland Chinese). If the language is not specified, then it is en (English) by default.

plugins-translation-update

Update plugin translations

Usage: php processmaker plugins-translation-update PLUGIN LANG

PLUGIN is the name of the plugin directory.

LANG is the language, such as fr (French) or zh-CN (mainland Chinese).

translation-repair

Upgrade or repair translations for the specified workspace(s).

Usage: php processmaker translation-repair [WORKSPACE...]

If no workspace is specified, the command will be run in all workspaces. More than one workspace can be specified.

This command will go through each language installed in ProcessMaker and update the translations for the workspace(s) to match the current version of ProcessMaker.

unify-database (Enterprise only)

Unify the RBAC, Reports and Workflow databases into one database.

Usage:

php processmaker unify-database [WORKSPACE]

Specify the workspaces whose databases schemas should be unified. If no workspace is specified, then the database schema will be upgraded or repaired on all available workspaces.

This command will read the system schema and attempt to modify the workspaces' tables to match this new schema. In version 2.8 and later, it will merge the 3 databases used in previous versions of ProcessMaker into one database. This command may be used after upgrading from ProcessMaker 2.5 to a later version of ProcessMaker.

upgrade

Upgrade workspaces.

Usage: php processmaker upgrade

This command should be run after upgrading ProcessMaker to a new version so that all workspaces are also upgraded to the new version.

Options:

  • -ACV, --buildACV
    If this option is enabled, the Cache View in the APP_CACHE_VIEW table is built.
  • -NoXml, --no-xml
    If this option is enabled, the XML files translation is not built.

workspace-backup

Backup the specified workspace to a file. For more information, see Backing up and Restoring ProcessMaker.

Usage: php processmaker workspace-backup WORKSPACE [BACKUP-FILE]

WORKSPACE is the name of the workspace to backup, which by default is named workspace.

BACKUP-FILE is the backup filename which will be created. If it contains slashes, it will be treated as a path and filename, either absolute or relative. Otherwise, it will be treated as a filename located inside the shared/backups directory. If no BACKUP-FILE is specified, it will use the workspace name as the filename.

A backup archive will contain all information about the specified workspace so that it can be restored later. The archive includes a database dump and all the workspace files.

Options:

  • -s[MAX-SIZE], --filesize=[MAX-SIZE]
    Split the backup file in multiple files which are compressed. The maximum size of these files is set to MAX-SIZE in megabytes. If MAX-SIZE is not set, then it is 1000 megabytes by default. It may be necessary to use this option if using a 32 bit Linux/UNIX system which limits its maximum file size to 2GB. This option does not work on Windows systems.

workspace-restore

Restore a workspace from a backup file. For more information, see Restoring Workspaces.

Usage:

php processmaker workspace-restore BACKUP-FILE [WORKSPACE]

BACKUP-FILE is the backup filename. If it contains slashes, it will be treated as a path and filename, either absolute or relative. Otherwise, it will be treated as a filename located inside the shared/backups directory.

Specify the WORKSPACE to restore to a different workspace name. Otherwise, it will restore to the same workspace name as the original backup.

Options:

  • -o, --overwrite
    If a workspace already exists, then overwrite it.
  • -i
    Show information about backup file, but do not restore any workspaces.
  • -m
    Restore from multiple compressed backup files which are numbered. This is an option for Linux/UNIX systems which limit files to a maximum of 2 GB in size.
  • -wWORKSPACE, --workspace=WORKSPACE
    Specify which workspace to restore if multiple workspaces are present in the backup file.
          Ex: -wworkflow
  • -lLANG, --lang=LANG
    Specify the language which will be used to rebuild the case cache list. If this option isn't included, then en (English) will be used by default.
  • -pPORT
    Specify the port number used by MySQL. If not specified, then the port 3306 will be used by default.
          Ex: -p3882

workspace-upgrade

Upgrade the specified workspace(s). Use this command after upgrading the source code of ProcessMaker.

Usage: php processmaker workspace-upgrade [WORKSPACE...]

If no workspace is specified, the command will be run in all workspaces. More than one workspace can be specified.

This command is a shortcut to execute all the upgrade commands for workspaces. Upgrading a workspace will make the database and files correspond to the current source code of ProcessMaker.

Options:

  • -ACV, --buildACV
    If this option is enabled, the APP_CACHE_VIEW table will be built, which allows ProcessMaker to load case lists more quickly.
  • -NoXml, --no-xml
    If this option is enabled, then the XML files translation is not built.