DAM Event Listener

Cloud Edition only

This project is designed for Product 360 Cloud Edition customers only. (On premise customers can use this project and modify it to their needs, but it is not under Informatica's support! )

Preface

This BPM (AVOS) project enables Product 360 Cloud Edition customer's to create derivatives for Digital Assets image files via converting them with ImageMagick. This functionality works only for the Asset Provider HMM, which is the default in the Cloud Edition settings.

Table of Contents

Prerequisites

The DAM-event-listener also supports the auto assignment functionality over the message queue communication. Therefor the messaging service of ActiveVOS must be configured. Please reach out to the Installation and Operation guide for the following areas:

  • Installation of ActiveVOS with ActiveMQ support and configuration of queues in ActiveVOS (Note: ActiveVOS version 9.2.4.6 is a prerequisite for queue based interactions between Product 360 and ActiveVOS)

Installation

You have to deploy these resources:

  1. InfaResources.bpr

  2. DAM_Tools.bpr

  3. DAM_Resources.bpr

with the BPM (AVOS) console.

Also it is possible that you deploy the workflows with your BPM designer. The resources of the projects are in the zip files:

  1. InfaResources.zip

  2. DAM_Tools.zip

  3. DAM_Resources.zip

Configuration

The base configuration of the DAM Event Listener, which is the base for creating derivatives, must be defined in the BPM URN mappings. Therefore you have to define the following mappings in the BPM console.
These settings will be done from Informatica OPS team when the customer request it.

URN mappings for AWS

URN

URL

Mand.

Description

urn:p360.aws.s3.bucket.name

pim-example-bucket

Yes

S3 bucket name of the customer's environment

urn:p360.dam.max.threads

2

No

Maximum number of parallel ActiveVOS threads while creating new assets

urn:p360.dam.resource.project

DAM_Resources

No

Name of the resource project where the customer can define the derivatives

urn:p360.dam.aws.public.path

/qa/P360Server/public/

No

Public path on the S3 bucket, where the derivatives can be pushed

urn:p360.dam.aws.public.url

https://pim-iw2022-bucket.s3.amazonaws.com/qa/P360Server/public/

No

Url to the public S3 bucket

URN mappings for Azure

URN

URL

Mand.

Description

urn:p360.dam.max.threads

2

No

Maximum number of parallel AciveVOS threads while creating new assets

urn:p360.dam.resource.project

DAM_Resources

No

Name of the resource project where the customer can define the derivatives

urn:p360.dam.azure.public.path

/opt/informatica/shares/S3_PUBLIC/

No

Public path on the public blob storage, where the derivatives can be pushed

urn:p360.dam.azure.public.url

https://voldemononprodsa.blob.core.windows.net/pim-voldemo-customer-container-nonprod-public/

No

Url to the public blob storage

Context properties for the messaging service

These 3 required context properties in the messaging service ActiveMQ have to be created. You can navigate to the service in the ActiveVOS console.
images/download/attachments/482735879/image2022-6-1_17-0-9.png

Name

Value

queue.JNDI_P360_DAM_ASSIGNMENT

heiler.hmm.backend.event.assignment

queue.JNDI_P360_DAM

heiler.hmm.backend.event

queue.JNDI_P360_DAM_MODIFIED

heiler.hmm.backend.event.assetModified

Database JNDI

ActiveVOS must be able to connect to the DAM related tables on the database, therefor you have to create an additional JNDI entry "<Resource name="jdbc/DAM" auth="Container" type="javax.sql.DataSource"" to the HMM tables, in the configuration file active-bpel.xml.

Schedule the maintenance job

The DAM-Event-Listener is implemented as an endless loop. The workflow has to be started one time via creating a scheduled maintenance job via the ActiveVOS console.

images/download/attachments/482735879/image2022-6-7_13-28-27.png

Job settings

Key

Value

Name

DAM_Event_Listener

Frequency

Once

Start Date on Server

Do not modify

Start Time on Server

Do not modify

Run Options

Skip if running

Service Name

DAM_Event_Listener

Input Document

<dam:startDAMEventListenerRequest xmlns:dam="http://p360.dam/activevos/process/DamEventListener" xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<dam:listencreateevent>true</dam:listencreateevent>
<dam:listenmodifyevent>true</dam:listenmodifyevent>
</dam:startDAMEventListenerRequest>

Defining Derivatives

Derivatives must be defined with the help of a xml definition, which is located in the resource project which is defined in the URN mappings of ActiveVOS.

ImageMagick

Only conversions for images with the command line tool convert from ImageMagick are supported!

images/download/attachments/482735879/image2022-6-7_14-47-34.png

images/download/attachments/482735879/image2022-6-7_14-48-56.png

If you want to make some modifications you have to click on the link, make your modifications and click on update.

The configuration file DAM_DefineDerivatives.xml

DAM_DefineDerivatives.xml
<das:dataAccessResponse xmlns:das="http://schemas.active-endpoints.com/data-access/2010/04/data-access.xsd" statementId="string">
<!-- Description of defining DAM property fields
Tag: DEV_ID: Mandatory number of the derivate.
Allowed values between 1 and 100
Tag: DEV_NAME: Mandatory description of the derivate 50 characters at maximum.
If this value is empty the derivative with this id will be deleted!
Tag: DEV_EXT: Mandatory extension of the derivate 10 characters at maximum.
Tag: DEV_CONVERT_PARAMS:
Optional parameters for the ImageMagick command convert. If this value is set a derivative will be created otherwise not!
Tag: DEV_PUBLIC:
Optional parameter which defines whether the derivative will be copied into the public space. Valid values: Yes, No, 1,0
Tag: DEV_PROP_FIELD_ID:
Optional parameter defines whether the public path will be pushed into a property field. Allowed values between 1 and 100
-->
<!-- Examples
<das:row>
<DEV_ID>1</DEV_ID>
<DEV_NAME>Jpeg 70x70</DEV_NAME>
<DEV_EXT>.jpg</DEV_EXT>
<DEV_CONVERT_PARAMS>-alpha off -flatten -strip -antialias -quality 80 -resize 70x70 -background white -gravity center -extent 70x70 -density 72x72 -colorspace sRGB "%1"[0] "%2"</DEV_CONVERT_PARAMS>
<DEV_PUBLIC>YES</DEV_PUBLIC>
<DEV_PUBLIC_PROP_FIELD_ID>81</DEV_PUBLIC_PROP_FIELD_ID>
</das:row>
<das:row>
<DEV_ID>2</DEV_ID>
<DEV_NAME>Jpeg 300x300</DEV_NAME>
<DEV_EXT>.jpg</DEV_EXT>
<DEV_CONVERT_PARAMS>-alpha off -flatten -strip -antialias -quality 80 -resize 300x300 -background white -gravity center -extent 300x300 -density 72x72 -colorspace sRGB "%1"[0] "%2"</DEV_CONVERT_PARAMS>
<DEV_PUBLIC>YES</DEV_PUBLIC>
<DEV_PUBLIC_PROP_FIELD_ID>82</DEV_PUBLIC_PROP_FIELD_ID>
</das:row>
<das:row>
<DEV_ID>3</DEV_ID>
<DEV_NAME>PNG 1024x1024</DEV_NAME>
<DEV_EXT>.png</DEV_EXT>
<DEV_CONVERT_PARAMS>-alpha off -flatten -strip -antialias -quality 80 -resize 1024x1024 -background white -gravity center -extent 1024x1024 -density 72x72 -colorspace sRGB "%1"[0] "%2"</DEV_CONVERT_PARAMS>
<DEV_PUBLIC>YES</DEV_PUBLIC>
<DEV_PUBLIC_PROP_FIELD_ID>83</DEV_PUBLIC_PROP_FIELD_ID>
</das:row>
-->
</das:dataAccessResponse>

Example define a 70 pixel RGB Jpeg as derivative

Example 70x70
<das:dataAccessResponse xmlns:das="http://schemas.active-endpoints.com/data-access/2010/04/data-access.xsd" statementId="string">
<das:row>
<DEV_ID>1</DEV_ID>
<DEV_NAME>Jpeg 70x70</DEV_NAME>
<DEV_EXT>.jpg</DEV_EXT>
<DEV_CONVERT_PARAMS>-alpha off -flatten -strip -antialias -quality 80 -resize 70x70 -background white -gravity center -extent 70x70 -density 72x72 -colorspace sRGB "%1"[0] "%2"</DEV_CONVERT_PARAMS>
<DEV_PUBLIC>NO</DEV_PUBLIC>
<DEV_PUBLIC_PROP_FIELD_ID></DEV_PUBLIC_PROP_FIELD_ID>
</das:row>
</das:dataAccessResponse>

Key

Value

Description

DEV_ID

1

Unique identifier of the derivate

DEV_NAME

Jpeg 70x70

Name of the derivative

DEV_EXT

.jpg

New extension of the converted image

DEV_CONVERT_PARAMS

-alpha off -flatten -strip -antialias -quality 80 -resize 70x70 -background white -gravity center -extent 70x70 -density 72x72 -colorspace sRGB "%1"[0] "%2"

Command line parameters for the command convert to create a jpeg derivative with the dimension 70x70 in the colorspace RGB

DEV_PUBLIC

NO

This tag defines whether the derivative will also pushed to a public accessible blob storage. Please create a CTP ticket to create this storage.

DEV_PUBLIC_PROP_FIELD_ID

empty

The public URL to the derivative will be stored in this property field, when DEV_PUBLIC is YES.

Default states

By default the DAM-Event-Listener workflow will create 5 states.

Id

Name

0

*No status defined*

1

Create derivatives again

2

Derivatives successfully created

3

Error while creating derivatives

4

No derivative definition for this type

This state will be stored directly on the Media Asset.

images/download/attachments/482735879/image2022-6-7_15-37-5.png

Start the DAM Event Listener

The DAM Event Listener can be started in the ActiveVOS console.

images/download/attachments/482735879/image2022-6-7_13-30-34.png

Now the process should run. You can check this as well in the ActiveVOS console.

images/download/attachments/482735879/image2022-6-7_15-44-43.png

Processes

You should see these processes.

Verification

Let's assume you defined the derivative with the Identifier 1 in your DAM_DefineDerivativel.xml definition.

  1. Login into you Product 360 web application

  2. Click on Media

    images/download/attachments/482735879/image2022-6-7_15-58-6.png
  3. Search an asset

  4. Go to the General information tab in the details section and set the state to Create derivatives again

  5. Go to the Derivatives tab and refresh the page. If everything works as expected you should see the derivative

    images/download/attachments/482735879/image2022-6-8_8-19-15.png
  6. If the derivative was not created successfully, please check the ActiveVOS processes

    images/download/attachments/482735879/image2022-6-8_8-23-14.png