Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-7369

Deleting processDefinitions stops requests for workflow history which contain those definitions returning

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: OpenIDM 4.5.0
    • Fix Version/s: None
    • Component/s: Module - Workflow
    • Labels:
      None
    • Support Ticket IDs:

      Description

      The underlying problem seen occurs from this REST search (which is also used within the UI):

      GET http://localhost:8080/openidm/workflow/processinstance/history?_queryId=query-all-ids
      
      { 
      "code": 500, 
      "reason": "Internal Server Error", 
      "message": "no deployed process definition found with id 'requestLoginAnnouncement:1:2606'" 
      }
      

      Re-production is possible using samples/usecase/usecase1 and samples/usecase/usecase2 for ease. Start off by populating users via usecase1, start-up usecase2 and log in to the UI using 'user.1' and kick off the User Onboarding Process.

      1. Retrieve the processInstance list:

      GET http://localhost:8080/openidm/workflow/processinstance/history?_queryId=query-all-ids
      
      {
        "result": [
          {
            "_id": "15",
      *snip*
            "processDefinitionId": "newUserCreate:1:14",
      *snip*
          }
        ],
        "resultCount": 1,
        "pagedResultsCookie": null,
        "totalPagedResultsPolicy": "NONE",
        "totalPagedResults": -1,
        "remainingPagedResults": -1
      }
      

      2. Stop the running processInstance:

      DELETE http://localhost:8080/openidm/workflow/processinstance/15
      
      GET http://localhost:8080/openidm/workflow/processinstance/15
      
      {
        "_id": "15",
      *snip*
        "deleteReason": "Deleted by Openidm",
      *snip*
        "processDefinitionId": "newUserCreate:1:14",
      *snip*
      }
      

      3. Delete the processDefinitionId

      DELETE http://localhost:8080/openidm/workflow/processdefinition/newUserCreate:1:14
      

      4. Try and retrieve the processInstance list again

      GET http://localhost:8080/openidm/workflow/processinstance/history?_queryId=query-all-ids
      
      {
        "code": 500,
        "reason": "Internal Server Error",
        "message": "no deployed process definition found with id 'newUserCreate:1:14'"
      }
      

      As a workaround to fix this, it is possible to modify the ACT_HI_PROCINST table directly within the repo to remove the offending processInstance(s), e.g.

      mysql> DELETE FROM ACT_HI_PROCINST WHERE PROC_DEF_ID_ = "[Process Definition ID]";
      

        Attachments

          Activity

            People

            Assignee:
            cgdrake Chris Drake
            Reporter:
            tom.wood Tom Wood
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: