Interface DataMonitor


  • public interface DataMonitor
    Data monitoring provides access to a data set. These can be the current values of specific data elements or the corresponding value history.
    • Method Detail

      • getCurrentDataValues

        Map<UUID,​InputDataContainer> getCurrentDataValues​(SessionToken session,
                                                                Collection<InstanceNode> instTrees,
                                                                Map<UUID,​Map<Integer,​ProcessConstants.AdeptDataType>> dataElementIds)
        Gets the current values of the designated data elements for the designated instances. The values will be indexed by the log ID of the corresponding instance.
        Make sure that the designated instances and data elements are compatible! That is, the data elements have to be used in the instances and the data elements have to have the same semantic across all instances. Usually use only instances belonging to the same process template. Otherwise this method may return semantical nonsense, e. g. return data elements of different type having the same ID.
        Parameters:
        session - The session which is used to check for access rights on this method and for tracking and logging purpose.
        instTrees - The instances organised as instance trees (the collection contains the root instance nodes) for which to retrieve the current data values.
        dataElementIds - The IDs of the data elements for which to get the current data values mapped to the corresponding data type and indexed by the corresponding template IDs. The data element IDs (Integer) will be used as parameter names in the returned data container.
        Returns:
        The data container providing the values of the designated data elements indexed by the corresponding instance log IDs. Use the data element IDs (not their names!) as parameter names. If an instance has no data values yet, it will not be in the map. If a data element has no/null value, it will not be in the data container.
        The caller is responsible for closing the values.
      • getCurrentDataValues

        Map<UUID,​ArchiveDataContainer> getCurrentDataValues​(SessionToken session,
                                                                  Map<UUID,​Collection<UUID>> templToinstLogIds,
                                                                  Map<UUID,​Map<Integer,​Pair<ProcessConstants.AdeptDataType,​Long>>> dataElements)
        Gets the current values of the designated data elements for the designated instances. Each ArchiveDataContainer will contain the values requested for the data elements of one instance, the key of the map will be the log ID of the corresponding instance.
        Make sure that the designated instances and data elements are compatible! That is, the data elements have to be used in the instances and the data elements have to have the same semantic across all instances. Usually use only instances belonging to the same process template. Otherwise this method may return semantical nonsense, e. g. return data elements of different type having the same ID.

        For ProcessConstants.AdeptDataType.STRING and ProcessConstants.AdeptDataType.USERDEFINED data elements, an individual size limit can be provided. If the corresponding value exceeds this, the corresponding data container will contain the corresponding PlaceholderValue instead of the actual value. The size is measured in characters for STRING and in bytes for USERDEFINED. Use ProcessUnawareAccess.retrieveLatestStringValue(SessionToken, UUID, int) and ProcessUnawareAccess.retrieveExternalUDTValue(SessionToken, UUID, int) or ProcessUnawareAccess.retrieveExternalUDTValueIncrementally(SessionToken, UUID, int) for retrieving the actual values.

        Parameters:
        session - The session which is used to check for access rights on this method and for tracking and logging purpose.
        templToinstLogIds - The log IDs of the instances for which to retrieve the current data values indexed by the corresponding base(!!) template ID.
        dataElements - The data elements (data element ID and data type) for which to get the current data values indexed by the corresponding (base) template ID. The data element IDs (Integer) will be used as parameter names in the returned data container. The map values are the data type in the corresponding template (which may change in a different template version) and the maximum value size for a STRING or USERDEFINED value or null. If the size is specified and the actual value is bigger than this, a PlaceholderValue will be be in the corresponding data container instead of the actual value.
        Returns:
        The data containers providing the values of the designated data elements indexed by the corresponding instance log IDs. Use the data element IDs (not their names!) as parameter names. If an instance has no data values yet, it will not be in the map. If a data element has no/null value, it will not be in the data container.
        The caller is responsible for closing the values.