Table of Contents
Business Rule automation
Table of Contents
A Business Rule can execute actions when certain conditions are met. For each business rule you define general information (name, id, tracing, status), one or more trigger points (update or creation of content items, replacing of a file or via schedules), conditions (what should the business rule check e.g. metadata changed), transformations (e.g. to transform unstructured metadata into structured tags) and actions (that will be executed e.g. remove permissions).
Business rules always run in the context of the service user (with full privileges to ensure that actions can be carried out). An indication that a business rule might have changed content can be found in the activity panel, where the updating user would be the service user.
If you have any questions or would like to discuss possible business rules, contact Fotoware Support. If available, send your documented workflows and business processes (BPMN) so we can validate the setup in Fotoware Alto.
Create a Business Rule
- Go to Settings > Business Rules.
- Select Add.
- General (Check Business Rule settings)
- ID: No special requirements except for uniqueness amongst rules
- Make sure Enabled is selected.
Business Rule: Notification for contents expiring in 10 days
Business Rule: Assign Number Sequence with Format on Creation of Content Item
Business Rule: File Name Parsing to Fieldsets
Business Rule: Filename parsing for product codes
Business Rule: Filename Parser
Update a Business Rule
- Go to Settings > Business Rules.
- Select your Business Rule.
- Update.
- Save.
The Business Rule will not execute after a change to the Business Rule, but only triggers when something happens to a Content Item (Create, Update, Replace).
Delete a Business Rule
- Go to Settings > Business Rules.
- Select your Business Rule.
- Delete.
The actions applied are permanent; there is no rollback.
Create a Scheduler
- Go to Settings > Business Rules > Schedules.
- Select Add.
- See Schedules for information regarding each field.
- Save.
Create a Number Sequence
- Go to Settings > Business Rules > Number sequences.
- Select Add.
- See Number sequences for information regarding each field.
- Save.
Business Rule Use Cases
- Assigning or unassigning permission sets: Removing all or specific permission sets assigned to a content item when a layer is added to the content item. For example, if a user adds a layer for archiving purposes to a content item, the content may then become inaccessible to select user groups.
- Assigning or unassigning layers and entering field values: This is helpful if, for example, a photographer uploads files and sets certain tags, which then, in turn, add a tag such as “To be approved”. Or, a “multimedia” layer for capturing video-specific information could be automatically added when video or audio files are uploaded, already populated with default values such as copyright mentions. This feature only supports static values at the moment; dynamic values are not resolved via item lookups, which are scheduled for a later release.
- Sending messages to the integration if particular conditions are met. For example, once the above bespoke photographer has completed his upload, an integrated system can be notified of new content requiring approval, e.g., by tasking a user via a third-party system.
- Informing sales teams every Monday about new product literature.
- Hiding content that is nearing license expiry dates, and proactively informing the content owner.
- Publishing content to select stakeholders based on predefined schedules and other criteria.
- Archiving content by a predefined end-of-life date, e.g., your products.
-
Tagging content “New” when it isn’t older than a few days, or as “For review” when it’s years old.
Reminding content suppliers to complete their tagging if it wasn't done properly after import.
Sorting out content that needs a check, e.g., when faces are detected without consent data. - Tag images with product identifiers, copyrights, and other information: If you have content that carries unique identifiers in the filename or XMP/EXIF metadata, then this can be used for automatically tagging such files with, e.g., related products, persons, or other identifiable list items in Fotoware Alto - without any manual work being done. For instance, if a file with the name F-10005900-002_MT-HERS_Apple Gala.psd becomes uploaded, then the Business Rule Engine (BRE) will find the corresponding F-10005900-002 information in the file name and tag the file with a related product, like a “Gala” apple in our sample below. The Business rule engine also finds the string MT-HERS in the filename, assigns the related content classification (such as “Hero Shot” in our sample below), and can add default Copyright or License information for this type of content.
- Find tags in Title, Description, or full text of a document: Content typed by an editor, such as title or other descriptive metadata, or even extracted full-text information from a document or from XMP/EXIF, can be analyzed for matching list items with the content becoming tagged correspondingly. The Editor types a text into the title and/or description. On saving, those strings are parsed against the different caches of the lists “Controlled Vocabulary”, “People,” and “Organization”. The Business Rule Engine is capable of parsing a combination of words against such a cache, like “Harry Miller” or “Fotoware Alto,” and not just “Harry” or “Miller”, and bring back matching tags, as illustrated below. If the Controlled Vocabulary is also translated into German, as in our example, a German-speaking user will find content when searching in German, even without a translated title or description.
- Content used in campaigns may become inappropriate, and access to the specific content must be removed to ensure that no further marketing material is created using it. Therefore, the Layer "ContentStop" can be assigned to trigger a business rule that removes all permission sets, making the content available only to content owners.
- For videos, the YouTube team must always get access. A business rule can be used to always assign “YouTube All Access” to videos only.
- Ensure correct permissions for specific teams based on the content they access, e.g., the multimedia team's access to multimedia files.
- Updates to product images trigger a business process that assigns a "PIM review"-the layer that will trigger a service provider that can connect to the PIM system to get updated product information, and another service provider can then send the updated image to the PIM.
- The legal department must recall content after a complaint and assign a "Stop Now"-Layer. The business rule engine can directly restrict access to content and trigger a service provider to remove it from all online sources.
- Content suppliers assign a layer to content that lacks copyright information. This layer contains a trigger called "Get Copyright Details," which can be used to trigger a service provider that fetches copyright details such as source, original title, and usage restrictions from the corresponding websites. The business rule can be triggered automatically, or the content creator can trigger the copyright update when the content is used to avoid copyright infringements.
- The image tagging service provider (AI-powered Azure) will assign a layer on import that will hold all automatically generated tags. Those tags require human review and cleanup. After manual cleanup and removal of incorrect tag assignments, a trigger field will start a business rule that copies the reviewed and correct tags into the actual metadata layers used in the search.
- Production process where a storyboard layer contains all information about the next Instagram stories, and a trigger button starts a business process that informs the story creator in the story creation tool, using a service provider, which then uploads it back to Fotoware Alto and links it to the storyboard information.
- Content uploaded to Fotoware Alto is automatically tagged with the correct location tag (if available) based on the content's GPS metadata. This ensures that 47.3939904, 8.0411453, 17 is shown as Aarau.
-
Code Example with Service Provider:
- Picturepark.SDK.Samples/Picturepark.SDK.V1.Samples/Picturepark.ServiceProvider.Example.BusinessProcess at master · Picturepark/Picturepark.SDK.Samples
- The sample shows using a service provider to respond to the execution of a business rule in the CP backend, creating a notification for the user about a long-running task triggered by the rule. The user can cancel that task in the Fotoware Alto UI.
Best Practice
Every business process within an organization should be documented for internal use and to train new employees.
- How is new website content created?
- How is the product information data updated?
- Where does the shop data come from?
- How to deal with end-of-life products?
All of those processes involving content like imagery, videos, text, and pure data require a business process engine. Fotoware Alto offers a business process engine with a set of business rules that allow automation and more sophisticated integrations. Specific business rules, such as approval workflows or life cycles, can be developed to run in Fotoware Alto only or to communicate with external systems via APIs using service providers. Business rules in Fotoware Alto, combined with service providers, allow you to convert your Fotoware Alto into a content hub that connects your required business systems and sends data where it is needed.
Debugging tips
- If your business rule isn't working, first check the Kibana logs on the platform.
- You always have to assign a layer before adding text to it, or you can provide the to-be-assigned data in the layer's default values.
- Are there any default JSON reserved characters in default value fields that you need to escape? The following characters must be properly escaped to be used in strings:
- Backspace is replaced with \b
- Form feed is replaced with \f
- Newline is replaced with \n
- Carriage return is replaced with \r
- Tab is replaced with \t. Double quote is replaced with \"
- Backslash is replaced with \\
- Required fields need to be added to the business rule - if not, the business rule process will fail, and Kibana logs an error
- Check that you don't have duplicate actions in the same rule, i.e., assigning the same tagbox to the same field.
- Make sure you are using the correct JSON for translated vs. untranslated fields.
- Are your refids in the business rule correct?
- If you have entered text into a field, is it the same case as in the business rule? i.e., Title vs title.
Fieldtype hints
Check the fields, their formats, and their return values.
A date-time field condition must have the expected value expressed in YYYY-MM-DD and date time as 2019-09-12T17:03:34.5293947Z,JSON for example
For Multi Fieldsets or Relationship fields, you can add to the condition that the value you are looking for is in the first fieldset by adding the [0] to specify the first fieldset. If you want to search through the second fieldset, use [1] e.g:
{
"kind": "FieldValueChangedCondition",
"fieldPath": "layerWaft.multiFieldsetField[0].street",
"expectedValue": "StreetName"
}
If you would like the condition to be checked against any of the fieldsets in that field, you can use:
{
"kind": "FieldValueChangedCondition",
"fieldPath": "layerWaft.multiFieldsetField..street",
"expectedValue": "StreetName"
}
Fields (tagbox, fieldsets, relationship) can be erased with “value”:null, This requires the field to be configured with the setting replace to true (“replace”:true).
Business Rule limitations
- The Business Rule will not execute after a change to the Business Rule, but only triggers when something happens to a Content Item (Create, Update, Replace).
- The actions applied to Content Items will stay applied and not be rolled back after deleting or updating a Business Rule.
- You cannot format text in notifications (in produce notification action), but you can format the notification text sent out via email in Settings > Templates.
- Note that the Business Rule settings are displayed only to users with the system Super Admin role.