Hello All
I have created a new workflow and have added a "DAM Unarchiver Process"(com.day.cq.dam.core.process.UnarchiverProcess) step in it. The workflow works fine and does its job. E.g. when I upload a zip file, it extracts the contents by creating a new folder. However, I am not able to set additional arguments which it supports.
I want to set removeOriginal=true and updateMode=OVERWRITE. When I set these arguments from process step, those don't get applied. I tried following syntaxes to set the arguments but it never works. Is this an issue in this step? Please help.
I have even tried to run this workflow programmatically and tried to set the arguments in respective map(PROCESS_ARGS) but even that does not work
Thanks
Ganesh
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Hi @gkkhatal,
Process arguments are comma separated pairs, where each pair consists of name and value separated by double colon.
In this case, can you try adding removeOriginal::true,updateMode::OVERWRITE
What version of AEM ?
Can you check the logs and verify any relevant entries in the log ?
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @gkkhatal,
Process arguments are comma separated pairs, where each pair consists of name and value separated by double colon.
In this case, can you try adding removeOriginal::true,updateMode::OVERWRITE
Views
Replies
Total Likes
Hi @gkkhatal,
By the statement enabled debug logging, you mean DEBUG log level on this class - com.day.cq.dam.core.process.UnarchiverProcess and it is still returning same default update mode?
Also, would like to do another cross check -> In your original post, you mentioned that you tried triggering workflow programatically by setting the map values.
That is via,
wfData.getMetaDataMap().put("updateMode", "..");
wfData.getMetaDataMap().put("removeOriginal", "..");
wfSession.startWorkflow(model, wfData);
Trigger the WF programatically again and observe the runtime instance (/var/workflow/model/instances) workflow data - Cross check if this is set here.
Views
Replies
Total Likes
Hi @Vijayalakshmi_S,
I tried it. But the workflowMetadata will set the values at workflow level and not to the process step level. I tried it anyways and it shows correctly in /var/workflow/instances, but that does not work as expected and the workflow still takes default values.
I tried to log the process level arguments(Set via process arguments in WF model) and this is how it shows. Note there are 2 items and the arguments are shown against PROCESS_ARGS:
{PROCESS_ARGS=removeOriginal::true,updateMode::OVERWRITE, PROCESS=com.day.cq.dam.core.process.UnarchiverProcess}
Now, I am thinking if those are correct arguments. Do you know valid arguments list for UnarchiverProcess? I could not find valid documentation for it. I had looked into the decompiled UnarchiverProcess and picked these arguments list(removeOriginal & updateMode) but those does not seem to be working.
Views
Replies
Total Likes
Hi @gkkhatal,
Nope. Workflow MetaDataMaps + WorkflowData MetaDataMaps can be used throughout the workflow. Recommended is to use WorkflowData's MetaDataMap.
Unarchiver process step uses com.day.cq.workflow.* family and not com.adobe.granite.workflow.*
In your code where you set the WorkflowData's MetaDataMap, can you use the one from com.day.cq.workflow.* family. If you are already using that, ignore this point.
Decompiled version seems to be straightforward, it just retrieves values from MetaDataMap(com.day.cq.workflow.metadata.MetaDataMap) and the key name you have used also seems to be correct.
I will try from my end in parallel.
Views
Replies
Total Likes
Hi @gkkhatal,
Just realised that the args are not retrieved from PROCESS_ARGS for this process - UnarchiverProcess. Instead it is directly retrieved using the key from MetaDataMap, where below are the possible key names
removeOriginal
disableExtract
maxBytes
maxNumItems
maxNumItemsPerDir
saveThreshold
skipFileNamePatterns
updateMode
Views
Replies
Total Likes
Hi @gkkhatal ,
After reproducing the issue in my local, was able to get to this.
We need to make use of the direct DAM Workflow Process named - Unarchiver and not the DAM Unarchiver Process selection from normal Process step.
Screenshot below for reference:
From CRXDE:
Views
Replies
Total Likes
Hello @Vijayalakshmi_S,
This finally worked. Thanks a lot for your time in this. Appreciate it!
Just a curious question. Is there relevant documentation/info about it? Looks like I was heading a wrong direction as I was not able to find precise info. The previous approach was really extracting the zip archive so did not think of changing the appraoch, thinking there was issue in calling the arguments.
Thanks again!
Ganesh
Views
Replies
Total Likes
Hi @gkkhatal,
No problem. There is no documentation related to this.
Was able to narrow down from this point
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Like
Replies