
// ==================================================================
// Title:  	  DAP MOF Specification 2.3
// Filename:  CIM_DAP23.MOF
// Date:      01/17/2000 - Version 2.3 
// ==================================================================

// ==================================================================
// Pragmas
// ==================================================================
#pragma locale ("en_US")


// ================================================================== 
// UnitOfWorkDefinition
// ==================================================================

   [Description (
       "A logical element that describes units of work (e.g. "
	 "transactions).  This is only the definitional component "
	 "of the unit of work and not the unit of work itself.")
   ]
class CIM_UnitOfWorkDefinition : CIM_LogicalElement
{
      [Override ("Name"), Required,
       Description (
           "The name of the unit of work.  This name does not have to "
	     "be unique, but should be descriptive.  This is a required "
	     "field and may contain blanks.")
      ]
   string Name;
      [Required,
       Description (
           "A free format string to describe the context of the unit "
	     "of work. For example an 'Add Order' unit of work is defined "
	     "in the context a book ordering application, whereas another "
	     "'Add Order' unit of work is defined in the context of a "
	     "computer ordering application.")
      ]
   string Context;
      [Key,
       Description (
          "A 16 byte value that uniquely identifies the unit of work "
	    "definition. The use of OSF UUID/GUIDs is recommended.")
      ]
   string Id;
};


// ================================================================== 
// MetricDefinition
// ==================================================================

[Description (
       "The metrics that are associated with a unit of work.  These "
	 "metrics usually describe some aspect of the unit of work such "
	 "as how much work was done, or the size of the unit of work."
	 "For example, the size of a print job or the number of pages "
	 "printed could be metrics of a print unit of work. "
	 "These metrics are weak to CIM_UnitOfWorkDefintion.")
   ]
class CIM_MetricDefinition : CIM_ManagedElement
{
      [Key, 
       Description (
          "A 16 byte value that uniquely identifies the metric."
	    "The use of OSF UUID/GUIDs is recommended.")
      ]
   string Id;
      [Required,
       Description (
           "The name of the Metric.  This name does not have to "
	     "be unique, but should be descriptive.  This is a required "
	     "field and may contain blanks.")
      ]
   string Name;
      [ ValueMap {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12",
                  "13", "14" },
	  Values {"boolean", "char16", "datetime", "real32", "real64", "sint16", 
		"sint32", "sint64", "sint8", "string", "uint16", "uint32",
		"uint64", "uint8"}]
    uint16 DataType;
      [ Description (
           "An enumerated value that describes its characteristics for purposes"
           "of making calculations. Examples:"
           "  Non-calculable -> a string. Arithmetic makes no sense."
           "  Summable -> It makes sense to sum this value over many instances of"
           "    UnitOfWork, such as the number of files processed in a back-up job."
           "    If each back-up job is a UnitOfWork, and each job backs up 27,000"
           "    files on average, it make sense to say that 100 back up jobs backed"
           "    up 2,700,000 files."
           " Non-summable -> It does not make sense to sum this value over many"
           "   instances of UnitOfWork. An example would be the a metric that measures"
           "   the queue length when a job arrives at a server. If each job is a"
           "   UnitOfWork, and the average queue length when each job arrives is 33,"
           "   it does not make sense to say that the queue length for 100 jobs is"
           "   3300. It does make sense to say that the average is 33." ),
        ValueMap {"1", "2", "3" },
        Values {"Non-calculable", "Summable", "Non-summable"} ]
    uint16 Calculable;
      [Description (
          "Identifies the specific units of a value. Examples are Bytes, Packets, "
          "Jobs, Files, Milliseconds, and Amps." ) ]
    string Units;
      [ ValueMap {"1", "2", "3" },
	  Values {"atStart","inMiddle","atStop"} ] 
    uint16 Validity;
};


// ================================================================== 
// UoWMetricDefinition
// ==================================================================

   [Association,
    Description (
       "An association that describes the metrics that are associated "
	 "with a Unit Of Work definition.")
   ]
class CIM_UoWMetricDefinition : CIM_Dependency
{
      [Override ("Antecedent"),
       Max (1), Min (1),
       Description (
         "The Unit of Work definition where the metrics apply.")
      ] 
   CIM_UnitOfWorkDefinition REF Antecedent;
      [Override ("Dependent"),
       Weak,
       Description (
         "The metric definitions for a particular unit of work.")
      ] 
   CIM_MetricDefinition REF Dependent;
};


// ================================================================== 
// UnitOfWork
// ==================================================================

   [Description (
      "Each instance identifies a transaction (UnitOfWork) that is either "
      "in-process or already complete. Because instances of UnitOfWork can be very "
      "short-lived and there can be a great number of them, use of this class as "
      "an instrumentation source for determining response time of each UnitOfWork "
      "could be very inefficient unless the rate and duration of the units of work "
      "are known. The intended use is to respond to queries about currently active "
      "or complete units of work. This class is weak to CIM_UnitOfWorkDefintion. ") ] 

class CIM_UnitOfWork : CIM_ManagedElement
{
	[Override ("Description"),
       Description (
         "Since the UnitOfWork is designed to be an extremely lightweight object "
	   "the descriptions should be not be used on individual Units of Work.  The "
	   "description should be exactly the same as the instance in CIM_UnitOfWorkDefintion "
	   "that defines the instances of UnitOfWork.")
      ] 
   string Description;

      [key, Description (
        "The identifier that makes the inprocess UnitOfWork unique within "
        "the UnitOfWorkDefinition.") ] 
   sint64 id;
      [Key, Propagated ("CIM_UnitOfWorkDefintion.Id"),
       Description (
          "A 16 byte value that uniquely identifies the unit of work definition."
	    "The use of OSF UUID/GUIDs is recommended.")
      ]
   string UoWDefId;
        [Description (
	      "The name of the user who initiated the unit of work.  This may be "
              "a real user login name or a logical name passed by the application.")
	  ] 
    string UserName;
        [Description (
	      "The time the Unit of Work was started") 
	  ] 
    datetime StartTime;
        [Description (
	      "The elapsed time since the Unit of Work was started. "
	      "Upon completion of the Unit of Work, the ElapsedTime "
		"will contain the time to process the entire Unit of Work.") 
	  ] 
    datetime ElapsedTime;

	  [Description (
		"An enumeration to identify the status of the unit of work."
            "Value=Completed is intended to be used when the completion status is"
            "  unknown."
            "Value=Completed-Aborted is intended to be used when a unit of work has"
            "  completed but was not allowed to end normally. An example would be"
            "  pressing the Stop or Back button on a browser before a page fully loads."),
	   ValueMap {"1", "2", "3", "4", "5", "6" },
	   Values {"Active", "Suspended", "Completed", "Completed Good",
                "Completed Failed", "Completed Aborted" }
	  ]
    uint16 Status;
};



// ================================================================== 
// UoWMetric
// ==================================================================

   [Association,
    Description (
       "This association describes the metrics and their values for "
	 "an instance of a Unit of Work that has started executing.")
   ]
class CIM_UoWMetric : CIM_Dependency
{
      [Override ("Antecedent"),
       Description (
         "The unit of work that has metrics.")
      ] 
   CIM_UnitOfWork REF Antecedent;
      [Override ("Dependent"),
       Description (
         "The metric definition for this particular value."
         "The metric definition must be associated via a UoWMetricDefinition"
         "to the same UoWMetricDefinition to which the UnitOfWork is weakly"
         "associated.")
      ] 
   CIM_MetricDefinition REF Dependent;

	[Description (
	 "The value of the data.  The type of the data is described by the"
	 "metric definition.  The data type here is string so it can handle "
	 "any type of data.")
	]
    string Value;

};


// ================================================================== 
// StartedUoW
// ==================================================================

   [Association,
    Description (
       "This association links a unit of work to its defintion.")
   ]
class CIM_StartedUoW : CIM_Dependency
{
      [Override ("Antecedent"),
       Max (1), Min (1),
       Description (
         "The definition object for the unit of work.")
      ] 
   CIM_UnitOfWorkDefinition REF Antecedent;
      [Override ("Dependent"),
       Weak,
       Description (
         "An instance of a unit of work that has started executing.")
      ] 
   CIM_UnitOfWork REF Dependent;
};


// ================================================================== 
// LogicalElementUnitOfWorkDef
// ==================================================================
   [Association,
    Description (
       "This association links a logical element to the units of work "
	 "that can be performed by the element.  For example, a printer "
	 "can have a printjob unit of work definition defined.")
   ]
class CIM_LogicalElementUnitOfWorkDef : CIM_Dependency
{
      [Override ("Antecedent"),
       Description (
         "The logical element that is providing the unit of work.")
      ] 
   CIM_LogicalElement REF Antecedent;
      [Override ("Dependent"),
       Description (
         "The unit of work definition associated with the LogicalElement.")
      ] 
   CIM_UnitOfWorkDefinition REF Dependent;
};

// ================================================================== 
// SubUoWDef
// ==================================================================
   [Association,
    Description (
       "This association defines the sub-units of work (sub-transactions) "
	 "for a particular unit of work.  For example, an 'Add_Order' unit of work "
	 "could have sub-units of work of 'ValidateCustomer', 'ValidatePartNumber' "
	 "'UpdateDatabase', etc...")
   ]
class CIM_SubUoWDef : CIM_Dependency
{
      [Override ("Antecedent"),
       Description (
         "The parent unit of work definition.")
      ] 
   CIM_UnitOfWorkDefinition REF Antecedent;
      [Override ("Dependent"),
       Description (
         "The sub-unit of work definition.")
      ] 
   CIM_UnitOfWorkDefinition REF Dependent;
};

// ================================================================== 
// LogicalElementPerformsUoW
// ==================================================================

   [Association,
    Description (
       "This association identifies the unit of work with"
	 "the logical element that is performing the work.")
   ]
class CIM_LogicalElementPerformsUoW : CIM_Dependency
{
      [Override ("Antecedent"),
       Description (
         "The logical element performing the unit of work.")
      ] 
   CIM_LogicalElement REF Antecedent;
      [Override ("Dependent"),
       Description (
         "The unit of work.")
      ] 
   CIM_UnitOfWork REF Dependent;
};

// ================================================================== 
// SubUoW
// ==================================================================

   [Association,
    Description (
       "This association identifies the executed sub-unit "
	 "of work (sub-transaction) with its parent unit of work.")
   ]
class CIM_SubUoW : CIM_Dependency
{
      [Override ("Antecedent"),
	 Max (1), Min (0),
       Description (
         "The parent unit of work.")
      ] 
   CIM_UnitOfWork REF Antecedent;
      [Override ("Dependent"),
       Description (
         "The sub-unit of work.")
      ] 
   CIM_UnitOfWork REF Dependent;
};


// ===================================================================
// end of file
// ===================================================================
