- Update README.md to include a table of contents and detailed sections on workflow management and custom scripts. - Remove deprecated 'runWorkflow' field from CVmhErstgespraech localization files. - Add 'runWorkflow' field to detail layout for CVmhErstgespraech. - Update workflow_manager.php to improve workflow listing and management functionality. - Adjust cache timestamps in config.php. - Create CUSTOM_DIRECTORY.md to outline the custom directory structure and best practices. - Add README.md for workflow definitions with usage examples and JSON format specifications. - Introduce new workflow definitions for 'vmh-erstberatung-abschließen' and its backup.
1.9 KiB
1.9 KiB
Workflow Definitions
This directory contains workflow definitions in JSON format that can be imported into EspoCRM using the workflow manager script.
File Format
Simple Workflow
{
"type": "simple",
"name": "workflow-name",
"entity_type": "EntityName",
"trigger_type": "afterRecordSaved",
"is_active": true,
"description": "Description of what this workflow does",
"conditions_all": [],
"conditions_any": [],
"conditions_formula": null,
"actions": []
}
Trigger Types:
afterRecordSaved- After record is created or updatedafterRecordCreated- Only after record is createdscheduled- Runs on a schedule
Condition Types:
equals,notEquals,greaterThan,lessThan,contains,notContains,isEmpty,isNotEmpty,isTrue,isFalse,wasEqual,wasNotEqual,changed,notChanged
Action Types:
sendEmail- Send email to recipientcreateEntity- Create a new recordupdateEntity- Update current recordrelateTo- Link to another recordunrelateFrom- Unlink from recordapplyAssignmentRule- Apply assignment rulescreateNotification- Create notification
BPM Flowchart
{
"type": "bpm",
"name": "flowchart-name",
"target_type": "EntityName",
"is_active": true,
"description": "Description",
"data": {
"list": []
},
"elements_data_hash": {},
"event_start_all_id_list": []
}
Usage
Import a workflow:
docker exec espocrm php /var/www/html/custom/scripts/workflow_manager.php import /var/www/html/custom/workflows/your-workflow.json
Export a workflow:
docker exec espocrm php /var/www/html/custom/scripts/workflow_manager.php export <workflow-id> /var/www/html/custom/workflows/exported.json
Examples
vmh-erstberatung-abschliessen.json- Sends email and sets status when consultation is completed