wiki:Modules/Batches

Version 9 (modified by JLundberg, 14 years ago) (diff)

--

Idea

Several applications have a need for the idea of working in Batches. That is to say, executing some sort of function on multiple Molgenis entities at one time. Examples are choosing multiple samples in a LIMS system to simultaneously perform protocols on, and selecting multiple animals to apply an event (wean, feed, draw blood sample, etc.) to. The idea is to create a generic plugin that can serve all Molgenis GCC applications.

Requirements

  • User must be able to add entities to a Batch in the UI in an intuitive way, e.g. by clicking on one or more entities in a list/matrix or by dragging them into a designated part of the screen.
  • Batch must be able to hold different kinds of Molgenis entities at the same time, e.g. a Sample, two Animals and a Group of Individuals.
  • User must be able to always inspect the contents of their current Batch, e.g. by clicking on a "shopping cart" icon in a corner of the UI.
  • User must be able to edit or clear the Batch.
  • Batch must be accessible from all parts (form screens, plugins) of the application.
  • There must be a UI screen where the user can apply one or more features on the current Batch. It would be very nice if you could select a number of entities in some sort of matrix view screen and then immediately apply features by for instance right-clicking on one of the selected items. In this way you'd even bypass the "shopping cart" and the need to go to a different screen for the feature application.
  • It would be nice if there were two kinds of Batches:
    • Static Batch, a fixed list of entities.
    • Dynamic Batch, a list based on a query that is evaluated anew every time. For this, we need some sort of query editor where users can build a query in an intuitive (graphical?) way, a bit like the current filtering tool in the standard Molgenis form screen.
  • Maybe it would be useful to support multiple Batches per user?

MS: do you want to make batch available in the standard screens?

Eventually yes, but not for the first version.

Technical Implementation

The idea is to have a Singleton class, say "Batches", that contains a map, which is composed of a Molgenis User's ID (from the auth package) as the key, and a list as the value. The list would contain Molgenis entities currently in the Batch. When the application requests the Batch information, the map would be queried with the ID of the current Molgenis User, and the list would be returned.

MS: The batches should be stored in the database, then inside the core model you could add an entity 'MolgenisBatch?' to describe the batches (optionally, including a query) and an entity 'MolgenisBatchElement?' with three fields 'batchId, entityType, objectId' to hold manually selected elements.

We don't agree - at least for the first version we want to keep it simple and not involve the database. If a record is needed from the batch, we agreed that a shared protocolApplication could be made which links back to the entities that were in a batch. Furthermore, if a user logins out and then logs back in, the batch will still be there, assuming the application is still running (which is the idea of a web application).

If we were to support multiple Batches, we could make the map consist of User ID as the key and a list of lists of Batches as values. But how can we then find the right Batch, i.e. the Batch the user wants to work with at that moment?

The dynamic Batch would have to be very different from the static Batch. It is not a list of entities but a list of query parameters. However, it would be handy to make the two kinds of Batches conform to the same interface, so we can have lists in our map that can hold both types at the same time.

MS: if possible I would try to put this in MolgenisBatch? as well.

User Stories

See BatchesUserStories

Basic UI idea

Attachments (2)

Download all attachments as: .zip