There are three actions available for caching related.
- record cache, remove cache, retrieve cache
They are useful actions to provide better performance in WM forms. :D
I have two questions regarding "Scope" of the cache. :huh:
There are two Scope are available in the actions.
- application
- session
Question 1)
Can I access to either application or session scope cache from different WebMaker project?
For instance, I have WM project A and B. I record application scope cache in the project A, and want to retrieve the application cache in the project B.
I tried that on my dashboard, but project B could not access to the application scope cache in project B.
Question 2)
I would like to make the cache being refreshed regularly. like every 2 hours, or every days. Since some of data can be changed daily basis. How can I make a cache being reload to get new data?
Thank you,
Taeho.BPM
- record cache, remove cache, retrieve cache
They are useful actions to provide better performance in WM forms. :D
I have two questions regarding "Scope" of the cache. :huh:
There are two Scope are available in the actions.
- application
- session
Question 1)
Can I access to either application or session scope cache from different WebMaker project?
For instance, I have WM project A and B. I record application scope cache in the project A, and want to retrieve the application cache in the project B.
I tried that on my dashboard, but project B could not access to the application scope cache in project B.
Question 2)
I would like to make the cache being refreshed regularly. like every 2 hours, or every days. Since some of data can be changed daily basis. How can I make a cache being reload to get new data?
Thank you,
Taeho.BPM
RE: How to access cache from different projects
I still cannot make it work in BizFlow webmaker server.
Steps
1. Project A records caches (both application scope and session scope)
2. Project B retrieve the caches.
3. Publish the projects to BizFlow webmaker server.
When published, the projects go to
webapps\bizflowwebmaker\projecta
webapps\bizflowwebmaker\projectb
It seems to me that WM forms in bizflowwebmaker server cannot access to cache beyond its project scope. because each project is using different morphyc file.
Could you advise me how to access to caches from different projects in BizFlow webmaker server?
I attached samples.
Thanks,
Taeho
RE: How to access cache from different projects
You can publish multiple projects to the same webapp. So, in your case, projecta and projectb can both be published to webapp1 for example. You can locate this capability within the Publication tab to include both projects for publication to the same target environment. Click on Projects Included in this Environment and make sure you include both projects.
If you do this then they will share the same instance of the platform and can share the cache. This was the point I was trying to highlight in my original point 1. Basically, you can work on different parts (projects) of a webapp during design and then combine these to form the overall webapp. By default, each project is mapped to a corresponding webapp but, it's important to distinguish that the projects during design become webapps at runtime and multiple projects can be combined to form the same webapp.
If for some reason you have to publish your projects to separate webapps then they will run under separate platform instances and cannot share the cache. In this case you can create a new rule (either within an exisitng controller or a separate controller) in webapp1 that reads the cache and returns the details. Then send a web service request to webapp1 from webapp2 to obtain the results of the cache. If you have to follow this route then I can help further with publication and use of controllers as web services.
I hope that makes sense, but please let me know if you need more help.
Regards
Abdul
RE: How to access cache from different projects
Further questions.
1) Option 1 -> Does developer have to make sure all object names are different across the projects which will be published together within a web application?
2) Option 2 -> I think most likely I need option 2. Controller as web services.
Controllers in different project communicate each other can make codes re-usable. Is there any examples for the use-case?
Thanks,
Taeho.BPM
RE: How to access cache from different projects
1. Yes, the developer needs to ensure there are no name clashes, especially for actions because these are mapped to various controllers.
2. All controllers with actions originating from pages on your app map can be invoked as web services using GET or POST. For example, if you have a page action getCachedItems calling a CachedItems controller that performs a Retrieve Cache action in your rules, then you can use something similar to the following to invoke the controller from a client application:
http://your_server_location/bizflowwebmaker/yourapp/getCachedItems.do?paramA=abc¶mB=xyz...
The params will be structured in the header section of your incoming controller message, which you can view using the standard Test Dashboard capabilities.
In order to invoke such controller actions from a controller in a separate WebMaker project, you can use REST or SOAP. You can use the following links as a starting point:
http://www.hyfinity.com/node/66
http://www.hyfinity.com/node/63
If you want to use the SOAP method then it's best to create a simple WSDL to describe the controller. This will then simplify the construction of the call because WebMaker will generate the necessary server rules and binding documents required to invoke the remote controller.
Regards
Abdul