Stardust API's Deployment - Poll Data via Query API [message #1274467] |
Fri, 21 March 2014 14:06 |
|
Hello,
I would like to request some reference document or pointers to understand how to deploy Stardust Poll Data via Query API by creating and using a Jar or War file into the Stardust Project deployed on Tomcat Server. Extension of thread [1]
My current Status
I am able to Poll the Data via Query API, like the one given in example on the wiki [3], but the poll only works if my poll source code is in a Stardust full Project that is deployed on the Tomcat in my RAD not in a Jar or War that I can add to 'webapps' of a deployed project.
My question is to understand how to use Query API code by putting it in a Jar or War and using it in the Tomcat with a deployed Stardust Project.
Similar techniques: Data generation using SPI API's
I have been able to 'Successfully' use and deploy the BPMS SPI Monitoring API such as IProcessExecutionMonitor and others as explained by Jan in the thread [2].
I simply add the Jar to the project Your_Stardust_Project_Name\WEB-INF\lib and the Stardust Engine once deployed on my Tomcat 7 server starts generating data (in my case to a file) about activity and Process completion (as per my requirements).
I hope I was able to put forward my question in a clear manner.
I would be really grateful if you could kindly guide me though the steps that are needed to solve my question.
Thanks in advance!
Best Regards,
Kunal.
P.S.
[1] http://www.eclipse.org/forums/index.php/t/482625/
[2] http://www.eclipse.org/forums/index.php/t/551904/
[3] https://wiki.eclipse.org/Stardust/Knowledge_Base/Java_API/Process_Instance_Queries (The import files need to be updated in the Example as they are ag.carnot.workflow.* and not org.eclipse.stardust.*)
|
|
|
|
|
|
Re: Stardust API's Deployment - Poll Data via Query API [message #1277646 is a reply to message #1277127] |
Wed, 26 March 2014 09:16 |
|
Hi Jan,
Thanks for providing more insights to the Spring Remote Approach.
I have been successful in trying and using the Web Service API for a test project as I felt more comfortable with it due to it's similarity with Quote:org.eclipse.stardust.engine.api.query.* API's
Furthermore, I would kindly like to know your suggestion on my below query.
In my experiments I want to combine both Stardust Poll Data via Query API and the push data from SPI Monitoring API's to get some metrics.
Thus, as per you, which will be better option to achieve this combination, Web Service API or Spring Remote Approach?
Hope to hear from your soon and thanks one again for your time Jan and Stardust team.
Regards,
Kunal.
|
|
|
Re: Stardust API's Deployment - Poll Data via Query API [message #1277873 is a reply to message #1277646] |
Wed, 26 March 2014 15:26 |
|
Hi,
do I assume correctly that you first receive some event information via the Monitoring SPI and then you're looking to "enrich" this with further data from queries?
I'm asking, because I was wondering what you mean by "combine". I think you can only combine this information either if you use it directly when the monitor executes or you'd have to persist it somewhere, so you can use it later.
Jan
|
|
|
Re: Stardust API's Deployment - Poll Data via Query API [message #1277887 is a reply to message #1277873] |
Wed, 26 March 2014 15:50 |
|
Hi Jan,
Yes, you are correct.
I get an event info via Monitoring SPI and then I try to enrich my information by using Query API and polling data from the Audit Trail about other factors.
Thus, I will combine/enrich my information at run time ( may or may not display it to system admins)and will also make the data persistant in a File for further BI reporting.
Thanks,
Kunal.
|
|
|
Re: Stardust API's Deployment - Poll Data via Query API [message #1277927 is a reply to message #1277887] |
Wed, 26 March 2014 16:55 |
|
Hi Kunal,
so, personally, I find it easier to deal with the Java API (via Spring Remoting), because then the code is cleaner and you can concentrate on the logic without having to deal with WS-related stuff, e.g. handling soap faults or similar.
Of course, if you use a framework like CXF which also shields those details from you or you're just more comfortable with the WS API and it saves you time, just stick with that.
One thing that I'd like to mention is that "enrichment" is a typical EAI pattern for which I tend to use Apache Camel (which ships with Stardust). I'm not 100% sure if it makes sense in this case, but you could trigger a Camel route from your monitoring code which executes the steps you need to enrich and store the data.
If the information you need to retrieve in your queries consists of process and/or activity instances, then we provide a Camel DSL for Stardust, so that you don't even have to write a Query.
Example commands for Camel route (remember that Stardust is based on a product called "IPP", therefore the "ipp:" prefix):
<!-- authenticate -->
<to uri="ipp:authenticate:setCurrent?user=motu&password=XXXX"/>
<!-- find a process instance based on name and data -->
<to uri="ipp:process:find?processId=CreditApproval&dataFilters=Customer.Id::983432::long"/>
<!-- retrieve the entire process properties -->
<to uri="ipp:process:getProperties"/>
<!-- logout-->
<to uri="ipp:authenticate:removeCurrent/>
Just a thought ... As I said, this depends on how your enrichment looks. But putting it in a Camel route like that allows you swap out a step with a different implementation or add steps more easily.
The Camel Component per default uses Spring Remoting under the hood. In case you're interested to learn more see here:
http://help.eclipse.org/kepler/topic/org.eclipse.stardust.docs.camel/html/camel/camel-ipp-component.html
Best,
Jan
[Updated on: Wed, 26 March 2014 16:58] Report message to a moderator
|
|
|
Re: Stardust API's Deployment - Poll Data via Query API [message #1278363 is a reply to message #1277927] |
Thu, 27 March 2014 08:23 |
|
Hi Jan,
Thanks for your reply and all the insights.
I am sure it will be of great use to me and to others subscribed to this Forum.
I will try to make use of the camel route in near future, but I feel for now I can proceed with making use of the API to complete my test.
Thanks again for all your efforts. It's always a pleasure to talk to experts
Best Regards,
Kunal.
|
|
|
Powered by
FUDForum. Page generated in 0.04374 seconds