Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: 1.9
    • Fix versions: 2.0
    • Components: Workflow
    • Labels:
      None
    • Sprint:

      Description

      If the DocumentLoaderJob attempts to load content to a CANCELLED investigation that already has a document attached, it tries to version it, yielding:

      24 Oct 2017 10:00:00,215  INFO DocumentLoaderJob,scheduler_Worker-2:118 -  - Error /var/openvpms/import/in/1935678_Sassy_2017-10-23-214258.pdf
      Failed to validate the object using archetype act.patientInvestigationVersion.1.0. FailedToValidObjectAgainstArchetype
              node:status msg:Validation failed for assertion lookup.local
      
              at org.openvpms.component.business.service.archetype.ArchetypeService.validateObject(ArchetypeService.java:214)
              at org.openvpms.component.business.service.archetype.ArchetypeService.save(ArchetypeService.java:525)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:497)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
              at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
              at org.openvpms.component.business.service.security.OpenVPMSMethodSecurityInterceptor.invoke(OpenVPMSMethodSecurityInterceptor.java:50)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at com.sun.proxy.$Proxy19.save(Unknown Source)
              at org.openvpms.component.business.service.archetype.rule.ArchetypeRuleService$2.run(ArchetypeRuleService.java:136)
              at org.openvpms.component.business.service.archetype.rule.ArchetypeRuleService$5.doInTransaction(ArchetypeRuleService.java:201)
              at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
              at org.openvpms.component.business.service.archetype.rule.ArchetypeRuleService.execute(ArchetypeRuleService.java:196)
              at org.openvpms.component.business.service.archetype.rule.ArchetypeRuleService.save(ArchetypeRuleService.java:134)
              at org.openvpms.component.business.service.archetype.DelegatingArchetypeService.save(DelegatingArchetypeService.java:223)
              at org.openvpms.etl.tools.doc.AbstractLoader.addDocument(AbstractLoader.java:297)
              at org.openvpms.etl.tools.doc.AbstractLoader$1.doInTransactionWithoutResult(AbstractLoader.java:278)
              at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
              at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
              at org.openvpms.etl.tools.doc.AbstractLoader.addDocument(AbstractLoader.java:274)
              at org.openvpms.etl.tools.doc.AbstractLoader.loadWithDuplicateCheck(AbstractLoader.java:252)
              at org.openvpms.etl.tools.doc.AbstractLoader.load(AbstractLoader.java:189)
              at org.openvpms.etl.tools.doc.IdLoader.load(IdLoader.java:153)
              at org.openvpms.etl.tools.doc.AbstractLoader.loadNext(AbstractLoader.java:156)
              at org.openvpms.web.jobs.docload.DocumentLoaderJob.execute(DocumentLoaderJob.java:142)
              at org.openvpms.component.business.service.scheduler.JobRunner$1.call(JobRunner.java:131)
              at org.openvpms.component.business.service.scheduler.JobRunner$1.call(JobRunner.java:127)
              at org.openvpms.component.business.service.security.RunAs.run(RunAs.java:41)
              at org.openvpms.component.business.service.scheduler.JobRunner.execute(JobRunner.java:136)
              at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
      

      This is because act.patientInvestigationVersion does not have a CANCELLED option for the status node.
      If an act is CANCELLED, and loads to it should be rejected as errors.

        Attachments

          Activity

              People

              • Assignee:
                Tim Anderson
                Reporter:
                Tim Anderson
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h

                    Who's Looking?