Aller directement à la fin des métadonnées
Aller au début des métadonnées
Vous regardez une version antérieure (v. /confluence/display/CRM/CiviRules+extension) de cette page. afficher les différences ·  afficher l'historique de la page

 

This page is work in progress documentation for Civi Rules. 

Table of contents

Introduction

Civi Rules is based on the Drupal Rules module and does react on an event (post create contribution) and executes a certain action when certain conditions are met. 

This page will contain what we have thought of what needs to be done to develop such an extension. Rather than just starting (what we have done with trigger-action extension) this one is a bit more thought of. So this description is also a basic for a wider debate on how things should work.

Requirements

  • The action should be basically API actions
  • Should be flexible to extend by developers. E.g. it should be easy to add new event types, new condition types, new action types
  • Rules (event, condition and condition) should be stored in the database as well as in code, like Drupal Views and Drupal Rules. 
  • It should be possible to extend the storage layer
  • It should use the queue mechanism of CiviCRM Core (take a look at scheduled reminders on how to use this queue mechanism)
  • It should be possible to send e-mail, sms, print pdf letter as an action

Roadmap

The following needs to be done. This are the actions we identified so far

  • Create mockups

  • Investigate the core queue mechanism and document it

  • Create the basic framework for the rules extension

  • Create a UI around the framework

  • (API) action for sending e-mail

  • (API) action for sending SMS

  • (API) action for printing PDF Letter

Mockups

 



Framework

Below a draft of the API for the framework. This api consist of hooks and functions other extensions could invoke.

  • hook_civicrm_rules_event_types: returns event types to the framework
  • Invoke Event: api to invoke an event in the civicrm rules module
  • hook_civicrm_rules_condition_types: returns condition types to the framework
  • hook_civicrm_rules_action_types: return action types to the frameworks
  • hook_civicrm_rules_storage: returns a storage mechanism for rules. A storage mechanism is used to store the rule for example in the database, or in php array, or in json or in whatever format

Interfaces

Below a more detailed description of the interfaces we are going to use in the framework. The interfaces we have identified are:

  • Storage layer
  • event type
  • condition type
  • action type

Hooks

Below a more detailed description of the hooks

API

 Below a more detailed description of the API interface of this extension

Étiquette
  • Aucun

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.