Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Curl Command to start a workflow on a DAM Asset

Avatar

Level 2

Hi, I'm trying to run Scene7 workflow on DAM Asset via curl command.
Command:

curl -u admin:admin -H User-Agent:curl -F "payload=/content/aemdesign-showcase/images/publications/demo-video-848x477.jpg" -F "payloadType=JCR_PATH" -F "workflowTitle=CurlTitle" -F "startComment=CurlComment" -F "model=/var/workflow/models/Scene7" http://192.168.27.2:4502/etc/workflow/instances

I am getting responses as 
1. Workflow model not found 
OR

2. 
<td>Status</td>
<td><div id="Status">500</div></td>
</tr>
<tr>
<td>Message</td>
<td><div id="Message">java.lang.IllegalArgumentException: Value for key payload can&apos;t be put into node: /content/aemdesign-showcase/images/publications/demo-video-848x477.jpg</div></td>
</tr>
Reference link used:
https://github.com/paulrohrbeck/aem-links/blob/master/curl_cheatsheet.md


Any thoughts on this?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@SagarVerliani Yes, I have tried that for assets as well. It is also working for me. PFB for the screenshot. Same command but now this time, the path is for asset.

curl -u admin:admin -H User-Agent:curl -F "payload=/content/dam/sample.png" -F "payloadType=JCR_PATH" -F "workflowTitle=CurlTitle" -F "startComment=CurlComment" -F"model=/var/workflow/models/form-workflow-model" http://localhost:4502/etc/workflow/instances

shaileshbassi_0-1656590341061.png

 

View solution in original post

6 Replies

Avatar

Community Advisor

@SagarVerliani PFB for the command for starting the workflow

curl -u admin:admin -H User-Agent:curl -F "payload=/content/sample/en" -F "payloadType=JCR_PATH" -F "workflowTitle=CurlTitle" -F "startComment=CurlComment" -F"model=/var/workflow/models/form-workflow-model" http://localhost:4502/etc/workflow/instances

I will getting the workflow started after hitting the curl command

shaileshbassi_0-1656581097227.png

shaileshbassi_1-1656581189012.png

Hope this helps.

Thanks 

 

 

Avatar

Correct answer by
Community Advisor

@SagarVerliani Yes, I have tried that for assets as well. It is also working for me. PFB for the screenshot. Same command but now this time, the path is for asset.

curl -u admin:admin -H User-Agent:curl -F "payload=/content/dam/sample.png" -F "payloadType=JCR_PATH" -F "workflowTitle=CurlTitle" -F "startComment=CurlComment" -F"model=/var/workflow/models/form-workflow-model" http://localhost:4502/etc/workflow/instances

shaileshbassi_0-1656590341061.png

 

Avatar

Level 2

Thank you @Shailesh_Bassi_,
The above command worked for me after whitelisting my public IPs appropriately.

Avatar

Community Advisor

Hi @SagarVerliani ,

Could you tell us what version of AEM you are using? If it's AEM 6.5, I believe you are aware of Common Repository Restructuring in AEM 6.5 for Workflow Instances

Previous location	
/etc/workflow/instances
New location(s) /var/workflow/instances

Also, please verify if your workflow model exists at the location you are trying to hit curl on. 
Hope that helps!

Regards,

Santosh

Avatar

Level 2

Thank you for the input @SantoshSai , we use 6.5.10.

The above command worked for me after whitelisting my public IPs appropriately.