Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3739

Retrieving a ProgramWorkflow by name in a the ModuleActivator started method throws an error

    XMLWordPrintable

Details

    Description

      Not completely sure how to reproduce this in a unit test, but if you put this line in the started method of ModuleActivator, you get a LazyInitializationError like in the attached stack trace.

      ProgramWorkflow wf = Context.getProgramWorkflowService().getProgram(1).getWorkflowByName("HUMAN IMMUNODEFICIENCY VIRUS");

      (This assumes that there is a program with id = 1 and a workflow within that program named "HUMAN IMMUNODEFICIENCY VIRUS").

      Gliffy Diagrams

        Attachments

          Activity

            People

              dkayiwa Daniel Kayiwa
              mseaton Mike Seaton
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4 hours Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d