Bug 1073687 - Deployment of Kjar over REST: Strategy parameter ignored
Summary: Deployment of Kjar over REST: Strategy parameter ignored
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Mauricio Salatino
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-06 23:48 UTC by Bernard Tison
Modified: 2014-11-12 14:10 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-03-07 12:27:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Bernard Tison 2014-03-06 23:48:45 UTC
Description of problem: when deploying a kjar over REST the 'strategy' parameter is ignored, and the default value 'SINGLETON' is used, even if e.g. 'PER_PROCESS_INSTANCE' is specified as request parameter.

This seems to be a regression from 6.0.1.ER1 to 6.0.1.ER2


Version-Release number of selected component (if applicable): 6.0.1.ER2


How reproducible: Consistently


Steps to Reproduce:
Against a running instance of BPMS 6.0.1.ER2, issue the following commands:
curl -X POST -HAccept:application/json --user admin1:admin -d "strategy=PER_PROCESS_INSTANCE" http://127.0.0.1:8080/business-central/rest/deployment/org.jboss.btison.bpms.testbed.datamodel-version:kjar:0.0.1/deploy

curl -X GET -HAccept:application/json --user admin1:admin http://127.0.0.1:8080/business-central/rest/deployment/org.jboss.btison.bpms.testbed.datamodel-version:kjar:0.0.1 

(replace admin/admin1 and the deployment id with appropriate values)

Actual results:

{
    "groupId": "org.jboss.btison.bpms.testbed.datamodel-version",
    "artifactId": "kjar",
    "version": "0.0.1",
    "kbaseName": null,
    "ksessionName": null,
    "strategy": "SINGLETON",
    "identifier": "org.jboss.btison.bpms.testbed.datamodel-version:kjar:0.0.1",
    "status": "DEPLOYED"
}

Expected results:
{
    "groupId": "org.jboss.btison.bpms.testbed.datamodel-version",
    "artifactId": "kjar",
    "version": "0.0.1",
    "kbaseName": "",
    "ksessionName": "",
    "strategy": "PER_PROCESS_INSTANCE",
    "identifier": "org.jboss.btison.bpms.testbed.datamodel-version:kjar:0.0.1",
    "status": "DEPLOYED"
}

Additional info:

Comment 2 Ivo Bek 2014-03-07 10:18:47 UTC
Hi Bernard,

I believe you should set the strategy as a parameter in the url like:

http://127.0.0.1:8080/business-central/rest/deployment/org.jboss.btison.bpms.testbed.datamodel-version:kjar:0.0.1/deploy?strategy=PER_PROCESS_INSTANCE

that's why your strategy wasn't used

Comment 3 Bernard Tison 2014-03-07 11:41:07 UTC
Hi Ivo,

As you point out, specifying the strategy as a query parameter works. However this is a change compared to BPMS 6.0.0.GA, so I wanted to make sure this is as intended.

Also, you could argue that in a REST API query parameters should be used for GET requests only, and that POST should use form data. I know this is not mandated by spec, but seems to be viewed as a common practice. 

I checked the documentation in 
https://hudson.jboss.org/hudson/job/droolsjbpm-knowledge/lastSuccessfulBuild/artifact/kie-docs/jbpm-docs/target/docbook/publish/en-US/html/jBPMRemoteAPI.html, which correctly describes the current behaviour. So I guess we can close this bug.

Thx

Bernard

Comment 4 Marek Baluch 2014-03-07 12:27:37 UTC
Closing as NOT A BUG based on Bernard's comment above.


Note You need to log in before you can comment on or make changes to this bug.