Processes


What is a process?

A process is a code that is triggered when an Event happens.

What is an Event?

An event could be a when somone is added to a group.
An event could be when someone buys a product
An event could be when someone registers.

ProcessLogics

In WBS this is a list of processes that are available. They can be triggered by a number of elements.

ProcessRules

The above only defines the name of the logics that can be applied to some elements, the relation of the element and the logic is defined by ProcessRules

Anatomy of ProcessRules

ID (uniqe number for the database)
Logic ID (represents the ID from the ProcessLogics)
Triggered By (GROUP, ARTICLE, FORM, WIDGET)
Object ID (Represents the corresponding ID of that triggered this rule)
Params (parameters for this rule. Ex. params[network_id]=5)
Condition - for forms, to apply the process only when a condition is fulfilled
condition[field_id] = ..., condition[option_id]= ...

Work Flow

Create a rule that attaches an object with a Logic using an id. The ID should refer to the object that should trigger this rule

Functions
getLogics
getRule
getRules4Object
addRule
updateRule
deleteRule
getAllRules