Business rules (alfresco)
1 Condiciones para la selección de ítems de contenido:
Does it have a particular name pattern?
Is it in a particular category?
Is it of a specific type or format?
Does it have a particular aspect?
Does a property have a specific text or date or integer value?
2 Acciones a ejecutar (sobre los ítems seleccionados):
Add aspect to item: Add additional properties and behavior to document
Add simple workflow: Add an approve or reject workflow
Check in content: Check in the document
Check out content: Check out the document to a space
Copy item to a specific space: Copy the document to a space
Execute a script: Execute JavaScript code as an action (built-in or custom, see below)
Extract common metadata fields from content: Extract document meta data
Import Alfresco content package: Import as a content package
Link item to category: Link the document to a specific existing category
Move item to a specific space: Cut the document from the current space and move it to specified space
Remove an aspect from an item: Remove a property or set of properties from the document
Send an email to specific users: Send email notifications to specific users or groups of users
Specialize the type of an item: Define the content type for the document
Transform and copy content to a specific space: Transform content, such as DOC to PDF, and move the resultant file to the specified space
Transform and copy image to a specific space: Transform and resize an image, such as from JPG to PNG format, and move the resultant image to the specified space
Built-in JavaScript
alfresco_docs.js
append_copyright.js
backup_and_log.js
backup.js - creates a backup of a file by copying it to a backup space
command-processor.js
command-search.js
command-utils.js
example_test_script.js
test_return_value.js
Custom JavaScript
The Rules Wizard lists all of the JavaScript files that are available in the Company Home > Data Dictionary > Scripts space.
You can extend your business rules by writing your own JavaScript files and placing them in this space, so that they are visible to the Rules Wizard.
Programadas
A scheduled action is made up of three parts:
A cron expression,
A query template, and
An action template.
You need to create a schedule action XML configuration file in your extensions folder,
in order to specify the scheduled time, and the custom JavaScript. You will find the
scheduled action sample file, scheduled-action-services-context.xml.sample,
Note: Restart the Alfresco server to ensure that the configuration changes are effective.
3 Rules triggers:
Inbound: Content arriving into a space, either new, copied or moved
Outbound: Content leaving a space, either deleted or moved
Update: Content updated, either uploaded or saved