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

Assigning tasks in enduser UI does not work

    XMLWordPrintable

    Details

    • Target Version/s:
    • Verified Version/s:
    • Story Points:
      2
    • Sprint:
      IAM - UI 2019.15
    • Support Ticket IDs:

      Description

      Reported on IDM 6.5.0.1, also reproducible on 6.5.0.2.

      When workflow tasks are assigned to a group / role (candidateGroups managed/role/<role_id>),

      • a user who has the role logs in to enduser UI and is able to see the tasks under "Unassigned Tasks".
      • if the user clicks on "Assign", the task is not assigned.
      • REST GET of the workflow taskinstance shows assignee is still null.

      TEST CASE:
      ~~~~~~~~~
      1. IDM 6.5.0.1.

      2. Use the "sync-asynchronous" sample, which has a workflow:

      # nohup ./startup.sh -p samples/sync-asynchronous > logs/console.out 2>&1 &

       

       

      3. Create "async.admin" user as described in samples guide:

      # curl \
       --header "X-OpenIDM-Username: openidm-admin" \
       --header "X-OpenIDM-Password: openidm-admin" \
       --header "Content-Type: application/json" \
       --request POST \
       --data '{
       "userName": "async.admin",
       "givenName": "async",
       "sn" : "admin",
       "password" : "Passw0rd",
       "displayName" : "async admin",
       "mail" : "async.admin@example.com",
       "authzRoles": [
       {"_ref": "internal/role/openidm-admin"},
       {"_ref": "internal/role/openidm-authorized"}
       ],
       "_id" : "asyncadmin"
       }' \
       "http://localhost:8080/openidm/managed/user?_action=create"

       

      4. Create a managed (authorization) role "manager".

      5. Add the role to the user "async.admin".

      6. Get the role _id:

      # curl -u openidm-admin:openidm-admin "http://localhost:8076/openidm/managed/role?_queryFilter=name+eq+'manager'&_prettyPrint=true"
      {
       "result" : [ {
       "_id" : "289ac0ec-5fe6-4f8e-9f02-05df41e1b3a9",
      ...

       

      7. Modify the workflow to assign to candidateGroups instead of assigning directly to user:

      # mkdir tmp1
      # cd tmp1
      # jar xf ../workflow/managedUserApproval.bar
      # vi managedUserApproval.bpmn20.xml
      ...
       <userTask id="evaluateRequest" name="Evaluate request" activiti:candidateGroups="managed/role/289ac0ec-5fe6-4f8e-9f02-05df41e1b3a9" activiti:formKey="managedUserApprovalForm.js">
      ...
      # jar cf managedUserApproval.bar managedUserApproval.bpmn20.xml managedUserApprovalForm.js
      

       

      8. Replace the existing workflow with the new workflow:

      # rm ../workflow/managedUserApproval.bar
      # curl -u openidm-admin:openidm-admin "http://localhost:8076/openidm/workflow/processdefinition?_queryId=query-all-ids&_prettyPrint=true"
      {
       "result" : [ {
       "_id" : "managedUserApproval:1:5",
      ...
      # curl -u openidm-admin:openidm-admin "http://trio:8076/openidm/workflow/processdefinition/managedUserApproval:1:5?_prettyPrint=true" -X DELETE
      # cp managedUserApproval.bar ../workflow/

       

      9. Run the workflow:

      # curl -u openidm-admin:openidm-admin -X POST \
       "http://localhost:8076/openidm/recon?_action=recon&mapping=systemCsvfileAccounts_managedUser"

       

      10. Login to selfservice UI as "async.admin".

      • under Unassigned Tasks, two tasks are listed.
      • click on Assign, the task remains unassigned.
      • REST GET of taskinstance shows both tasks are unassigned (assignee null):
        # curl -u openidm-admin:openidm-admin "http://localhost:8076/openidm/workflow/taskinstance?_queryId=query-all-ids&_prettyPrint=true"
        ...
         "_id" : "39",
        ...
         "assignee" : null
         }, {
         "_id" : "40",
        ...
         "assignee" : null
        ...

       

      WORKAROUND:
      ~~~~~~~~~~~~
      Assign the tasks (action=claim) via REST:

      # curl -u async.admin:Passw0rd --request POST "http://localhost:8076/openidm/workflow/taskinstance/39?_action=claim&_prettyPrint=true" --data '{"userId":"async.admin"}' -H "Content-Type: application/json"
      {
       "Task action performed" : "claim"
      }

       

        Attachments

          Activity

            People

            Assignee:
            oliver.bradley Oliver Bradley
            Reporter:
            wei-yee.lum Wei-Yee Lum
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: