Business Rules

Every business process inside an organization should be sketched out - for internal documentation and training of new employees.

  • How is new content for the website created?

  • How is the product information data updated?

  • Where does the shop data coming 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. Picturepark offers a business process engine with a set of business rules which allow automation and more sophisticated integrations. Specific business rules like approval workflows or life cycles can be developed to run in Picturepark only or communicate with external systems via API using service providers. Business rules in Picturepark combined with service providers allow you to convert your content platform into a content hub, that connects your required business systems and send data where it is needed or required.

The business rules always run in the context of the service user which is the Super Admin. Therefore only Super Admins have access to Business Rules in the Settings Menu. Otherwise, users can configure actions as business rules they are not allowed to perform.

In the meantime please contact if you have questions or would like to discuss possible business rules for your Picturepark.

If available please send over your documented workflows and business processes (BPMN) so we can validate the setup in the Picturepark Content Platform.

Example: A business process service provider example on Github:

  • The sample shows the usage of a service provider to react to the execution of a business rule in the CP backend, creating a notification about a then triggered long-running task for the user. The user is able to cancel that task from the CP UI.

Example Actions

  • 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 were to add a layer for archiving purposes to a content item, this could then trigger the content to become inaccessible for 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 added automatically on the upload of video or audio files, already populated with default values such as copyright mentions. This feature only supports static values at the moment, no dynamic values are resolved via the lookup of referenced items; which is scheduled for a later release.

  • Sending messages to integration if particular conditions are met. For example, once the above bespoke photographer has completed his upload, an integrated system can become notified about new content that requires approval, e.g tasking a user with approval via a third-party system.

  • 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 the Content Platform - without any manual work being done. For instance, if a file with 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 which then assigns the related content classification such as “Hero Shot” in our sample below, and can add default Copyright or License information related to 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 form 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 save those strings are parsed against the different caches of the lists “Controlled Vocabulary”, “People” and “Organisation”. The Business Rule Engine is capable of parsing a combination of words against such a cache like “Harry Miller” or “Picturepark AG” 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 using German search terms, even with no translated title or description.

Possible Use Cases

  • 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 the specific content. Therefore the Layer "ContentStop" can be assigned and triggering a business rule that removes all permission sets, which makes the content only available to content owners.

  • For videos the YouTube team must always get access. A business rule can be used to always assign "YouTube"-All-Access for videos only.

  • Ensure correct permissions for specific teams based on the specific content e.g. access for the multimedia team for multimedia files.

  • Updates to product images trigger a business process that assigns a "PIM review"-the layer which 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.

  • Legal department must recall content after a complaint and assigns a "Stop Now"-Layer. The business rule engine can directly restrict access to content and trigger a potential service provider that removes the content from all online sources.

  • Content suppliers assign a layer to content where copyright information is missing. This layer holds a trigger called "Get Copyright Details" which can be used to trigger a service provider that would then go and fetch copyright details like source and 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 service provider for image tagging (AI-powered Clarifai) will assign a layer on import that will hold all automatic tags. Those tags require human review and cleanup. After manual cleanup and removal of wrong tag assignments, a trigger field will start a business rule that copies the reviewed and correct tags into the real metadata layers that are used in the search.

  • Production process where a storyboard layer contains all information about the next Instagram stories where a trigger button can then start a business process that informs the story creator inside the story creation tool using a service provider from where it is then uploaded back to Picturepark linked to the storyboard information.

  • Content uploaded to Picturepark is automatically tagged with the correct location tag (if available) based on GPS metadata available on the content. This ensures that 47.3939904,8.0411453,17 is shown as Aarau.

How to configure a business rule?

Business rules are shown using the default browser grid view, allowing you to get an overview of all available business rules. The browser grid view for business rules does not support search or filtering via the sidebar.

Check "Create a Business Rule" for details. 

On double click, an existing business rule can be opened and edited. The detail grid view for business rules opens with the following sub-navigation:

  • Business Rule

    • showing the name of the business rule

  • General

    • Basic information like name, ID (can only be set on creation, but not updated on edit), option to enable or disable the business rule.

  • Trigger Point

    • The trigger that the business rule is listening to.

  • Condition

    • The conditions that should be checked.

  • Transformations

    • Possible transformations from input from conditions.

  • Actions

    • The actions that will be executed when conditions are met.


Business rules always run in the context of the service user (so FULL privileges), 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.

Debugging Tips:

  • If your business rule isn't working first check the platform kibana logs.

  • You always have to assign a layer before adding text to it, or you provide the to-be-assigned-data in the default values for the layer.

  • 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 business rule - if not the business rule process will fail and Kibana logs an error

  • Check that you don't have a duplicate action twice 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 not translated 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

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 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).

Use Case: Looks for a Product Code in the Filename (needs to be at the beginning and 14 char long, needs to start with either F-, G- or V-). If found the Product tag gets assigned.

  1. MatchRegexCondition produces a dictionary of groups matching in the regex (key could be name or number), this is the input to the transformation.

  2. Transformations executed on the input

    1. TakeDictionaryValue takes the "product" group's value from the input ($parsed_productCode$)

    2. LookupCache takes this value and makes a lookup on the product list (from a cache created on this list) and produces the _refId of the matching list item

  3. This refId can then be used in the AssignLayerAction