0
votes

I have succesfully integrated Keycloak into JBPM for user management and can login using keycloak into business central and case management. I have also successfully configured the kie-server using keycloak credentials and can deploy a stripped down version of the IT Orders sample application on the running sample-server kie-server. When I perform a GET/kie-server/services/rest/server/containers I can see my container itorders_1.0.0-SNAPSHOT is up and running in business central and also when I call GET /kie-server/services/rest/server/containers which gives the output below

{
  "type": "SUCCESS",
  "msg": "List of created containers",
  "result": {
    "kie-containers": {
      "kie-container": [
        {
          "container-id": "itorders_1.0.0-SNAPSHOT",
          "release-id": {
            "group-id": "itorders",
            "artifact-id": "itorders",
            "version": "1.0.0-SNAPSHOT"
          },
          "resolved-release-id": {
            "group-id": "itorders",
            "artifact-id": "itorders",
            "version": "1.0.0-SNAPSHOT"
          },
          "status": "STARTED",
          "scanner": {
            "status": "DISPOSED",
            "poll-interval": null
          },
          "config-items": [
            {
              "itemName": "KBase",
              "itemValue": "",
              "itemType": "BPM"
            },
            {
              "itemName": "KSession",
              "itemValue": "",
              "itemType": "BPM"
            },
            {
              "itemName": "MergeMode",
              "itemValue": "MERGE_COLLECTIONS",
              "itemType": "BPM"
            },
            {
              "itemName": "RuntimeStrategy",
              "itemValue": "PER_CASE",
              "itemType": "BPM"
            }
          ],
          "messages": [
            {
              "severity": "INFO",
              "timestamp": {
                "java.util.Date": 1598900747932
              },
              "content": [
                "Release id successfully updated for container itorders_1.0.0-SNAPSHOT"
              ]
            }
          ],
          "container-alias": "itorders"
        }
      ]
    }
  }
}

I can get the case definitions using GET /kie-server/services/rest/server/queries/cases

{
  "definitions": [
    {
      "name": "Order for IT hardware",
      "id": "itorders.orderhardware",
      "version": "1.0",
      "case-id-prefix": "IT",
      "container-id": "itorders_1.0.0-SNAPSHOT",
      "adhoc-fragments": [
        {
          "name": "Prepare hardware spec",
          "type": "HumanTaskNode"
        }
      ],
      "roles": {
        "owner": 1
      },
      "milestones": [],
      "stages": []
    }
  ]
}

I can then do a POST /kie-server/services/rest/server/containers/itorders_1.0.0-SNAPSHOT/cases/itorders.orderhardware/instances which correctly returns the Case ID of the case created e.g. IT-0000000014. The call returns http status code 201

However when I do a GET /kie-server/services/rest/server/queries/cases/instances there are no instances returned as per below

{
  "instances": []
}

When I create a case in the JBPM Case Management showcase I get the green prompt to show the case was successfully created however no open cases appear in the grid even if I refresh the screen.

I can see the process instance associated with the case in the process instances view including the diagram which shows that the "Prepare hardware spec" is active and the current activity. However viewing the tasks associated with the process does not show any tasks. Similarly the task inboxes of the user I am expecting to get claim the task is also empty.

Take note that I am using token based authentication with Keycloak and executed the above rest calls using Postman

Why can I not view the case instance I created? Why can I not view the tasks associated with the process instance?

1

1 Answers

0
votes

With this query GET /kie-server/services/rest/server/queries/cases/instances you can see only instances on which is your user setup as potential. Make sure that user used in token is setup as potential owner.