Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Stardust/Knowledge Base/API/JavaAPICookbook/FetchingPIandAIHistoricalEvents"

(Created page with "== Purpose<br> == This article describes how to fetch Organizations, Departments and Particpants in a Multi model environment which involves consumer-provider hierarchy. ==...")
 
(Purpose)
Line 1: Line 1:
 
== Purpose<br>  ==
 
== Purpose<br>  ==
  
This article describes how to fetch Organizations, Departments and Particpants in a Multi model environment which involves consumer-provider hierarchy.
+
This article describes how to fetch Process Instance and Activity Instance related Historical Events like Time, Type and Details..etc, based on the defined Historical Event Policy.
 
+
 
==== Solution<br>  ====
 
==== Solution<br>  ====
  

Revision as of 00:52, 11 April 2014

Purpose

This article describes how to fetch Process Instance and Activity Instance related Historical Events like Time, Type and Details..etc, based on the defined Historical Event Policy.

Solution

Approach 1:

// For each provider model of main model
for(long oid : mainModel.getProviderModels()){
	// Get the model
DeployedModel providerModel = queryService.getModel(oid);
// Get list of all organizations of provider model
      List<OrganizationDetails> orgDetails =      providerModel.getAllOrganizations();
 
       for(OrganizationDetails orgDetail : orgDetails) {
       		System.out.println("Name" + orgDetail.getName());
     	 }

Approach 2:

You can download sample FilterableAttributeImpl java source from here.

//Create Filterable query for Provider.
 
FilterableAttribute PROVIDER = new FilterableAttributeImpl(DeployedModelQuery.class, "provider");                  
DeployedModelQuery query = DeployedModelQuery.findAll();
query.where(PROVIDER.isEqual("ACTIVE"));
 
// Get all provider models
Models models = qs.getModels(query) ;
 
// For each model
for(DeployedModelDescription model : models) {
     List<OrganizationDetails> orgDetails =     model.getAllOrganizations();
       for(OrganizationDetails orgDetail : orgDetails) {
       		System.out.println("Name" + orgDetail.getName());
     	 }
}

Back to the top