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

Store entity task throws “Activiti user id is missing, cannot get repo credentials.” error when executed.

    Details

    • ACT Numbers:

      00984550

      Description

      Description: 

      I am getting an error when trying to run the attached app (complaintV2). The app uses a data model for a folder.
      It uses this data model to create a folder using Store Entity task in ACS. Once the folder is created, a user task is executed to update the values of the folder entity created in the process. Another Store Entity task is called to update the values of the data model. 

      However, the update of the data model is throwing the below error: 

      org.activiti.engine.ActivitiException: Activiti user id is missing, cannot get repo credentials. 
      at com.activiti.service.runtime.AlfrescoRepositoryDataModelService.getSession(AlfrescoRepositoryDataModelService.java:520) 
      

      Steps to reproduce the issue: 

      1. Import the attached app (complaintV2)
      2. Adjust the contained Alfresco data model to use an ACS repository configured in your environment.
      3. Publish the app
      4. Start the process and fill in the mandatory fields (Policy Number field will be the name for the new folder)
      5. Select a location where the new folder is created (make sure that the type for the folder you select as destination is cf:folder - I attached the Custom Model I used)
      6. Go to the next step by clicking on Submit
      7. Verify that the new folder was created in ACS
      8. Clicking next on Review by User1, the user task is executed to update the values of the folder entity created in the process
      9. Selecting Review or Reject is leading to the error mentioned in the subject and the folder metadata is not updated (if any field was modified at step 8)

       Current behaviour:

      When executing the second Store Entity (the one that modifies the folder created during the process), the updates are not applied and the error is thrown:

       05:11:57 [pool-2-thread-2] ERROR org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable  - Job 40392 failed
      org.activiti.engine.ActivitiException: Activiti user id is missing, cannot get repo credentials.
      at com.activiti.service.runtime.AlfrescoRepositoryDataModelService.getSession(AlfrescoRepositoryDataModelService.java:520)
      at com.activiti.service.runtime.AlfrescoRepositoryDataModelService.getMappedValue(AlfrescoRepositoryDataModelService.java:123)
      at com.activiti.service.runtime.AlfrescoRuntimeDataModelService.handleStoreEntityDefinitionForVariable(AlfrescoRuntimeDataModelService.java:170)
      at com.activiti.variable.VariableDataEntityType.getValue(VariableDataEntityType.java:137)
      at org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.getValue(VariableInstanceEntity.java:191)
      at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.getVariable(VariableScopeImpl.java:236)
      at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.getVariable(VariableScopeImpl.java:213)
      at com.activiti.runtime.activiti.bean.datamodel.attribute.SimpleVariableLoader.load(SimpleVariableLoader.java:24)
      ...
      at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
      at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
      at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.executeJob(ExecuteAsyncRunnable.java:95)
      at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:50)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      

       

      Expected behaviour:
      Running the attached app, ComplaintFolder (which is almost identical) with the faulty one, the issue is not reproduced.
      After completing the process, the values defined when the folder metadata was updated are applied
      The same result is expected from ComplaintV2 app as well.

      Supporting evidence:
      The issue was reproduced with APS release 1.9.0.3.
      There is another Jira raised for a similar behaviour: https://issues.alfresco.com/jira/browse/ACTIVITI-1148

        Attachments

          Structure

            Activity

              People

              • Assignee:
                dgruber Doug Gruber
                Reporter:
                apetrache Alin Petrache
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Structure Helper Panel