cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
693
Views
0
Helpful
10
Replies

How to store and refresh cache in CPO 2.3?

                   We have some dozen workflows (CPO 2.3 processes) each triggered to start by a unique tidal event. Each workflow when triggered fetches numeric data (just two or three two-digit data such as 15, 300) from a singluar web service  end point and uses the same in its workflow logic. Data fetched by each workflow is usually specific to that workflow. We want the workflow to cache locally the data thus fetched. Reason for caching data locally in CPO: The rate of web service lookups is 100+ lookups per second and the web service cannot scale beyond 100 lookups per second. The data thus cached will be local to that workflow.

QUESTIONS PLEASE:

1. What is the best way to store the fetched data? Is it using local variables or global variables or some other storage mechanism?

2. Should the data thus cached be fetched each time the process (workflow) is re-started?

3. When the data is changed at the web service, the web service can send fresh data back to CPO to refresh the previously cached data. What is the best way to receive this data in order to refresh the local cache in CPO while the worklfow is running and operational [(i.e) without disrupting the workflow's running state]?

Will appreciate detailed answers please to avoid follow up questions.

thanks in advance,

Jamal

1 Accepted Solution

Accepted Solutions

Von Jones
Enthusiast
Enthusiast

if the data is truly local to the workflow, use a process definition scoped variable.

But your options are process definition scoped variables, global variables, or service targets.  Definition scoped and global variables are almost the same thing, varying by what other workflows can see and set the data.

View solution in original post

10 Replies 10

Von Jones
Enthusiast
Enthusiast

if the data is truly local to the workflow, use a process definition scoped variable.

But your options are process definition scoped variables, global variables, or service targets.  Definition scoped and global variables are almost the same thing, varying by what other workflows can see and set the data.

Von,

Thanks for the response to my first question. Will appreciate response to other questions please.

2. Should the data thus cached be fetched each time the process (workflow) is re-started?

3. When the data is changed at the web service, the web service can send fresh data back to CPO to refresh the previously cached data. What is the best way to receive this data in order to refresh the local cache in CPO while the worklfow is running and operational [(i.e) without disrupting the workflow's running state]?

4. Can the web service update the values contained in process scoped variables or global variables using CPO WS-API?

thanks,

Jamal

if you want to update the value from outside of the primary process asynchronously, external to the running process, then you need to store the data in a variable which can be accessed outside the running process.  A global variable would be a better choice for that.  This could also be achieved using a service target, but a global variable would be  easier.

You can have your web service call the PO northbound web service to invoke a secondary PO process and pass in the data as a parameter.  Then have the process set the value into the global variable.

If your data is specific to the process instance, you may want to use a table global variable, with one column which is the ID of the process instance or some other unique data to identify what is being cached, and another which is the value to cache.  Be sure to have some logic to delete the row when a process instance goes away.

Thanks Von for attempting to answer my questions patiently. I did figure exactly what you said above through my own experiementation....however, given the enormity of my problem, I am discouraged from taking this approach. Let me elaborate the enormity of my problem:

- The web service DB contains 50,000 devices. For each device, the DB contains a numeric data for Utilization Threshold parameter.

- Let's assume that I have ONE PO process only for the purpose of this discussion. Each time this process is triggered to RUN, it goes to the web service to pick up the numeric data for a given device and store this info in tidal using a global table variable (DeviceIPaddress, UtilizationThresholdData). Idea behind building this global table of data in tidal is to reduce the number of web service lookups in the future runs of the PO process.

QUESTIONS:

1) Can the PO process create a global table variable containing say 20,000 entries? If not, what's the max limit?

2) Assuming the PO process can build a global table variable containing 20,000 entries, will a lookup for ThresholdData given a DeviceIPAddress be VERY SLOW making the PO process inefficient?

- Let's say at time Tn, the number of entries in the global table variable is 20,000.

- Let's say at time Tn+1, the ThresholdData for 8000 (of the 20,000) devices got changed in the web service DB.

QUESTIONS:

3) Can the web service send ThresholdData for 8000 devices using a table variable of type INPUT? I did not see a table variable for type INPUT supported by a PO process and hence this question.

4) Assuming table variable of type INPUT is not supported, how can the web service send update for 8000 devices in a single shot?

Will appreciate answers to all the questions please.

thanks,

Jamal