Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Process Manager (Stardust) » Stardust API's Deployment - Poll Data via Query API(Technique to use the Stardust API's to get activity and Process data from Stardust)
Stardust API's Deployment - Poll Data via Query API [message #1274467] Fri, 21 March 2014 14:06 Go to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

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 #1276295 is a reply to message #1274467] Mon, 24 March 2014 10:59 Go to previous messageGo to next message
Vikash Pandey is currently offline Vikash PandeyFriend
Messages: 12
Registered: October 2011
Junior Member
Kunal,
If I understood your requirement correctly, you are writing the code and export it as jar/war and want it to run against deployed Stardust instance. In that case, the jar/war/code that you want to execute has to be triggered somehow to connect to running Stardust instance and fire queries against it.


if you want to use the jar/war as client you can achieve it by deploying it (standalone) and making it talk to running instance of Stardust via web services API calls or calling the services over Spring remoting.

Web Services explained - https://wiki.eclipse.org/Stardust/Knowledge_Base/Web_Service_API/Web_Service_Client_API_Tool

Spring remoting explained - https://wiki.eclipse.org/Stardust/KnowledgeBase/Testing/Standalone-Spring


Regards
Vikash
Re: Stardust API's Deployment - Poll Data via Query API [message #1276346 is a reply to message #1276295] Mon, 24 March 2014 12:42 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

Hi Vikash,

Thanks once again for your reply and help! I will try to use the pointers you have provided to solve this problem.

Kind Regards,
Kunal.

Re: Stardust API's Deployment - Poll Data via Query API [message #1277127 is a reply to message #1276346] Tue, 25 March 2014 14:37 Go to previous messageGo to next message
Jan Hendrik Scheufen is currently offline Jan Hendrik ScheufenFriend
Messages: 77
Registered: October 2011
Member

Hi Kunal,

some more helpful information regarding the Spring Remoting approach can be found in the product documentation. It explains the basic concepts and files involved.

http://help.eclipse.org/kepler/topic/org.eclipse.stardust.docs.spring/html/runtimesetup.html

Please see the sections "Configuring the Stardust clients" and "Spring Remoting and Stardust". You will not need all these files and settings exactly, but it should help making sense of the example test project found on the Wiki.

Regards,

Jan

Re: Stardust API's Deployment - Poll Data via Query API [message #1277646 is a reply to message #1277127] Wed, 26 March 2014 09:16 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

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 Go to previous messageGo to next message
Jan Hendrik Scheufen is currently offline Jan Hendrik ScheufenFriend
Messages: 77
Registered: October 2011
Member

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 Go to previous messageGo to next message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

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 Go to previous messageGo to next message
Jan Hendrik Scheufen is currently offline Jan Hendrik ScheufenFriend
Messages: 77
Registered: October 2011
Member

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&amp;password=XXXX"/>
<!-- find a process instance based on name and data -->
<to uri="ipp:process:find?processId=CreditApproval&amp;dataFilters=Customer.Id::983432::long"/>
<!-- retrieve the entire process properties -->
<to uri="ipp:process:getProperties"/>
<!-- logout-->
<to uri="ipp:authenticate:removeCurrent/>

Just a thought ... Wink 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 Go to previous message
Kunal Suri is currently offline Kunal SuriFriend
Messages: 82
Registered: April 2013
Location: Paris Saclay, France
Member

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 Smile

Best Regards,
Kunal.
Previous Topic:Integrate XML File
Next Topic:Failed when call SOAP web services to save OUT data values
Goto Forum:
  


Current Time: Thu Mar 28 15:49:00 GMT 2024

Powered by FUDForum. Page generated in 0.03924 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top