Expand my Community achievements bar.

SOLVED

Workflow for a manager Approval

Avatar

Level 3

I have created a workflow and set a launcher for start when modified 

I want it to approve or Reject the content fragment 

Content fragment variation 

The workflow is working but its not deleting or deactivate the Content fragment !!!!

i want the content fragment to be disappeared if Manager REJECTS! and display only after approve.

 

Screenshot (90).png

 

 

 

 

 

 

 

 

 

 

 

@Arun_Patidar @SantoshSai  @DEBAL_DAS @fanindras @lukasz-m @Pulkit_Jain_ 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Delete Asset (component) steps involves following process step : com.day.cq.dam.core.process.DeleteAssetProcess and it is saying The DeleteAssetProcess will delete the asset content if the real asset disappears.

Example:
If /var/dam/abc.jpg is deleted via webdav then /content/dam/abc.jpg will be removed

 

if you decompile DeleteAssetProcess then you will be seeing below logic -

DEBAL_DAS_0-1655735829731.png

 

 

https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/dam/core/p...

 

Like Activate Page/Asset , could you please give a try with Deactivate Page/Asset in case of rejection.

 

 

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @HariDo 

 

What is the code in the "delete asset" step? Can you check if there is any error in the logs once the step is executed?

 

Thanks,

Kiran Vedantam

Avatar

Correct answer by
Employee Advisor

Delete Asset (component) steps involves following process step : com.day.cq.dam.core.process.DeleteAssetProcess and it is saying The DeleteAssetProcess will delete the asset content if the real asset disappears.

Example:
If /var/dam/abc.jpg is deleted via webdav then /content/dam/abc.jpg will be removed

 

if you decompile DeleteAssetProcess then you will be seeing below logic -

DEBAL_DAS_0-1655735829731.png

 

 

https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/dam/core/p...

 

Like Activate Page/Asset , could you please give a try with Deactivate Page/Asset in case of rejection.

 

 

Avatar

Community Advisor

@HariDo Can you log the support ticket for this. Even I tried and it is not working. In the workflow history it is showing as complete but it is not working 

shaileshbassi_0-1655735440711.png

 

The step "Delete Asset", calls the java class "com.day.cq.dam.core.process.DeleteAssetProcess" which checks the 2 conditions i.e.

if (getAssetManager(workflowSession.getSession()).removeAssetForBinary(binaryPath)) {
log.debug("execute: successfully removed asset [{}] for binary [{}].",
DamUtil.binaryToAssetPath(binaryPath), binaryPath);
} else {
log.error("execute: failed to remove asset [{}] for binary [{}].",
DamUtil.binaryToAssetPath(binaryPath), binaryPath);
}

But I do not see it getting logged in the sling logs with the log level as "Debug".

 

Thanks