Question
· Aug 30

Changing a Setting value on a schedule?

I can START and STOP a business process via its Schedule setting.

Is it possible to change the value of another Setting in an analogous way?

I can imagine a SettingSchedule that could look like 

action:YYYY-MM-DDThh:mm:ss[,action:YYYY-MM-DDThh:mm:ss]

But rather than just START or STOP, action could be "SET Setting = value", overriding whatever the normal value is.

Is there an existing way of achieving this kind of functionality?

I've got a business process that triggers from a scheduled task, and sends documents to a downstream system according to business requirements. At certain times of the day there will be more documents in the queue than the downstream system can cope with - I'd like to say:

  • between time XXXX and time YYYY never send more than NN documents at a time, even if there are more in the queue
  • at other times send as many as are in the queue.

Then the code in the business process would pick up the (current value at the point of execution, according to the schedule) and send that many documents.

(We are currently planning on achieving this by adding another Property to the scheduled task, and adding that to the trigger message, but wondered whether there was another way of doing it.)

Product version: Caché 2018.1
$ZV: Cache for Windows (x86-64) 2018.1 (Build 184U) Wed Sep 19 2018 09:09:22 EDT
Discussion (4)2
Log in or sign up to continue

Business Operation is one generated by SOAP Wizard. It is being fed by a custom Business Process that runs in response to a scheduled task - the BP queries a database table and extracts a set of documents to send. At certain points in the day we want to query the table like this:

      SELECT * from TABLE

while at other points in the day we want to query the table like this:

      SELECT TOP NN * from TABLE

Then the documents selected by the query are sent, in turn, to the Business Operation for onward transmission.

Probably you can have your document limit listed in a lookup table to begin with, lets say Limit = 100 to begin with.

Then within your business process, add an if-else section, where the test condition is to evaluate current time against the XXXX and YYYY times you have in mind. If the current time is within your XXXX and YYYY, plus the limit is > 0 from the lookup table, you send the document and decrease the lookup table value by 1. 

On the else condition, you just send the document without checking the limit value from the table, but update the lookup table again to your limit (100).

The key here is accessing and updating the lookup table value from within your business process.

Hope this makes sense.