Process

Process log

The way of viewing the logs has changed in the various vtenext releases and is summarized as follows.

<?php
require_once('include/utils/VTEProperties.php');
$VP = VTEProperties::getInstance();
$VP->set('settings.process_manager.show_logs_button', 1);

The file 01.log is initially created. When the file exceeds the 5MB, the file 02.log will be created and so on.

Import Processes with a script

From version 18.05 (rev. 1696) it is possible to import processes previously exported in the format vtebpmn (diagram + configuration) or bpmn (diagram only) with php scripts using the importFile method of the ProcessMakerUtils class.
The importFile method takes in the first parameter the path of the file to be installed (.vtebpmn / .bpmn) and in the second one a Boolean value (true/false) depending on whether you want to automatically activate the process or not.
This method is useful for installing processes at the end of the installation of a new module: just include the process file in the installation zip and execute the code in the case 'postinstall' of the method vtlib_handler of the module class.

Example

require_once('modules/Settings/ProcessMaker/ProcessMakerUtils.php');
$PMUtils = ProcessMakerUtils::getInstance();
$PMUtils->importFile('PATH_FILE/Process1.vtebpmn',true);
$PMUtils->importFile('PATH_FILE/DiagramProcess2.bpmn',false);

 

SDK

You can add custom functions to processes, click here for more details.