-
Make a zip archive of the package and install the package through the modules loader;
-
In the root folder
SuiteCRMexecute the commandcomposer install
The
phppackageeducoder/pestshould be installed; -
Specify access to the
Camundaserver in theSuiteCRMconfiguration file.Example:
'camunda' => [ 'engine_url' => 'http://localhost:8080/engine-rest', 'url' => 'http://localhost:8080', ]
-
Create a
Camundabusiness process diagram and install it on theCamundaserver. -
Add key fields to the
SuiteCRMmodule to display the approval panel and the processing history block. Below is an example of fields for a business process in theAOS_Quotesmodule:$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
processesarray 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
bpmnschema inCamunda(<bpmn:process id="quoteApproval"...).The values of the
processesarray define the business process handler classes inSuiteCRM:include- path to the file where the class is defined;class- class name.
The class
CamundaProcessis specified by default (supplied in the integration packageSuiteCRMwithCamunda):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
CamundaProcessclass; - write the name of this class and the path to the file containing the definition of this class in the
processesarray.
-
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
tabDefsarray:
'LBL_PANEL_BUSINESS_PROCESS' => array ( 'newTab' => true, 'panelDefault' => 'expanded', ),
-
Add to the
panelsarray (thenamevalue 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.