// Copyright (c) 2013 DMTF. All rights reserved. [Version ( "2.38.0" ), UMLPackagePath ( "CIM::Core::CoreElements" ), Description ( "A concrete version of Job. This class represents a generic and " "instantiable unit of work, such as a batch or a print job." )] class CIM_ConcreteJob : CIM_Job { [Key, Override ( "InstanceID" ), Description ( "Within the scope of the instantiating Namespace, " "InstanceID opaquely and uniquely identifies an instance " "of this class. In order to ensure uniqueness within the " "NameSpace, the value of InstanceID SHOULD be constructed " "using the following \'preferred\' algorithm: \n" ": \n" "Where and are separated by a colon " "\':\', and where must include a copyrighted, " "trademarked or otherwise unique name that is owned by " "the business entity that is creating or defining the " "InstanceID, or that is a registered ID that is assigned " "to the business entity by a recognized global authority. " "(This requirement is similar to the _ structure of Schema class names.) In addition, to " "ensure uniqueness must not contain a colon " "(\':\'). When using this algorithm, the first colon to " "appear in InstanceID must appear between and " ". \n" " is chosen by the business entity and should " "not be re-used to identify different underlying " "(real-world) elements. If the above \'preferred\' " "algorithm is not used, the defining entity must assure " "that the resulting InstanceID is not re-used across any " "InstanceIDs produced by this or other providers for the " "NameSpace of this instance. \n" "For DMTF defined instances, the \'preferred\' algorithm " "must be used with the set to \'CIM\'." )] string InstanceID; [Required, Override ( "Name" ), Description ( "The user-friendly name for this instance of a Job. In " "addition, the user-friendly name can be used as a " "property for a search or query. (Note: Name does not " "have to be unique within a namespace.)" )] string Name; [Description ( "JobState is an integer enumeration that indicates the " "operational state of a Job. It can also indicate " "transitions between these states, for example, \'Shutting " "Down\' and \'Starting\'. Following is a brief " "description of the states: \n" "New (2) indicates that the job has never been started. \n" "Starting (3) indicates that the job is moving from the " "\'New\', \'Suspended\', or \'Service\' states into the " "\'Running\' state. \n" "Running (4) indicates that the Job is running. \n" "Suspended (5) indicates that the Job is stopped, but can " "be restarted in a seamless manner. \n" "Shutting Down (6) indicates that the job is moving to a " "\'Completed\', \'Terminated\', or \'Killed\' state. \n" "Completed (7) indicates that the job has completed " "normally. \n" "Terminated (8) indicates that the job has been stopped " "by a \'Terminate\' state change request. The job and all " "its underlying processes are ended and can be restarted " "(this is job-specific) only as a new job. \n" "Killed (9) indicates that the job has been stopped by a " "\'Kill\' state change request. Underlying processes " "might have been left running, and cleanup might be " "required to free up resources. \n" "Exception (10) indicates that the Job is in an abnormal " "state that might be indicative of an error condition. " "Actual status might be displayed though job-specific " "objects. \n" "Service (11) indicates that the Job is in a " "vendor-specific state that supports problem discovery, " "or resolution, or both.\n" "Query pending (12) waiting for a client to resolve a " "query" ), ValueMap { "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13..32767", "32768..65535" }, Values { "New", "Starting", "Running", "Suspended", "Shutting Down", "Completed", "Terminated", "Killed", "Exception", "Service", "Query Pending", "DMTF Reserved", "Vendor Reserved" }] uint16 JobState; [Description ( "The date or time when the state of the Job last changed. " "If the state of the Job has not changed and this " "property is populated, then it must be set to a 0 " "interval value. If a state change was requested, but " "rejected or not yet processed, the property must not be " "updated." )] datetime TimeOfLastStateChange; [Required, Write, Description ( "The amount of time that the Job is retained after it has " "finished executing, either succeeding or failing in that " "execution. The job must remain in existence for some " "period of time regardless of the value of the " "DeleteOnCompletion property. \n" "The default is five minutes." )] datetime TimeBeforeRemoval = "00000000000500.000000:000"; [Experimental, Description ( "If not NULL, the name of the intrinsic operation or " "extrinsic method for which this Job represents an invocation.\n" "When not NULL, and if an extrinsic method, the format " "shall be .MethodName, where classPath is a " "WBEM-URI-TypedClassPath or a WBEM-URI-UntypedClassPath " "as defined by DSP0207. And where methodName is a method " "of that class.\n" "When not NULL, and if an intrinsic operation, the format " "shall be .OperationName, where " "namespacePath is a WBEM-URI-TypedNamespacePath or a " "WBEM-URI-UntypedNamespacePath as defined by DSP0207. And " "where OperationName is either the name of a generic " "operation as defined in DSP0223 or is the name of a " "protocol specific operation as defined for the protocol " "used to retrieve the instance." )] string MethodName; [Experimental, Override ( "DeleteOnCompletion" ), Write, Description ( "Indicates whether or not the job should be automatically " "deleted upon completion. Note that the \'completion\' of " "a job includes when the Job is terminated by manual " "intervention. \n" "If this property is set to false and the job completes, " "then the intrinsic method DeleteInstance must be used to " "delete the job instead of updating this property.\n" "If this property is set to true and the job completes, " "then the job may be deleted after the TimeBeforeRemoval interval.\n" "If there is a CIM_DiagnosticServiceJobCapabilities " "associated to the service that spawned the job, then the " "DeleteOnCompletion should be TRUE if " "CIM_DiagnosticServiceJobCapabilities.DeleteJobSupported " "is FALSE. If DeleteOnCompletion is FALSE, then " "CIM_DiagnosticServiceJobCapabilities.CleanupInterval " "should be non-NULL." ), ModelCorrespondence { "CIM_ConcreteJob.TimeBeforeRemoval", "CIM_DiagnosticServiceJobCapabilities.CleanupInterval", "CIM_DiagnosticServiceJobCapabilities.DeleteJobSupported" }] boolean DeleteOnCompletion; [Description ( "The input (including inout), parameters of the job, " "formatted as an embedded instance with a class name of \"__JobInParameters\".\n" "In the case where a job represents an intrinsic " "operation or an extrinsic method call, that embedded " "instance contains properties representing the input " "parameters of that call. Each input parameter is mapped " "to a corresponding property of the same name and type. " "REF-typed parameters are represented as " "Reference-qualified properties of type string whose " "value is the instance path in WBEM URI format.\n" "The value of each property shall be the value of the " "corresponding input parameter at the time the job was " "started." ), EmbeddedObject] string JobInParameters; [Description ( "The output (including inout), parameters of the job, " "formatted as an embedded instance with a class name of \"__JobOutParameters\".\n" "\n" "This property shall be NULL unless JobStatus has the " "value Completed (7).\n" "\n" "In the case where a job represents an intrinsic " "operation or an extrinsic method call, that embedded " "instance contains properties representing the output " "parameters and return value of that call. Each output " "parameter is mapped to a corresponding property of the " "same name and type, and the return value is mapped to a " "property with the name __ReturnValue of the same type. " "REF-typed parameters and return values are mapped to " "Reference-qualified properties of type string whose " "value is the instance path in WBEM URI format.\n" "\n" "The value of each such property shall be the value of " "the corresponding output parameter or return value at " "the time the job completed." ), EmbeddedObject] string JobOutParameters; [Description ( "Requests that the state of the job be changed to the " "value specified in the RequestedState parameter. " "Invoking the RequestStateChange method multiple times " "could result in earlier requests being overwritten or " "lost. \n" "If 0 is returned, then the task completed successfully. " "Any other return code indicates an error condition." ), ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", "4097", "4098", "4099", "4100..32767", "32768..65535" }, Values { "Completed with No Error", "Not Supported", "Unknown/Unspecified Error", "Can NOT complete within Timeout Period", "Failed", "Invalid Parameter", "In Use", "DMTF Reserved", "Method Parameters Checked - Transition Started", "Invalid State Transition", "Use of Timeout Parameter Not Supported", "Busy", "Method Reserved", "Vendor Specific" }] uint32 RequestStateChange( [Description ( "RequestStateChange changes the state of a job. The " "possible values are as follows: \n" "Start (2) changes the state to \'Running\'. \n" "Suspend (3) stops the job temporarily. The " "intention is to subsequently restart the job with " "\'Start\'. It might be possible to enter the " "\'Service\' state while suspended. (This is " "job-specific.) \n" "Terminate (4) stops the job cleanly, saving data, " "preserving the state, and shutting down all " "underlying processes in an orderly manner. \n" "Kill (5) terminates the job immediately with no " "requirement to save data or preserve the state. \n" "Service (6) puts the job into a vendor-specific " "service state. It might be possible to restart the " "job." ), ValueMap { "2", "3", "4", "5", "6", "7..32767", "32768..65535" }, Values { "Start", "Suspend", "Terminate", "Kill", "Service", "DMTF Reserved", "Vendor Reserved" }] uint16 RequestedState, [Description ( "A timeout period that specifies the maximum amount " "of time that the client expects the transition to " "the new state to take. The interval format must be " "used to specify the TimeoutPeriod. A value of 0 or " "a null parameter indicates that the client has no " "time requirements for the transition. \n" "If this property does not contain 0 or null and " "the implementation does not support this " "parameter, a return code of \'Use Of Timeout " "Parameter Not Supported\' must be returned." )] datetime TimeoutPeriod); [Deprecated { "CIM_ConcreteJob.GetErrors" }, Description ( "GetError is deprecated because Error should be an " "array,not a scalar.\n" "When the job is executing or has terminated without " "error, then this method returns no CIM_Error instance. " "However, if the job has failed because of some internal " "problem or because the job has been terminated by a " "client, then a CIM_Error instance is returned." ), ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "32768..65535" }, Values { "Success", "Not Supported", "Unspecified Error", "Timeout", "Failed", "Invalid Parameter", "Access Denied", "DMTF Reserved", "Vendor Specific" }] uint32 GetError( [OUT, Description ( "If the OperationalStatus on the Job is not \"OK\", " "then this method will return a CIM Error instance. " "Otherwise, when the Job is \"OK\", null is " "returned." ), EmbeddedInstance ( "CIM_Error" )] string Error); [Description ( "If JobState is \"Completed\" and Operational Status is " "\"Completed\" then no instance of CIM_Error is returned. \n" "If JobState is \"Exception\" then GetErrors may return " "intances of CIM_Error related to the execution of the " "procedure or method invoked by the job.\n" "If Operatational Status is not \"OK\" or \"Completed\"then " "GetErrors may return CIM_Error instances related to the " "running of the job." ), ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "32768..65535" }, Values { "Success", "Not Supported", "Unspecified Error", "Timeout", "Failed", "Invalid Parameter", "Access Denied", "DMTF Reserved", "Vendor Specific" }] uint32 GetErrors( [OUT, Description ( "If the OperationalStatus on the Job is not \"OK\", " "then this method will return one or more CIM Error " "instance(s). Otherwise, when the Job is \"OK\", " "null is returned." ), EmbeddedInstance ( "CIM_Error" )] string Errors[]); [Experimental, Description ( "The CIM_ConcreteJob.ResumeWithAction( ) method is " "invoked to resume the execution of a job when it has a " "JobState of 12 (Query Pending) and an action (rather " "than input) was requested. The pending query is a " "request to perform an action and the job program merely " "needs to know when the action is completed.\n" "The job would request the action(s) through one or more " "indications. When an indication has been sent, but there " "has not been a client response the job will have a " "JobState of Query Pending." ), ValueMap { "0", "2", "3", "4", "6", "..", "32768..65535" }, Values { "Completed with No Error", "Unknown/Unspecified Error", "The job has already timed out", "Failed", "JobState not Query Pending", "DMTF Reserved", "Vendor specific" }] uint32 ResumeWithAction( ); [Experimental, Description ( "The CIM_ConcreteJob.ResumeWithInput( ) method is invoked " "to resume the execution of the job when it has a " "JobState of 12 (Query Pending). The input parameters " "specify an array of strings that constitute the client " "supplied inputs to the job program. \n" "The job would request the inputs through one or more " "indications. When an indication has been sent, but there " "has not been a client response the job will have a " "JobState of Query Pending." ), ValueMap { "0", "2", "3", "4", "5", "6", "..", "32768..65535" }, Values { "Completed with No Error", "Unknown/Unspecified Error", "The job has already timed out", "Failed", "Invalid Parameter", "JobState not Query Pending", "DMTF Reserved", "Vendor specific" }] uint32 ResumeWithInput( [Description ( "The input values requested of the client by the " "job when its state changed to 12 (Query Pending).\n" "If the CIM_ConcreteJob is associated with a " "CIM_DiagnosticTest, then the " "CIM_DiagnosticTest.Characteristics property shall " "contain 3 (Is Interactive).\n" "If the CIM_ConcreteJob is associated with a " "CIM_DiagnosticTest and a corresponding " "CIM_DiagnosticServiceJobCapabilities exists, then " "CIM_DiagnosticServiceJobCapabilities.ClientRetriesMax " "identifies the number of times this method may be " "retried and " "CIM_DiagnosticServiceJobCapabilities.DefaultValuesSupported " "identifies the whether or not default input values " "are supported.\n" "If the CIM_ConcreteJob instance is executing under " "the control of a CIM_JobSettingData, then " "CIM_JobSettingData.DefaultInputValues shall " "identify the Default input values to be used if " "default input values are supported, " "CIM_JobSettingData.InteractiveTimeout identifies " "the amount of time to wait for a client to issue " "the ResumeWithInput and " "CIM_JobSettingData.ClientRetries identifies the " "number of retries of the method that the client " "may execute." ), ModelCorrespondence { "CIM_JobSettingData.DefaultInputValues", "CIM_JobSettingData.InteractiveTimeout", "CIM_JobSettingData.ClientRetries", "CIM_DiagnosticServiceJobCapabilities.ClientRetriesMax", "CIM_DiagnosticServiceJobCapabilities.DefaultValuesSupported", "CIM_DiagnosticTest.Characteristics" }] string Inputs[]); };