Custom workflow publishes page with selected referenced assets
Hello,
I'm trying to design a workflow that can publish page with referenced assets, basically do the same job as "Published References" popup in manage publication.
I suppose the process would be:
1. Get all referenced assets and select what I need.
2. Publish these assets with page.
I was thinking to get the asset path(s) under payload/jcr:content (our team stores the asset path(s) there), and set these path under the workflow instance to publish them. However, it seems that workflow instance doesn't bind referenced assets publication (I used manage publication and selected all references, but cannot find them under corresponding workflow instance).
As to getting the referenced assets, is ReferenceSearch a better way to get asset path(s)? Will be gratefull if there's any code snippet to look at 🙂
And as long as I get the assets I'd like to publish, what should I do next? what's the logic behind it?
Thank you.