コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Executing slingPostServlet operation in workflow

Avatar

Level 3

Hi There , 

   I have a servlet which returns me a json and using sling post servlet from a jsp page I post entire json and new nodes gets created in jcr . Now i have a requirement to execute the same behaviour from a workflow . Is there any way where I can execute ,  slingPostServlet from a workflow directly by passing json string ? I know thet i can write a process step which would actually parse json string and using JCR API create nodes programatically . Just want to avoid that overhead and use sling post servlet 

1 受け入れられたソリューション

Avatar

正解者
Level 6

Using the Sling Post Servlet to create nodes when you are in a Process is to add overhead, not avoid it. The turnaround to create and send a HTTP Request to let the servlet take care of it is in my humble opinion to go over the river to get water. It is roughly the same amount of code to convert from JSON to http request than from JSON and directly to node. And you don't have to mess around with HTTP Requests.

And, the solution with HTTP Request is harder to test and maintain.

/Ove

元の投稿で解決策を見る

1 返信

Avatar

正解者
Level 6

Using the Sling Post Servlet to create nodes when you are in a Process is to add overhead, not avoid it. The turnaround to create and send a HTTP Request to let the servlet take care of it is in my humble opinion to go over the river to get water. It is roughly the same amount of code to convert from JSON to http request than from JSON and directly to node. And you don't have to mess around with HTTP Requests.

And, the solution with HTTP Request is harder to test and maintain.

/Ove