ale93p
ale93p

Reputation: 524

How can I handle parameters received from REST request in JBoss BPM Suite?

I'm trying to integrate Jboss Fuse with Jboss BPM Suite, I'm able to run a Business Process via REST request in a Fuse camel route.

I would like to sent parameters from Fuse like /start?var=value, but i don't know how to retrieve it in JBoss BPM and how to handle it.

For example I would like to send an int value to the BPM, in there I would like to set a rule and choose what to do according to this value. I can call the REST request from Fuse but I can't understand how to retrieve this value in the bpm suite.

Upvotes: 0

Views: 808

Answers (2)

Manu Singh
Manu Singh

Reputation: 34

JBPM documentation says the following about passing request parameter and receiving it in BPM process

If you pass the query parameter map_kEy=vAlue in a REST call, then the Map that's passed to the actual underlying KieSession or TaskService operation will contain this (String, String) key value pair: "kEy" => "vAlue".You could pass this parameter like so:

http://localhost:8080/kie-wb/rest/runtime/myproject/process/wonka.factory.loompa.hire/start?map_kEy=vAlue

Map query parameters also use the object query parameter syntax described below, so the following query parameter, map_total=5000 will be translated into a key-value pair in a map where the key is the String "total" and the value is a Long with the value of 5000. For example:

http://localhost:8080/kie-wb/rest/runtime/myproject/process/wonka.factory.oompa.chocolate/start?map_total=5000

Upvotes: 2

Tex
Tex

Reputation: 305

Maybe you can use a CustomWorkItemHandler, in order to execute java code in a library and manipulate it directly.

http://docs.jboss.org/jbpm/v6.0/userguide/jBPMDomainSpecificProcesses.html

Upvotes: 0

Related Questions