Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1153771

Summary: "RemoteRuntimeEngineFactory" API shipped with BPMS 6.0.3 does not have a method called "newRestBuilder()" as mentioned in the documentation
Product: [Retired] JBoss BPMS Platform 6 Reporter: Musharraf Hussain <mhussain>
Component: DocumentationAssignee: Vikram Goyal <vigoyal>
Status: CLOSED CURRENTRELEASE QA Contact: Ivo Bek <ibek>
Severity: urgent Docs Contact: Vikram Goyal <vigoyal>
Priority: high    
Version: 6.0.3CC: brms-docs, mbaluch
Target Milestone: CR2   
Target Release: One-off release   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Build Name: 22684, Development Guide-6.0-1 Build Date: 22-09-2014 06:22:50 Topic ID: 28370-705951 [Specified]
Last Closed: 2014-11-03 23:21:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
RemoteProcessProject-1.0.jar
none
RemoteStandaloneRestClient.zip none

Description Musharraf Hussain 2014-10-16 17:52:46 UTC
Title: The REST Remote Java RuntimeEngine Factory

Describe the issue:
- Our documentation says "RemoteRuntimeEngine engine = RemoteRuntimeEngineFactory.newRestBuilder()" , but even with the BPMS 6.0.3 source code, there is no such method called "newRestBuilder()" inside "RemoteRuntimeEngineFactory" [1] .  Here is the code from the officially shipped source code.
~~~
package org.kie.services.client.api;

import java.util.Collection;

import org.kie.services.client.api.command.RemoteRuntimeEngine;


public interface RemoteRuntimeEngineFactory {

    RemoteRuntimeEngine newRuntimeEngine();

    void addExtraJaxbClasses(Collection<Class<?>> extraJaxbClasses );
}
~~~

Hence, the code sample provided in that section should be updated to look something like this:
~~~
RemoteRestRuntimeEngineFactory remoteRestRuntimeEngineFactory = RemoteRestRuntimeEngineFactory.newBuilder()
					.addDeploymentId(deploymentId)
					.addUrl(url)
					.addUserName(userName)
					.addPassword(passWord)
					.addTimeout(timeOut)
					.build();
				
		RemoteRuntimeEngine remoteRuntimeEngine = remoteRestRuntimeEngineFactory.newRuntimeEngine();		
		KieSession ksession = remoteRuntimeEngine.getKieSession();
...
~~~

I have attached a simple running code (inside the project "RemoteStandaloneRestClient.zip") to demonstrate the same for reference. You can use the attached KJar "RemoteProcessProject-1.0.jar" to deploy it inside Business Central's maven repository to test it.

[1] https://github.com/droolsjbpm/droolsjbpm-integration/blob/6.0.x/kie-remote/kie-services-client/src/main/java/org/kie/services/client/api/RemoteRuntimeEngineFactory.java
Suggestions for improvement:
- Please check my issue description and validate it.

Additional information:
- NA

Comment 1 Musharraf Hussain 2014-10-16 17:53:18 UTC
Created attachment 947721 [details]
RemoteProcessProject-1.0.jar

Comment 2 Musharraf Hussain 2014-10-16 17:53:35 UTC
Created attachment 947722 [details]
RemoteStandaloneRestClient.zip

Comment 4 Vikram Goyal 2014-10-17 01:21:57 UTC
Thanks for filing this Musharraf. 

I have updated the docs with the new code here [1].

Moving this to ON_QA. As soon as it has been verified, I will stage it live.

[1] http://documentation-devel.engineering.redhat.com/site/documentation/en-US/Red_Hat_JBoss_BPM_Suite/6.0/html-single/Development_Guide/index.html#The_REST_Remote_Java_RuntimeEngine_Factory

Comment 6 Marek Baluch 2014-10-30 10:26:39 UTC
Verified using document referenced in comment #4