We need to call a job process method [ JobResult process(Job job) ] from an event handler handleEvent(final Event event).
Few items got deprecated so we are using JobConsumer api's instead of org.apache.sling.event.jobs.JobProcessor & org.apache.sling.event.jobs.JobUtil.
Any help is appreciated . Thanks in advance..
The docs say to use https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/consumer/JobConsumer.html
Correct.. we are using that API, but in over case we need to call process() when an event occurred like page activate or deactivate?? So coming back to the question:: how to call a process when an event occurred.
I couldn't follow you... Can you give me a real example (with some code) of the case that you've described?
When talking about activation/deactivation, we usually use Preprocessors instead of JCR Events or Sling Jobs:
Are you trying to call a Job from a JCR Event Listener? Is that your use case?