As Feike mentions - use Java HTTPClient API as discussed here - Adobe Experience Manager Help | Invoking Adobe Experience Manager Sling Servlets using Apache HTTP APIs
Here is an artilce that talks about how to use the JS API for HTL -- Creating a Tab layout component for Adobe Experience ManagerNOTE - you cannot use JSP with HTL as ppl on this thread mentioned. You can use JS with HTL - not JSP. The best way is to implement your methods in Java or use Sling Model...
Checking with internal ppl. I do not think there is a hard limit (for example - no where does it state that you can only have 500 under a node) - but there are factors. I will post back.
Here is a video i just created to clear this up:Also for more information on Editable Templates - watch this Guided Journey (You can also find this GJ in Experience League): Scott's Digital Community: Guided Journey for Experience Manager on Editable Templates Hope this helps...
If the component is locked in the editable template - only way to delete it is from the template view. You cannot delete (or even modify) a locked component from the page view. A locked component results in an author not being able to touch it within the page view (see the video below).
That is what I am trying to understand - in this use case -what is the payload of the workflow? Typically a payload is asset, pages, etc, not an AEM Package.
You can look at trying to use Java JCR API to read those values. You can call a Servlet from an event handler and then read those node properties using a Strongly typed API.Some similiar to what is dicussed here -- Adobe Experience Manager Help | Invoking Sling Servlets from Adobe Experience Manager...