I have a custom workflow that will be used to publish pages. As part of the same workflow I want to send the API details to an external system. So I am planning to use the WorkflowProcess step, this workflow process step needs to call model class and get the json response.
Here is the model class that uses Jackson exporter to export aem page content into json, sample model class - http:4502/content/tco/visa/jcr:content/root/container.model.json
Do we have any OOTB method or APIs available to make a model class call from WorkflowProcess?
Model Class
@Model(
adaptables = { SlingHttpServletRequest.class, Resource.class },
adapters = ProductDetail.class,
resourceType = ProductDetailImpl.RESOURCE_TYPE)
@Exporter(
name = CommonConstants.JACKSON,
extensions = CommonConstants.JSON,
options = { @ExporterOption(
name = CommonConstants.SERIALIZATION_FEATURE + "." + CommonConstants.WRAP_ROOT_VALUE,
value = CommonConstants.TRUE) })
@JsonRootName("ProductDetail")
public class ProductDetailImpl implements ProductDetail
{
...
}