-
1. Re: Getting process definitions using REST API
lhwong May 6, 2015 1:14 AM (in response to lhwong)Hi,
Some details
I am using kie-wb-distribution-wars-6.2.0.Final-tomcat7. I manage to get task list http://localhost/kie-wb/rest/task/query.
And, when making call using the Java API and REST API, I am in the same sign in session.
--Nick W
-
2. Re: Getting process definitions using REST API
swiderski.maciej May 11, 2015 1:55 AM (in response to lhwong)kie-wb and that sample spring app are two independent applications. So they must either be configured to use same data source and then use deployment synchronizer (enabled by default in kie-wb) to move same deployments around. Otherwise they will have its own set of deployments independent of each other.
HTH
-
3. Re: Getting process definitions using REST API
lhwong May 11, 2015 2:37 AM (in response to swiderski.maciej)They are both configured to use same data source. Although I am unsure about deployment synchronizer. As far as I understand, no change has been made (enabled by default in kie-wb). Could you please give me a pointer on this?
By the way, the task list are synchronized among both of the applications. Both
//called from spring app
Collection<TaskSummary> tasks = runtimeDataService.getTasksAssignedAsPotentialOwner(userId, new QueryFilter(0, 100));
//called via Javascript
http://localhost:8080/kie-wb/rest/task/query?potentialOwner=krisv
return the same task list.
Regards
--Nick W
-
4. Re: Getting process definitions using REST API
hastingsr713 Sep 18, 2015 11:37 AM (in response to lhwong)There is a bug in the REST call, see: [JBPM-4578] /rest/deployment/processes broken - JBoss Issue Tracker . The problem is with the pagination. The workaround is to use :
http://localhost/kie-wb/rest/deployment/processes?p=0&s=100 .
BTW, Are you making raw rest calls or are you using the kie-remote api. I tried this:
private void getProcessDefinitions() {
KieBase kbase = ksession.getKieBase();
System.out.println( "Getting the processes." );
Collection<Process> processes = kbase.getProcesses();
int count = 1;
for ( Process p : processes ) {
System.out.println("\nprocess: " + count++ );
System.out.println( " process: " + p );
}
}
And got: java.lang.UnsupportedOperationException: The KieSession.getKieBase(..) method is not supported on the Remote Client instance.
Is there an way to generate the REST call via the API?