Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
Adobe Summit 2023 | Complete list of AEM Sessions & Labs
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
Level 8

@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

Level 8

@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
Level 8

@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

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.