how do you pass a payload to a workflow through programatically
check this -
acs-aem-samples/SampleCQWorkflowProcess.java at master · Adobe-Consulting-Services/acs-aem-samples ·...
adobe - Insert value into Workflow Payload in Java - Stack Overflow
Interacting with Workflows Programmatically - check how workItem is used
Adobe Experience Manager Help | Creating an Adobe Experience Manager Custom Worflow Step with a dial...
You can use the Workflow API to work with payloads via a custom workflow step.
You can get information such as the JCR path of the payload, etc.
Furthermore - you can use other AEM APIs - like AssetManager API - to work with a given payload at the API level.
To see a good example - see this - where we modify a payload based on a property. This will give you a solid understanding...
Scott's Digital Community: Moving Digital Assets using Adobe Experience Manager Workflows