I am trying to run a stored procedure in WSO2 CEP with SQL Server 2016. Is this possible? I already looked through the documentation on this which is scarce. there is only one sample with connection to SQL Server.
Although, it looks like it is limited to selects, inserts and deletes.
I was not able to find any documentation on other driver functionality through CEP.
Also, I did find some information on other WSO2 Services, not wso2 CEP, which might allow me to run the stored procedures. If you have any information on that and who to plug CEP with those services It would help as well.
WSO2CEP is a real time analytics product which provides few SQL operations with RDBMS publisher to publish events as mentioned in the documentation [1].
Only work around would be modifying existing query defined output-event-adapters.xml file located in <CEP-Location>/repository/conf direcory. Inside the file locate <adapterConfig type="rdbms"> element and you will find properties of SQL operations such as update into like below.
<property key="updateTableRow">UPDATE $TABLE_NAME SET $COLUMN_VALUES WHERE $CONDITION</property>
You can change above like below to execute stored procedure
<property key="updateTableRow">EXEC $TABLE_NAME $COLUMN_VALUES</property>
Then in RDBMS publisher you need to change execution.mode as update.
[1] https://docs.wso2.com/display/CEP400/RDBMS+Event+Publisher
Related
I am trying to do intergadget communication between two gadgets, a date range picker and an batch record line trending.
The information I found is from other products from WSO2, not for DAS 3.1.0
Is it posible to do intergadget communication between a date range and a batch record line trending?
If so, does someone have an example working of this?
Its very important for our company to know this answers, because we are trying to use the WSO2 products, but we can't if we aren't able to show the historic data in the dashboard.
For this you need to add pub-sub connection between the gadgets.
You can get the information related to inter-gadget communication on below links.
https://medium.com/#megala.11/how-to-visualize-wso2-apim-statistics-in-das-c349b3fd83a
https://docs.wso2.com/display/DS200/Configuring+Gadgets+for+Inter-gadget+Communication
https://docs.wso2.com/display/DS200/Inter-gadget+Communication
I have configured API Manager 2.0.0 & API Manager Analytics Pack to use MySQL databases.
For each server, there exists a WSO2AM_STATS_DB. I have given these differing names on my MySQL server. I have also pointed my datasources in master-datasources.xml(for APIM) & stats-datasources.xml(for Analytics) to the relevant databases.
I couldn't find any relevant schema(dbscripts) for these databases in their respective packs.
On running, the Analytics database is populated but the APIM database isn't and throws an exception. The Analytics database not only gets the schema but also the invocation details of my API.
I am unable to get the stats on my dashboard though.
Previously, I (unwittingly) configured the h2-repository stats database to be the same for both servers (due to the folder structure) and was able to get all the statistics on my dashboard in the publisher.
Other configurations I have tried :
On the MySQL Server, pointed it to the same database (the Analytics one with the schema) but with no results on my dashboard (after waiting for a while).
Both datasources (WSO2AM_STATS_DB) in 2 servers should be pointed to the same database. There are no database scripts for this. Tables are created automatically.
By default in both servers, Stats DB path comes like this. (note ../ part)
<url>jdbc:h2:../tmpStatDB/WSO2AM_STATS_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000;AUTO_SERVER=TRUE</url>
So if you extract both servers to the same directory as mentioned in this doc, both datasources will be pointing to the same database (inside tmpStatDB) like this.
/parent_dir
|__wso2am-2.0.0/
|__wso2am-analytics-2.0.0/
|__tmpStatDB/
So, what happens here is, wso2am-analytics writes stats data to shared database, then apim reads it and shows data on its databases.
I'm performing WSO2 API manager + Analytics 2.0 POC now. When i change datasource from H2 to Oracle, in wso2am-2.0.1-SNAPSHOT, there are 2 data source config files:
master-datasources.xml & metrics-datasources.xml, according Installing and configuring the databases, there should be WSO2AM_DB, WSO2UM_DB and the WSO2REG_DB datasource configurations, but i just find WSO2_CARBON_DB & WSO2AM_DB, so my questions are
Is WSO2_CARBON_DB = WSO2UM_DB + WSO2REG_DB?
for WSO2_METRICS_DB, according Enabling Metrics and Storage Types, if we enable JDBC storage, can we store all components metrics information in one shared db or it needs one db per component(local)?
What's WSO2_MB_STORE_DB used for? from the scripts, it's for Message Store and Andes Context Store. Can we keep to use H2 in prod. cluster env.?
When i config wso2am-analytics-2.0.0-SNAPSHOT, i have below questions:
Can we share WSO2_CARBON_DB setting for both APIMGRT related components and analytics? or it's better to not share?
For WSO2AM_STATS_DB, is analytics resposible to aggregate and write to it, APIMGRT responsible to read? Which APIMGRT components need to read it?
For analytics related store, it supports RDBMS, Cassandra, HBase, but it does not support mongodb, right?
for GEO_LOCATION_DATA, What's this used for? Can we just use H2 in prod. env.?
APIM:
1) In default pack, yes. But in a production environment, it is recommended to separate them as WSO2_CARBON_DB, WSO2UM_DB and WSO2REG_DB (Please note you need WSO2_CARBON_DB too, to store local data. And this can be an h2 database)
2) You can have a shared DB
3) WSO2_MB_STORE_DB is required only if you use Advanced Throttling. Tables for this are created by APIM itself. So you don't need to run any scripts on it.
APIM Analytics:
1) You can share WSO2UM_DB and WSO2REG_DB. But don't share (local) WSO2_CARBON_DB.
2) Store and Publisher
3) See WSO2 DAS with MongoDB
4) GEO_LOCATION_DATA is used for Geolocation Based Statistics. H2 is not recommended.
I am working on the this Scheduled database polling with WSO2 Data Services Server blog on linux Ubuntu with WSO2 DSS 3.0.1 and ESB 4.7.
0
While i am inserting the values into student_registration table,
Nothing displaying in WSO2 ESB terminal side and WSO2 DSS terminal side.
Scheduling in not working, some one please help me to solve this.
Please share your DB content, you need to have an intial timestamp set in the timestamp table
If you inserted any baseline timestamp record into "timestamp table" ?
Ex.
insert into imestamp_table(ID, timestamp) values (1, SYSDATE());
I am writing some business flow using WSO2 Process Server. I want to start a process when there is any new entry in a specific table. i.e. we do DB Polling in oracle process.
So whenever there is a new entry in table, i need to fetch those data and start processing on those data using BPEL.
The above explained scenario can be achieved using task component of WSO2 ESB. Using task component we can schedule the call to a proxy service after certain interval and we can use that proxy to fetch the data from database.