Question
Cognizant
GB
Last activity: 31 Jul 2020 12:18 EDT
Is it possible to schedule Listners?
Hi,
I have a requirement where I have two file types upload in a location. Now, 1st type of file should get processed at specific interval say (11 am - 3 pm) and 2nd type of file should get processed from (3 pm - 7 pm) interval immediately.
Is there any possibility of scheduling Listners as of agents. Please suggest any approaches how to achieve this scenario.
Thanks,
Vyas Raman Loka.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
CA
I need some clarification. Are those the intervals in which you want the files to be processed no matter when they are made available in the source folder or are those the intervals in which the files are made available in the source folder? Have you considered using asynchronous processing of files using an agent? Execute asynchronously (queue for Agent) option on Service File rule.
Updated: 31 Jul 2020 12:18 EDT
Cognizant
GB
The files are made available irrespective of the mentioned time interval.
Yes Praneeth. But the we are not sure how to implement it like where to configure the Queuing is it in the Listner rule or Service method rule?
Pegasystems Inc.
CA
Check out Execution mode drop down on Service File rule. Select queue for agent option and configure a service requestor processor. The queue entries will be processed by ProcessServiceQueue agent in Pega-IntSvcs ruleset. There will be an agent schedule instance created for every node where this agent runs. You need to change pattern for each node's agent schedule instance from Periodic to Recurring and set the time when the agent has to run on that particular node.
Pegasystems Inc.
CA
I just read your original post again. Can you differentiate between files of type 1 and 2 in your service activity? If yes, why don't you create two agents of your own with different recurring patterns and conditionally invoke one or the other agent using Queue-For-Agent method in your activity?
Updated: 31 Jul 2020 12:18 EDT
Cognizant
GB
Sorry it is not File Type we can differentiate them based on file names. So based on file names we can conditionally invoke the agents as per your latest suggestion right.
Pegasystems Inc.
CA
I don't think the file name will be available to the service activity. Can you configure two file listeners for the two types of files if you can differentiate between them based on their name?
Pegasystems Inc.
CA
On further inspection, the file name can be retrieved from the Log-Service-File page whose name can be configured on the file listener. So you can use this name and conditionally invoke agents as I mentioned earlier.
uhg
IN
Hi,
I Have seen the solution, but In my case I don't want the instance created for log-service-file before my scheduling.
Because based on that instance created I have some other activities like correspondence sending.
So After scheduling only the instance (Log-service-file) must be created based on the time given for scheduling the listener
So is there any other way to do it?