CMF Activity: processing node families
Add the notion of processing node families to CMFActivity.
Families are groups of processing nodes, and can be chosen when spawning an activity. An activity with a family chosen will only be executed by processing nodes members of that family. Processing nodes member of a family will still process activities which do not have a family chosen.
This reuses the node
parameter of activate
and corresponding column. Internally, if produces strictly negative integer values.
Families can be modified (nodes added & removed) anytime, created anytime. The effect may not be immediate, but it is safe to change.
Families can be deleted or empties (remove all nodes) anytime, but it should be done only once there are no activity left for that family. Otherwise, these activities will never be executed, which can in turn prevent other activities from being executed if they depend on those orphaned activities.
Spawning an activity for a family which does not exist raises an exception.
There is currently no integration with BusinessTemplates: this means family creation is the entire responsibility of the admin who installs the business template. This restricts processing node family usefulness, so this should be done - though maybe in a separate patch stack ? The idea would be:
- declare families needed as a new business template property
- upon installation & upgrade bringing new families, create them and assign all current processing nodes to each
- upon uninstall & upgrade removing families, do nothing (?)
@jm: Why "UNION ALL", especially in the priority query ? Why only one "UNION" is tagged as "ALL" in each query ?