How does Creative Workflow works

Introduction

Starting from the 2024.1.0 version, a new Creative Workflow feature has been introduced in the Portal (see functional documentation of the feature here : Functional documentation).

In this transition from the first upload service /portal/dam-import to the creative workflow /portal/spaces, continuity is maintained by seamlessly integrating with the existing Mass Import services. The REST services have been upgraded, enhancing mass indexing capabilities for the items inside spaces.

Central to this upgrade is introducing the object collaborativespace, intricately linked to a job with the object massimportjob. This collaborative space enriches the mass import process, allowing teams to communicate and manage assets collaboratively. Features include space team collaboration, comments and tag members of space, and version tracking for assets within the collaborative space.

Technical metadata still resides on the object massimportitem, while functional metadata adopts a flexible JSON format for efficient indexing across various asset funds stored at the level of the massimportjob.

This documentation serves as your comprehensive guide to implementing and maximizing the potential of the first upload service to Spaces feature upgrade. Let's dive into the details for a seamless transition and enhanced upload to the DAM.

Prerequisites

Detailed prerequisites => Creative workflow installation guide | Prerequisites

Structures Updates history

collaborativespace

2023.4 =>Added


2023.5

Fields changes

  • owner

    • Tags:

      • Added: rest_api_dam_data/name|lastname|firstname|email|avatar, rest_api_include/massimport

  • team

    • Tags:

      • Added: rest_api_dam_data/name|lastname|firstname|email|avatar

  • job

    • Tags:

      • Added: rest_api_include/massimport

  • brieffiles

    • Tags:

      • Added: rest_api_dam_data/brieffile, rest_api_dam_data/owner

Faces

Selector

Old selector

New selector

Collection<String> faces = new HashSet<String>(); faces.add("mandatory"); if(!"4".equals(surfer.getRoleId().toString())){ } faces.add("not_editable"); // will be moved up when other roles will have access to the spaces return faces;

Configuration

  • mandatory

    • added

      • Viewable:

      • Editable:

      • Mandatory:

  • not_editable

    • added

      • Viewable:

      • Editable:

      • Mandatory:

 


2023.5.3

Fields changes

  • created

    • Tags:

      • Added: rest_api_include/massimport

  • modified

    • Tags:

      • Added: rest_api_include/massimport

  • team

    • Tags:

      • Added: rest_api_dam_data/name|lastname|firstname|email|avatar|status

      • Removed: rest_api_dam_data/name|lastname|firstname|email|avatar

  • targetlibrary

    • Tags:

      • Added: rest_api_mass_import_agg

Tags

Added

  • pkg/security/collaborative

Faces

Selector

Old selector

Collection<String> faces = new HashSet<String>(); faces.add("mandatory"); if(!"4".equals(surfer.getRoleId().toString())){ } faces.add("not_editable"); // will be moved up when other roles will have access to the spaces return faces;

New selector

Configuration

  • mandatory

    • targetlibrary (added)

      • Viewable: true

      • Editable: true

      • Mandatory: true

 


2024.1

Fields changes

  • owner

    • Index:
      Not indexed --> Indexed

  • name

    • Index:
      Not indexed --> Indexed

 

collaborativebrief

2023.4 =>Added


2023.5

Tags

Added

  • rest_api_dam_create


2023.5.3

Tags

Added

  • pkg/security/collaborative

  • pkg/security/secugroup/all

  • rest_api_dam_update

massimportpreviousitem

2023.4 =>Added


2023.5

Fields changes

  • owner

    • Tags:

      • Added: rest_api_include/massimport

  • binary

    • Tags:

      • Added: dam_asset_raw_file_field

 


2023.5.3

Fields changes

  • itemlasteditdate (added)

    • Type: datetime

    • Nature:

    • Label:

    • Default value:

    • Order: 1500

    • Remote name:

    • Max size: 0

    • Attachment:

    • In list:

    • Editable: false

    • Viewable: false

    • Mandatory: false

    • Null if empty: false

    • Auto carriage return: false

    • Index: Not indexed

    • i18n: false

    • i18n for:

    • Tags: rest_api_include/massimport

  • itemlasteditor (added)

    • Type: child

    • Nature: user

    • Label:

    • Default value:

    • Order: 1600

    • Remote name:

    • Max size: 0

    • Attachment:

    • In list:

    • Editable: false

    • Viewable: false

    • Mandatory: false

    • Null if empty: false

    • Auto carriage return: false

    • Index: Not indexed

    • i18n: false

    • i18n for:

    • Tags: rest_api_include/massimport

Tags

Added

  • pkg/security/collaborative

 


2024.1

Tags

Added

  • rest_api_dam_delete

 

wkfcollaborativespace & wkfcollaborativespaceaction

2023.4 =>Added

Instances :

wkfcollaborativespace

wkfcollaborativespace/1 (ADDED)

  • activated: 2

  • child:

  • color: 1

  • created: 26/05/2023 17:29:23

  • id: 1

  • isarchived: 2

  • isonline: 2

  • modified: 26/05/2023 17:29:23

  • name: delete

  • onenter:

  • onleave:

  • owner: 1

  • parent:

  • position: 0

  • published: 2

  • status: 2


wkfcollaborativespace/2 (ADDED)

  • activated: 1

  • child:

  • color: 4

  • created: 26/05/2023 17:29:23

  • id: 2

  • isarchived: 2

  • isonline: 2

  • modified: 26/05/2023 17:29:26

  • name: draft

  • onenter:

  • onleave:

  • owner: 1

  • parent:

  • position: 0

  • published: 2

  • status: 2


wkfcollaborativespace/6 (ADDED)

  • activated: 1

  • child:

  • color: 2

  • created: 26/05/2023 17:29:23

  • id: 6

  • isarchived: 2

  • isonline: 1

  • modified: 26/05/2023 17:29:29

  • name: online

  • onenter:

  • onleave:

  • owner: 1

  • parent:

  • position: 0

  • published: 2

  • status: 2


wkfcollaborativespace/7 (ADDED)

  • activated: 1

  • child:

  • color: 8

  • created: 26/05/2023 17:29:23

  • id: 7

  • isarchived: 1

  • isonline: 2

  • modified: 26/05/2023 17:29:31

  • name: archived

  • onenter:

  • onleave:

  • owner: 1

  • parent:

  • position: 0

  • published: 2

  • status: 2


wkfcollaborativespaceaction

wkfcollaborativespaceaction/2 (ADDED)

  • activated: 1

  • child:

  • condition:

  • created: 26/05/2023 17:29:23

  • forward: 0

  • icon:

  • id: 2

  • modified: 26/05/2023 17:29:23

  • name: archive

  • ontransition:

  • owner: 1

  • parent:

  • position: 0

  • roles:

  • state_in: 6

  • state_out: 7

  • status: 2


wkfcollaborativespaceaction/3 (ADDED)

  • activated: 1

  • child:

  • condition:

  • created: 26/05/2023 17:29:49

  • forward: 0

  • icon:

  • id: 3

  • modified: 26/05/2023 17:29:49

  • name: publish

  • ontransition:

  • owner: 1

  • parent:

  • position: 0

  • roles:

  • state_in: 7

  • state_out: 6

  • status: 2


2024.1

Instances

wkfcollaborativespace

wkfcollaborativespace/6

  • modified: 26/05/2023 17:29:29 --> 04/01/2024 16:11:22

  • published: 2 --> 1

massimportitem

massimportjob

contentcomments

role

user

asset

colors instances

wkfcontentcomments & wkfcontentcommentsaction instances

wkfmassimportitem instances

wkfmassimportitemaction instances

wkfuser & wkfuseraction

pkgroletemplate instances

New tags:

pkg/touch/on/comment, pkg/wkf/action/on/comment, pkg/wkf/action/on/comment/toreview, pkg/wkf/action/on/comment/toreview

Thanks to PACKAGED_Activity’s services :

  • pkg/touch/on/comment => On massimportitem structure configuration

    • With this tag, the commented instance is touched
      (Mainly to get an on update the modification date)

  • pkg/touch/on/save => On massimportitem.space

    • When the instance with a prop bearing this tag is saved, it triggers an update for the associated child instance (child retrieved from “tagged” prop)

  • pkg/wkf/action/on/comment => On massimportitem structure configuration

    • This tag allows workflow actions on instances after a comment is created for an instance of the tag bearing structure.

  • pkg/wkf/action/on/comment/toreview => On massimportitem structure configuration

    • This indicates the action to be made to the instance of the tag bearing structure, after a comment is created

  • pkg/wkf/action/on/comment_only_from_status/3 => On massimportitem structure configuration

This tag allows to add a status condition on the process workflow action. “3” represents the status id from which the “tag action” will be made. If a “comment_only_from_status” tag is not present on the structure, “tag action” will be made on each comment addition (for an instance of the tag-wearing structure)

For these behaviours to be present, PACKAGED_Activity has to be correctly configures
More details about the new plugins config below.

 

Diagram of dependencies

You can find below a diagram that displays the intricate relationships and dependencies among key objects used in the Creative Workflow to gain a comprehensive understanding of their interconnected roles and contributions.

image-20240219-102156.png
Diagram of dependencies for objects used in creative workflow (collaborativespace,massimportitem,massimportjob,massimportpreviousitem,collaborativebrief)

Portal config

Details on the portal config used for the spaces => Creative workflow installation guide | Portal configuration

Triggers logics

Some triggers have been put into place to ensure the correct communication of the objects that come into action in the creative workflow.

Several denormalizations have been strategically established among the core objects within the Creative Workflow. This setup facilitates seamless information sharing, enabling straightforward evaluation of security permissions and convenient access to information at a child level. The denormalized objects include massimportitem, massimportjob, and collaborativespace.

Additional triggers have been implemented to incorporate logic and ensure that instances remain up-to-date, reflecting the latest user interactions within spaces.

Notifications and emails

Two kinds of notification can be considered inside the Creative Workflow in terms of delay.

Immediate notifications

The following actions trigger email notifications sent immediately after the action is done.

  • When a new comment is created (new_comment.html)

  • When a new version of a media is uploaded (new_version_of_media.html)

  • When a user is invited inside a space (send_invite.html)

Delayed notifications

The following notifications are considered delayed as they’re sent after an asynchronous action or to gather a batch of items that are related to the same action. The actions that trigger those kind of notifications are :

  • When one or multiple items are uploaded to the space - Batch(new_media.html)

  • When one or multiple items have their status updated - Batch (status_change.html)

  • When one or multiple items are published to the DAM - Asynchronous action (publish_done.html)

Personalization of notifications

To personalize the content of the notifications mentioned above, refer to the pageEmail templates & customization , which explains how to customize the content of email notifications with the new templating system.

The notifications sent when some assets have their status changed or when new items are uploaded can be overridden and adapted via a Groovy script. It is also possible to add some additional logic, apart from sending notifications, inside that script.

The corresponding groovy script paths can be set inside the parameter batch_topics_processors of the plugin PACKAGED_CreativeWorkflow.

By default it is configured as follows:

The value must be a JSON object :

  • The key is a topic identifier that will gather events that are the subject of a batch

  • The value is a string used to retrieve a Groovy script (path relative to the SAN)

Each script is treated at the frequency rate defined in the batch_periodicity parameter of the plugin PACKAGED_CreativeWorkflow.

The parameter enable_batch_treatment must be set to true to allow the Groovy scripts to be treated.

Security

New selectors have been introduced within the security macros to enhance the logic for the Creative Workflow:

Existing selectors :

  • $anyowner: Returns true for any owner

  • $selfowner: Returns true if the surfer is the owner

New selectors available :

  • $teammember: Returns true if the surfer is a member of space’s team

    Activation conditions :

    • The structure of the object must have the tag pkg/security/collaborative

    • The object must have a property named team, which should be of the type childmultilngdb and nature user.

  • $teamleader: Returns true if the surfer is the job owner(jobowner property)
    Activation conditions :

    • The structure of the object must have the tag pkg/security/collaborative

    • The object must have a property named jobowner, which should be of the type childmultilngdb and nature user.

Features

Versions

New versions

The creative workflow provides a versioning feature for all the uploaded items. The versions management is working through a binary modification on the current massimportitem, and the creation of a massimportpreviousitem instance.

The current massimportitem will get the new binary => This is the new version of the item, its version number is increased too.

And we take the previously used binary from the massimportitem (before the binary update), to place it into a new instance of massimportpreviousitem, the version number of the created instance will be the previous version number taken from the updated item (before the update).

We’ve added an endpoint with PACKAGED_CreatedWorkflow to manage the binary update : /api/packaged/creative-workflow/massimport/item/new-version

The security constraints for this feature depend on the permissions given to create instances of massimportpreviousitem

 

Replacing current version

The version management feature also allows the replacement of existing/current versions with ancient/previous ones

The mechanic “behind the scenes” is pretty much the same as the one for the creation of the new version…(binary update)

When we choose to transform a previous version into the current one, we are replacing the binaries on the concerned instances. The current item gets a binary update, with a file taken from the previous version, the version numbers are also replaced. The previous version (massimportpreviousitem) also gets a binary update with the file taken from the current item before its binary update, the version number is also replaced. It's like an exchange of binaries and number versions between the selected previous version (to become the current one) and the current item.

We’ve added an endpoint with PACKAGED_CreatedWorkflow to manage the binary update: /api/packaged/creative-workflow/massimport/version/make-current

The security constraints for this feature depend on the permissions given to manage the status of massimportitem instances

Comments

Reviewing assets in spaces can be done through the comment feature. It is possible to add a comment and reply to them, edit, and resolve a thread of comments. Comments are instances of the object contentcomments.

Security

The feature of adding a comment or resolving a thread comment is not restricted via security by default.

No security rule should block the insertion of instances in contentcomments for connected users.

Nevertheless, only a comment's author (owner) can edit or delete it.

Workflow

The default workflow used for comments is wkfcontentcomments. Comments are created by default with the status activated (id : 2). Each comment can be set as resolved or state done (id : 6) and reopened respectively through the actions done and activate.

When deleting a comment, the comment is not directly deleted but set to the status deleted. It will be later deleted once the item (massimportitem) on which the comment has been added will be deleted (via publication or simple deletion). Thus, it is necessary to have the actions and states mentioned above correctly set on the corresponding workflow to have correct status management for comments.

Type of comments

Depending on the type of asset, we can have different types of comments.

Positioned comments

It is possible for certain types of assets (via the assetnature property), to localize comments on the media. As of version 2024.1.0, comments can be localized on the following asset types (root asset nature codes): imagevideoMore types should be supported for future versions.

General comments

For all types of assets, it is possible to add comments not positioned on the media (via the tab Review).

Tagging users

It is possible to tag users inside comments via the character ‘@' (must be after a space character). Only space members can be tagged inside comments. Each newly tagged user will receive a notification with the comment’s content.

Configuration

Inside the tab “Review”, dropdowns allow you to configure how comments are retrieved.

It is possible to configure the sort and filter options proposed for comments via $.spaces.explore-items.items.detail.comments.

  • Filter options (filterOptions): Array that contains possible configurations for filtering comments

  • Sort options (sortOptions): Array that contains possible configurations for ordering comments

Invitation of users

It is possible to invite users to collaborate in spaces (see the functional description of adding users in spaces Invite colleague and partners to collaborate ).

We have two types of cases :

Existing user

If the user already exists, he will be proposed through the dedicated interface.

Inexisting user

An external user can be invited to any space via his email.

Once a user is invited by his mail, he will receive an email allowing him to set a new password, and mandatory information about his profile. Then, he will be connected automatically to the space where he’s invited to.

When a user is invited to a space via email, the link they receive contains a token that is valid for only 30 days. After that time, the user will need to be re-added to the space as a team member to receive a new valid link to connect for the first time.

The default role for a new user invited in space can be configured

  • via wedia-config through the menu Roles and Users > Roles

image-20240221-074035.png
  • Or by setting to true, the property role.isdefaultexternal, for the role instance we want to set as the default one.

Management of duplicates

The creative workflow also allows duplicate management like the upload feature, with a slight difference. For items of the creative workflow, we do not use the duplicate status (id 14). We are computing massimportitem.duplicates field like we were before, we are just skipping the status change step.

We can determine whether an item is a duplicate by checking the information in massimportitem.duplicates. If it is indeed a duplicate, we display the "duplicate" tag and enable the use of the duplicate comparison modal.

This process was provided by transformations and async transformations made with PACKAGED_DAM_Utils. The plugin configuration has been updated to enable this behavior on massimportitem coming from the creative workflow feature.

In the provided modal for duplicate comparison from the creative workflow, we are providing 2 default actions:

  • Keep duplicate

    • “Fake” workflow action to keep the duplicate. The action does not really exist on the workflow, because we are not using statuses. By calling this action we will empty the item’s duplicates field, this will remove the “Duplicate” tag.

  • Reject duplicate

    • Workflow action. The item is now on rejected status, and the “Duplicate” tag is still visible on the item.

 

Workflow of items

Here you’ll find information about the modifications made to the existing workflow of massimportitem

=> Creative workflow installation guide | 3/ New massimportitem workflow

And here you will find some details on the new workflows configuration

=> Creative workflow installation guide | Workflow configuration

 

New plugins configuration details

PACKAGED_Activity

Parameters :

  • touchOnEnabled

    • By default set to true

    • Description : When this parameter is set to true, pkg/touch/on/* tags are used.

  • wkfActionOnEnabled

    • By default set to true

    • Description : When set to true, pkg/wkf/action/on/comment/{action} tags are used if pkg/wkf/action/on/comment is present on the structure. If pkg/wkf/action/on/comment_only_from_status/{statusId} is present on the commented object structure, the wkfaction will only be made for commented objects with a status equal to {statusId}

  • targetFieldEnabled

    • By default set to true

    • Description : Enables filling of the field marked in thetargetField parameter for comments

  • targetFieldName

    • By default set to target

    • Name of the field to store the commented object key (e.g. => massimportitem/{id}). The field is on contentcomments.


PACKAGED_CreativeWorkflow

Parameters :

  • portal_base_url

    • By default set to portal

    • Description: Portal Base URL (for the generated links in the mail contents)

  • enable_batch_treatment

    • By default set to true

    • Description: Defines if Batch Mailer treatment should be enabled.

  • batch_periodicity

    • By default set to 300 ( in seconds)

    • Description : Defines the periodicity (in seconds) of batch processing and delay of the last modification batch files to process.

  • batch_topics_processors

    • By default set to

       

    • Description : The value is a JSON object where:

      • Each key represents a topic that groups events for batching.

      • The corresponding value is a character string that serves as a reference to a Groovy script, with its path relative to the SAN.

  • send_notification_to_team

    • By default set to false

    • Description : If is set to true, new_media, new_version_of_media and status_change emails will be sent to all users in space team, else the mail will only be sent to the owner.

  • validation-status-ids

    • Default value : 4,13

    • Description : This value will define status ids for which new versions upload will not be available. Because items will be under validation. This string can contain multiple status ids separated by a comma. The check is made for massimportitem objects, so status ids should be from wkfmassimportitem. The first Id will be considered, when asking approval, as the state to be in approval

  • wkfmassimportitem_action_tovalidate

    • Default value : tovalidate

    • Description : Name of the workflow action to process to put the massimporitem in approval state when someone asks the approval of an item

  • wkfmassimportitem_action_toapproved

    • Default value : toapproved

    • Description : Name of the action to process when massimportitem goes from the approval state to approved state.

  • wkfmassimportitem_action_torejected

    • Default value : torejected

    • Description : Name of the action to process when massimportitem goes from the approval state to rejected state.