Bug 1092588

Summary: DEPLOYING and UNDEPLOYING statuses are in opposite for REST API deployment unit operations
Product: [Retired] JBoss BPMS Platform 6 Reporter: Ivo Bek <ibek>
Component: Business CentralAssignee: Shelly McGowan <smcgowan>
Status: CLOSED EOL QA Contact: Ivo Bek <ibek>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.2CC: ibek, kverlaen
Target Milestone: DR2   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:47:56 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:

Description Ivo Bek 2014-04-29 14:05:10 UTC
Description of problem:

When I do deploy or undeploy REST API operations for a deployment unit, the get request returns wrong information. Usually I get DEPLOYING status for undeploy operation and UNDEPLOYING status for deploy operation. See the output below:

*******************
create start
[2014-04-29 15:56:47,110] INFO - Response entity: [{"deployment-job-result":["org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentJobResult",{"operation":"DEPLOY" >> HERE I HAVE DEPLOY OPERATION RESPONSE <<,"deploymentUnit":["org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentUnit",{"groupId":"org.jboss","artifactId":"remote-file-deployment","version":"1.0-SNAPSHOT","strategy":"PER_PROCESS_INSTANCE","status":"DEPLOYING"}],"success":true,"explanation":"Deployment (deploy) job submitted successfully."}]}]
[2014-04-29 15:56:47,130] INFO - Response entity: [{"deployment-unit":["org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentUnit",{"groupId":"org.jboss","artifactId":"remote-file-deployment","version":"1.0-SNAPSHOT","status":"UNDEPLOYING" >> FOR THE GET RESPONSE HERE I GET UNDEPLOYING STATUS <<}]}]
create end
[2014-04-29 15:56:47,147] INFO - Response entity: [{"deployment-unit":["org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentUnit",{"groupId":"org.jboss","artifactId":"remote-file-deployment","version":"1.0-SNAPSHOT","status":"UNDEPLOYING"  >> FOR THE GET RESPONSE HERE I GET UNDEPLOYING STATUS <<}]}]
******************************

and here is another try
******************************
[2014-04-29 15:49:47,619] INFO - Response entity: [{"deployment-job-result":["org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentJobResult",{"operation":"UNDEPLOY" >> HERE I HAVE UNDEPLOY OPERATION RESPONSE << ,"deploymentUnit":["org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentUnit",{"groupId":"org.jboss","artifactId":"remote-file-deployment","version":"1.0-SNAPSHOT","strategy":"PER_REQUEST","status":"UNDEPLOYING"}],"success":true,"explanation":"Deployment (undeploy) job submitted successfully."}]}]
[2014-04-29 15:49:47,633] INFO - Response entity: [{"deployment-unit":["org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentUnit",{"groupId":"org.jboss","artifactId":"remote-file-deployment","version":"1.0-SNAPSHOT","status":"DEPLOYING" >> SEE THE GET RESPONSE HERE I GET DEPLOYING THOUGH I REQUESTED TO UNDEPLOY THE DEPLOYMENT UNIT << }]}]
*******************************

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Marco Rietveld 2014-04-30 14:13:23 UTC
Could you add a test that reproduces this problem? Thanks!

Comment 5 Ivo Bek 2014-05-02 07:48:38 UTC
I just realized that there might be a problem with BZ 1050894 if you work with the last changes.

Comment 6 Marco Rietveld 2014-07-17 10:50:11 UTC
Fixed with this commit: 

https://github.com/droolsjbpm/droolsjbpm-integration/commit/1509b17022b4141e303dd7eef396d8ebcdb27184

(Among other changes, here: https://github.com/droolsjbpm/droolsjbpm-integration/commit/1509b17022b4141e303dd7eef396d8ebcdb27184#diff-e7fb6939eaedec362d0e943f20d7b449R48 )

However, the deployment operations were somewhat refactored, so there are a couple of other changes that helped fix this as well.

Comment 7 Ivo Bek 2014-09-09 13:41:45 UTC
Verified in BPMS 6.1.0.DR2

The current behavior is following:

ACCEPTED -> UNDEPLOYING -> UNDEPLOYED
ACCEPTED -> DEPLOYING -> DEPLOYED

Comment 8 Ivo Bek 2014-09-09 14:34:45 UTC
Additionally, I filed BZ 1139745 -  After undeployment of a deployment unit which was previously deployed via REST API, status of the deployment unit remains DEPLOYED instead of NONEXISTENT.