Hi Jay,

My apologies for the late answer.


/execute operation:


With regards to the execute operation: I actively discourage users from using it. It's complicated to use and if I could, I would make sure it wasn't available to users.

(Actually, I'm considering removing  it from the documentation, because I feel strongly that users should not be able to use it. The main reason for it's existence is because it's necessary for the Remote API client instances).

If you're absolutely sure that you need to use the /execute operation, see the code here:
https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-remote/kie-services-client/src/main/java/org/kie/services/client/api/command/AbstractRemoteCommandObject.java#L361

However, what may be easier is to use the Remote java API (the client instances created by the RemoteRestRuntimeEngineFactory) and then use the KieSession.execute(Command cmd) method.

See this example:
http://docs.jboss.org/jbpm/v6.0.1/userguide/jBPMRemoteAPI.html#d0e10245

You could then just do something like this:
KieSession ksession = engine.getKieSession();
List<String> processIds = ksession.execute(new GetProcessIdsCommand());
If that worked, which unfortunately, it does not (yet). See below.


process id's:

Unfortunately, there's not currently a method that provides you with a list of process definition id's, which is what you want.

You write "I want to get the list of processes which are not even started.", but I assume you mean process definitions, right?

Unfortunately, I just tried to use the GetProcessIdsCommand with the Remote Java API client (as I suggest above), and it doesn't work because the List<String> instance can not be serialized by the existing code.

This is an easy fix, so I'm adding the code to do that right now. Unfortunately, if you're using the community 6.0.1.Final release, it doesn't help you very much. It will be available in the BPMS 6.0.1 and 6.1.x versions.


Marco


Jayaseelan Jesudass 16-04-14 19:03:
One more thing I tried the History instances rest api.  it is giving only the instances which are already started. I want to get the list of processes which are not even started. My requirement is different.


On Wed, Apr 16, 2014 at 12:00 PM, Jayaseelan Jesudass <jayaseelanjesudass@gmail.com> wrote:
Hi Marco,

              Really its a great document You did a great job in providing such a useful information. I am actually using this document for a few weeks now to learn many of the things. 

But the rest api call which  mentioned in section 17.2.6.1 I cant able to make it work. It says

[POST] /runtime/ {deploymentId} /execute 
But the document does not explains how to send the command in the POST request. So if there will be a example that will be great.