Content Management Rules
To automate content management in
Plone
3.0 introduced a new feature -
Content rules . These rules
allow you to define an action that is automatically performed when you change
the state of the
trigger - the value of the host
True or
A lieThe rule is determined by the interaction of its three
components: if a certain thing happened
event and in doing so some
the condition has assumed true value then there will be
A certain
action has been executed. The rule definition consists of several stages:
- Setting up access to the rules
- Rule creation
- Event selection
- Determination of conditions
- Action definition
- Assigning rules to sections of the site
Setting up access to the rules
Calling up forms for managing and creating rules is made on the page
shown in Figure 1, available in
Section
Site Settings through the link
Content Rules . All rules are global.
character, i.e. the whole set of rules applies to all site objects. Setting the rules action or turning them off is performed
using the
Enable checkbox
globally on the
Global panel
settings . Terms of each rule and
definition of its action for each specific object
defined separately in the appropriate forms.
Figure 1. Rules managementThe
Content Rules panel displays a list of
all created rules whose display conditions are defined
option list to
show .
Rule creation
Creating a new rule and defining its properties is done through a special form,
available after clicking the
Add button
content rule in the form of rule management.
Figure 2. Form for adding a ruleProperties
Title and
Descriptioncommon to all types. More interesting and important properties
Active and
Stop executing
rules . The global nature of the rules makes it difficult to debug
applications and does not allow the flexibility to change the set of existing rules for
site. Properties
Active and
Stop executing
rules allow you to control the action as a separate
rules as well as groups of rules. Installing or clearing the
Active checkbox enables
or turns off the rule, which allows you to enable and
Test the rules sequentially.
Setting the Stop executing flag
rules turns off the effect of all rules after execution
current.
')
Event definition
The set of events used to define content rules is selected from
Triggering event list and includes
in yourself:
- adding an object to a folder;
- object removal;
- moving an object from a folder;
- moving an object to a folder;
- state change workflow.
After saving the properties of the rule, the user is automatically moved
in the management form, where the corresponding list will appear
link to the created rule.
Rule setting
Following the link corresponding to the necessary rule through a special
the form (see Figure 3. action selection form) can be determined
actions assigned to the rule.
Figure 3. Action selection formThe choice of action is accompanied by clarification of the conditions limiting the circle
objects for which it is committed.
Determination of conditions
List
Add
condition contains options that, when selected, open
the appropriate form of customization.
Option "Content type" Through (see Figure 4. Select the type of objects ") selects one
or several types regarding the actions with which
a rule is created.
Figure.4. Select the type of objectsFile Extension option A special form (see Figure 5. Selecting a file extension) is used to select an extension.
a file associated with an object of type
File regarding the actions with which
a rule is created.
Figure 5. Selecting the file extension. “Workflow state” option A special form (see
Figure 6 ) is used to select
the state of the object for which the attack will be monitored
events and perform the corresponding action.
Figure 6. Selecting the state of the object“User's group” option A special form (see
Fig. 7 ) is used to select
user groups whose actions will be monitored.
Figure 7. Select user groupsOption "User's role" Through a special form (see Fig.
7 ), a selection is made
user roles whose actions will be monitored.
Figure 8. Selecting user rolesSelection of actions for the control rule
The action assigned to the rule is selected from the
Add action list. This list includes actions:
Logger — latching actions performed in a report on events or other reports. Selecting this option allows you to record an event that occurred in
specified report file. The report is saved in a subdirectory.
instance directory
log
server. Definition of the name of the report file and
Record template is made through a special form
(see Figure 9. Report configuration form ").
Figure 9.
Report Setup FormNotify Action - receive messages about the state of the object.
Selecting this option allows you to create a message about the state of the object and
pass it to the user when making the event. Customization
message parameters produced through a special form
(see
Fig. 10 ).
Figure 10. Message configuration formThe
Message field defines the text of the message, and
List
type - type
messages. Available message styles, nominated
in the following way:
Copy to folder - automatic copying
object to which the rule is applied to the selected folder.
The choice of a folder for saving objects is made through a special form.
(see
Fig. 11 ).
Figure 11. Folder selection form The Destination folder text box allows you to specify a target folder in two ways:
- Enter the path to the folder in the field. The path is relative to the root folder.
portal. - Enter a search query in the field and click the Search button. In this case,
Search folder names and the resulting list is displayed in
form, after which you can either directly select a folder from the list, view the selected folder (click the View button), or go to the parent folder and select the target folder from
its contents. The transition is made by pressing a button.
Parent . In Fig. 11 shows an exemplary embodiment
search query.
Move to folder - automatic
moves the object to which the rule applies to the selected folder.
The selection of a folder for moving objects is made through a special form (see
Fig. 12 ).
Figure 12. Folder selection formThe Destination Folder text box allows you to specify
target folder in two ways:
Enter the path to the folder in the field. The path is relative to the root folder.
portal. Enter a search query in the field and click the
Search button. In this case,
Search folder names and the resulting list is displayed in
form, after which it is possible to either directly select a folder from the list, view the selected folder (click the
View button) or go to the parent folder and select the target folder from
its contents. The transition is made by pressing a button.
Parent . In
Fig. 12 shows an example of execution
search query.
Delete object - automatic deletion of the object to which the rule applies.
There is no setting form for this action.
Transition workflow state - change
object state.
The object is transferred to one of the states defined by
workflow
for this type of objects.
The choice of the state of an object is made through a special form (see
Fig. 13 ).
Figure 13. The form for selecting the state of the object Send email - sending an email.
A message is being sent. Address, Subject and Message Text
are determined through a special form of message settings
e-mail (see
Fig. 14 ).
Figure 14. Email setup formYou can define several conditions and actions for a rule.
at the same time. In this way, the rule applicable to
several groups of different objects and performing several
action at the same time. In
Fig. 15An example of the definition of such
regulations.
Figure 15. Example of a complex ruleAt the bottom of the form there is a link to the folder, to the contents of which
This rule has been applied.
Assigning rules to sections of the site
The rule for the folder is assigned via the
Rules tab (see
Fig. 16 ).
Figure 16. Rule assignment
form. Rule assignment is made by selecting necessary management rules from
Assign rule here . AT
The list contains all the rules that are globally defined on
site and for which the activity option is set.