Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-20100

APS process instance REST API does not return correct "suspended" value for a suspended process instance

    Details

    • Type: Service Pack Request
    • Status: Open (View Workflow)
    • Resolution: Unresolved
    • Affects Version/s: Alfresco Process Services 1.9.0.3, Alfresco Process Services 1.8.0.1
    • Component/s: APS REST API
    • Labels:
      None
    • Environment:
      APS v1.9.0.3 Windows and Linux
    • Bug Priority:
      Category 2
    • ACT Numbers:

      00976327

      Description

      Summary
      When using the APS REST API call
      GET /enterprise/process-instances/{processInstanceId}
      (see API Explorer: http://localhost:8080/activiti-app/api-explorer.html#!/process-instances/getProcessInstanceUsingGET) to retrieve a process instance by ID, the response returned for the "suspended" property is "false" for a suspended process instance.

      Steps to Reproduce:

      1. Use the following call to suspend an active process instance, e.g. by taking any active process instance ID from the Instances tab in activiti-admin:

      PUT /enterprise/process-instances/{processInstanceId}/suspend

      Request URL:

      http://localhost:8080/activiti-app/api/enterprise/process-instances/2505/suspend

      NOTE: The response contains the suspended proeprty set to true:

      { "id": "2505",
       "name": "Test Suspend - October 22nd 2018",
       "businessKey": null,
       "processDefinitionId": "TestSuspend:1:2504",
       "tenantId": "tenant_1",
       "started": "2018-10-22T17:27:44.906+0000",
       "ended": null,
       "startedBy": { 
          "id": 1,
          "firstName": null,
          "lastName": "Administrator",
          "email": "admin@app.activiti.com" 
       },
       "processDefinitionName": "Test Suspend",
       "processDefinitionDescription": null,
       "processDefinitionKey": "TestSuspend",
       "processDefinitionCategory": "http://www.activiti.org/processdef",
       "processDefinitionVersion": 1,
       "processDefinitionDeploymentId": "2501",
       "graphicalNotationDefined": true,
       "startFormDefined": false,
       "suspended": true,
       "variables": []
       }

       2. Use the following call to retrieve the suspended process instance:

      GET /enterprise/process-instances/{processInstanceId}

      Request URL:

      http://localhost:8080/activiti-app/api/enterprise/process-instances/2505

      3. Inspect the response

      Expected Behavior:
      After an active process instance has been suspended the GET call to retrieve the process instance should show that it has been suspended, i.e. "suspended": true.

      Observed Behavior:
      After an active process instance has been suspended, when retrieving the process instance using a GET call, the process is showing "suspended":  false. See exemplary response in step 3:

      { "id": "2505",
       "name": "Test Suspend - October 22nd 2018",
       "businessKey": null,
       "processDefinitionId": "TestSuspend:1:2504",
       "tenantId": "tenant_1",
       "started": "2018-10-22T17:27:44.906+0000",
       "ended": null,
       "startedBy": {
          "id": 1,
          "firstName": null,
          "lastName": "Administrator",
          "email": "admin@app.activiti.com"
       },
       "processDefinitionName": "Test Suspend",
       "processDefinitionDescription": null,
       "processDefinitionKey": "TestSuspend",
       "processDefinitionCategory": "http://www.activiti.org/processdef",
       "processDefinitionVersion": 1,
       "processDefinitionDeploymentId": "2501",
       "graphicalNotationDefined": true,
       "startFormDefined": false,
       "suspended": false,
       "variables": [
         { 
            "name": "initiator",
            "type": "string",
            "value": "1"
         }
        ]
       }

        Attachments

          Structure

            Activity

              People

              • Assignee:
                djohnson Doug Johnson
                Reporter:
                kwatson Kimberly Watson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Structure Helper Panel