AEMasCS - programatically publish to Brand Portal | Community
Skip to main content
Level 2
May 24, 2023
Solved

AEMasCS - programatically publish to Brand Portal

  • May 24, 2023
  • 1 reply
  • 1740 views

Hi all,

i'm trying to automatically publish assets to brand portal when a user upload them to a desired folder

Basically i added the following configuration to the Custom Dam Workflow runner 

 

<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" jcr:primaryType="sling:OsgiConfig" postProcWorkflowsByExpression="[/content/dam(/.*/)bp-digital(/.*):/var/workflow/models/asset-publish-to-brand-portal]"/>

 

and the workflow models has:

Create Version -> Scheduled Publish to Brand Portal -> DAM Update Asset Workflow Completed

 

but the issue is when i try to deploy it with cloud manager pipeline, i have the following validation error 

The workflow process definition at /conf/global/settings/workflow/models/asset-publish-to-brand-portal/jcr:content/flow/process_1138020458 [Publish Asset] uses a workflow process com.day.cq.dam.core.process.ScheduledPublishBPProcess which is not supported on AEM as a Cloud Service.


i was also reviewing the executed JS code when we use the Touch UI and Publish asset to brand portal and it is doing a post to a servlet, should i use something similar to that?

 

Thanks in advance

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by VictorToledo

Hi @victortoledo , the best way forward for this would be to create a adobe support ticket for build pipeline issue and mention your cloud sdk version in the ticket. I am pretty much sure the process step is supported. 

You can have a look here https://github.com/adobe/aem-cloud-migration/blob/master/src/main/resources/workflowSteps.properties 
com.day.cq.dam.core.process.ScheduledPublishBPProcess  and com.day.cq.dam.core.process.ScheduledUnPublishBPProcess
both are marked to be supported.


exactly! i used that script to check the code compatibility and all is good. I dont understand. Yes i will try with a support ticket.

1 reply

Community Advisor
May 24, 2023

Hi @victortoledo , Are you getting any errors/warnings in logs stating com.day.cq.dam.core.process.ScheduledPublishBPProcess is not supported on Cloud or some documentation?

AFAIK, the process step works perfectly fine on AEM as Cloud Service and I was able to publish and view assets on BP

 

<process jcr:lastModified="{Date}2023-05-24T17:14:03.819Z" jcr:lastModifiedBy="admin" jcr:primaryType="nt:unstructured" jcr:title="Process" sling:resourceType="cq/workflow/components/model/process"> <metaData jcr:primaryType="nt:unstructured" PROCESS="com.day.cq.dam.core.process.ScheduledPublishBPProcess"/> </process>

 

 

Level 2
May 24, 2023

Hi @shubhanshusi2 , thanks for your help.

below my workflow

 

<flow jcr:primaryType="nt:unstructured" sling:resourceType="foundation/components/parsys"> <process jcr:created="{Date}2023-05-17T16:12:26.943-03:00" jcr:createdBy="admin" jcr:description="The Version to be activated/replicated is created" jcr:lastModified="{Date}2023-05-17T16:13:13.586-03:00" jcr:lastModifiedBy="admin" jcr:primaryType="nt:unstructured" jcr:title="Create Version" sling:resourceType="cq/workflow/components/model/process"> <metaData PROCESS="com.day.cq.wcm.workflow.process.CreateVersionProcess" PROCESS_AUTO_ADVANCE="true" jcr:primaryType="nt:unstructured"/> </process> <process_1138020458 jcr:created="{Date}2023-05-17T16:12:28.468-03:00" jcr:createdBy="admin" jcr:description="Publish the asset to Brand Portal" jcr:lastModified="{Date}2023-05-17T16:13:55.637-03:00" jcr:lastModifiedBy="admin" jcr:primaryType="nt:unstructured" jcr:title="Publish Asset" sling:resourceType="cq/workflow/components/model/process"> <metaData PROCESS="com.day.cq.dam.core.process.ScheduledPublishBPProcess" PROCESS_AUTO_ADVANCE="true" jcr:primaryType="nt:unstructured"/> </process_1138020458> <damupdateassetworkflowcompletedprocess jcr:description="This process will send DamEvent.Type.DAM_UPDATE_ASSET_WORKFLOW_COMPLETED event when DAM update asset workflow is completed" jcr:primaryType="nt:unstructured" jcr:title="DAM Update Asset Workflow Completed" sling:resourceType="dam/components/workflow/damupdateassetworkflowcompletedprocess"> <metaData PROCESS="com.day.cq.dam.core.impl.process.DamUpdateAssetWorkflowCompletedProcess" PROCESS_AUTO_ADVANCE="true" jcr:primaryType="nt:unstructured"/> </damupdateassetworkflowcompletedprocess> </flow>

 

 and the error is during the deployment to Cloud Manager environments.

2023-05-24T14:10:05.739Z com.myproject:aem-myproject-project.ui.content:1.0.1-SNAPSHOT The workflow process definition at /conf/global/settings/workflow/models/asset-publish-to-brand-portal/jcr:content/flow/process_1138020458 [Publish Asset] uses a workflow process com.day.cq.dam.core.process.ScheduledPublishBPProcess which is not supported on AEM as a Cloud Service. Bug Blocker

I know that i can override the results and continue with the deployment but i would like to use the recommended approach and avoid the issue on cloud manager

Community Advisor
May 25, 2023

Hi @victortoledo , the best way forward for this would be to create a adobe support ticket for build pipeline issue and mention your cloud sdk version in the ticket. I am pretty much sure the process step is supported. 

You can have a look here https://github.com/adobe/aem-cloud-migration/blob/master/src/main/resources/workflowSteps.properties 
com.day.cq.dam.core.process.ScheduledPublishBPProcess  and com.day.cq.dam.core.process.ScheduledUnPublishBPProcess
both are marked to be supported.