Hello Mahi, Though I could not understand your use case completely, I suspect you are looking for RuntimeData. Instead of identifying the job and deciding, you should prepare distinct runtime data for different jobs. RuntimeData will be passed to the service during job execution, based upon which you could decide further actions.
Refer to this job data: https://github.com/apache/ofbiz-framework/blob/49bcc245007b685ff3dc423b143acf9ae22b4a5b/applications/manufacturing/data/ManufacturingScheduledServices.xml#L39 PS. Attachments are filtered out on lists, so you could store the image on platforms like google drive, dropbox, etc, and share the link here. HTH Thanks and Regards, Aditya Sharma On Tue, Apr 18, 2023 at 3:53 PM Mahi maheshwari <[email protected]> wrote: > Hello Community, > > Is there a way to find and access the job Id and job name inside a Java > service? > I have a service "SendEmailService" written in Java for mail notification, > for this, I have created the job in jobSandBox. > whenever the "SendEmailService" service is called by the scheduler then > inside this service, I want to know the job name associated with that > service for the calling service. > I'm attaching the image below, please take a look at the attachment for > reference. > > *for example: * > SendEmailService(HttpServletRequest request, HttpServletResponse response){ > code to get a job id and job name > } > > Regards, > Maheshwari. >
