Implementing scheduler job to check document due date

cancel
Showing results for 
Search instead for 
Did you mean: 
rajiraji
Member II

Implementing scheduler job to check document due date

Hi,

I need to implement a scheduler which checks for the due date in the documents in Alfresco and send email when the due date is met. I have due date as a property set for the document. I don't know how to retrieve the properties of the document using java script. Can someone help me on this.

3 Replies
ranjeetsi
Established Member II

Re: Implementing scheduler job to check document due date

Hi Raji,

Please follow the below documentation link:

Scheduled Jobs | Alfresco Documentation 

The scheduled job needs to be applied to a set of nodes determined by a query and the job implementation to be in the form of Repository action.

Precisely the Steps:

a) Start off with a repository action class 
b)  Get the noderef which will contain a node that is part of a result from a query set up in a Spring bean .
c) Define the spring bean referring to the action class created in step (a)

d) Then you will need to write a cron job along with cron expression for when to run the scheduled job.

Hope this helps. Thanks!

Alfresco Content Services Certified Engineer (ACSCE)
rajiraji
Member II

Re: Implementing scheduler job to check document due date

Hi,

Thanks for the response.I have implemented the cron job to send a email

using JavaScript in alfresco.I need how to retrieve the document

properties details using JavaScript.

Thank you,

Best Regards,

Rajalakshmi.R

ranjeetsi
Established Member II

Re: Implementing scheduler job to check document due date

Hi Raji,

Might be the javascript api is not available for this case. It has limited number of apis and is a wrapper over the java api.

Check the below 

JavaScript API | Alfresco Documentation 

Check if there is api for getting the properties of a node.

But the Public Java api is available for the same. You can configure the bean in your context file and refer this NodeService.

NodeService | Alfresco Documentation 

On this page search for - 

  • Getting aspects, children, properties, associations

Please let me know if this helps.

You can write webscript for getting the document  details .

Alfresco Content Services Certified Engineer (ACSCE)