-
Make a zip archive of the package and install the package through the modules loader;
-
In the root folder
SuiteCRM
execute the commandcomposer install
The
php
packageeducoder/pest
should be installed; -
Specify access to the
Camunda
server in theSuiteCRM
configuration file.Example:
'camunda' => [ 'engine_url' => 'http://localhost:8080/engine-rest', 'url' => 'http://localhost:8080', ]
-
Create a
Camunda
business process diagram and install it on theCamunda
server. -
Add key fields to the
SuiteCRM
module to display the approval panel and the processing history block. Below is an example of fields for a business process in theAOS_Quotes
module:$dictionary['AOS_Quotes']['fields']['camunda_process'] = array ( 'name' => 'camunda_process', 'type' => 'CamundaProcess', 'source'=>'non-db', 'inline_edit' => false, 'vname'=>'LBL_BUSINESS_PROCESS', 'processes' => array( 'quoteApproval' => array( 'include' => 'modules/CamundaProcesses/CamundaProcess.php', 'class' => 'CamundaProcess', ), ), ); $dictionary['AOS_Quotes']['fields']['camunda_history'] = array( 'name' => 'camunda_history', 'type' => 'CamundaProcess', 'source' => 'non-db', 'inline_edit' => false, 'vname' => 'LBL_BUSINESS_PROCESS', 'show_process_instances' => false, 'show_historic_processes' => true, 'processes' => $dictionary['AOS_Quotes']['fields']['camunda_process']['processes'], );
The
processes
array contains the list of business processes connected to the module (several business processes can be connected to the module).The array keys are business processes IDs in the
bpmn
schema inCamunda
(<bpmn:process id="quoteApproval"...
).The values of the
processes
array define the business process handler classes inSuiteCRM
:include
- path to the file where the class is defined;class
- class name.
The class
CamundaProcess
is specified by default (supplied in the integration packageSuiteCRM
withCamunda
):array( 'include' => 'modules/CamundaProcesses/CamundaProcess.php', 'class' => 'CamundaProcess', )
If a non-standard procedure for processing is required, then it is necessary:
- create your own class, inheriting it from the
CamundaProcess
class; - write the name of this class and the path to the file containing the definition of this class in the
processes
array.
-
Add a translation of the name of the approval panel to the module. For example,
$mod_strings = array ( 'LBL_PANEL_BUSINESS_PROCESS' => 'Business Process', 'LBL_BUSINESS_PROCESS' => 'Process', );
-
Add an approval panel to
detailviewdefs
.- Add to
tabDefs
array:
'LBL_PANEL_BUSINESS_PROCESS' => array ( 'newTab' => true, 'panelDefault' => 'expanded', ),
-
Add to the
panels
array (thename
value is the name of the added key field):'LBL_PANEL_BUSINESS_PROCESS' => array ( array( array( 'name' => 'camunda_process', 'hideLabel' => true, ), ), ),
- Add to
Add changes to SuiteCRM
manually (after that, perform the "restore" procedure), or by issuing a package and installing it using the module loader.
В папке example находится пример настройки интеграции процесса для модуля AOS_Quotes
.
Смортрие инструкция по установке примера в файле example/README-ru.md
.
The folder example
contains an example of process integration settings for the AOS_Quotes
module.
See the instructions for installing the example in the file example/README.md
.