Information Technology Reference
In-Depth Information
RuntimeEngine engine =
RemoteRestRuntimeEngineFactoryBuilderImpl.
newBuilder().addUrl(new URL("http://localhost:8080/
kie-wb")).
addDeploymentId("org.jbpm:HR:1.0").addUserName("mariano").
addPassword("mypass").build().newRuntimeEngine();
You can see that we are passing four elements to the
Re-
moteRestRuntimeEngineFactoryBuidlerImpl
class: a URL for the KIE
Workbench, a release ID for identifying a runtime manager, and a username and a pass-
word to log in to the application and pass credentials to what I will do on top of the cre-
ated
RuntimeEngine
.
Once the
RuntimeEngine
object is created, we can use it as any other
RuntimeEngine
we built in our local environment. Internally, it will create commands
for every method invoked in the KIE session and task service, serialize them into XML,
and send them through the execute URL.
You can find an example in the
remote-invocations
project, in the
Sig-
nalEventAppREST
class. You can run it directly from the
remote-invocations
path by typing the following command:
mvn -Prest