Table of Contents

Class JobGroup

Namespace
ArcanaDevelopment.adTempus.Client
Assembly
ArcanaDevelopment.adTempus.Client.dll

Represents a Job Group

public sealed class JobGroup : ADTIndependentObject, ISupportJobVariables
Inheritance
object
JobGroup
Implements

Remarks

All jobs belong to a JobGroup. Job Groups can be nested to any depth.

The top-level group is always in every adTempus instance and is represented in the Console by the "Jobs" node in the tree. It has an OID of RootGroup and IsRootGroup returns true. The root group cannot be deleted.

The root group does not have a ParentGroup; all other groups do.

When a group is created through CreateObject(ClassID) it is assigned to the root group. If the caller does not have permission to assign groups to the root group, the creation call will fail. Use CreateObject(ClassID, OID) or NewGroup() to create a group within a specific group.

To fetch existing jobs, use GetJobGroup(string)

Properties

ActiveJobs

Gets the number of active jobs for the group.

public int? ActiveJobs { get; }

Property Value

int?

Remarks

This value is only set if the group was fetched through GetJobTree(OID, bool, bool, bool).

See Also

AllowHoldTypeOverride

Determines whether jobs and groups in the group can override the HoldType

public bool AllowHoldTypeOverride { get; set; }

Property Value

bool

Remarks

If AllowHoldTypeOverride is false, jobs and groups in the group can have a more-restrictive HoldType but not a less-restrictive HoldType. If AllowHoldTypeOverride is true, jobs and groups can choose whether to inherit the setting from the queue (by using InheritHoldType and InheritHoldType).

See Also

AssemblyReferences

A semicolon-delimited list of any additional assemblies to be referenced when compiling variable functions used in jobs within this group.

public string AssemblyReferences { get; set; }

Property Value

string

ClassID

The Class ID for the object

[IgnoreDataMember]
public override ClassID ClassID { get; }

Property Value

ClassID

ClassKeyName

The key name for the class.

public override string ClassKeyName { get; }

Property Value

string

Remarks

This name the name used by adTempus to identify the class and is intended for programmatic use only. Use the ClassName for a user-friendly name.

CycleID

The current Cycle ID for this group.

public string CycleID { get; }

Property Value

string

Remarks

Refer to the user guide for more information on cycle IDs.

If the CycleIDType is not set to None, the CycleID is updated when a job executes that has UpdateCycleID set to true. The CycleIDType determines the type of cycle ID that is generated. The CycleIDFormat and CycleIDPrefix can be used to customize the appearance.

See Also

CycleIDFormat

Optional custom format for the CycleID

public string CycleIDFormat { get; set; }

Property Value

string

Remarks

Use this to set a format other than the default for the generated CycleID. If specified, it must be a valid .NET format string for the data type defined by the CycleIDType.

See Also

CycleIDPrefix

Optional prefix added to the beginning of the generated CycleID

public string CycleIDPrefix { get; set; }

Property Value

string
See Also

CycleIDType

The type of cycle ID to generate for this group

public CycleIDType CycleIDType { get; set; }

Property Value

CycleIDType

Remarks

See CycleID for more information.

See Also

ExclusionPeriods

The ExclusionPeriods that apply to this Group.

[RequiredVersion(5, 0, 0, 0)]
public ExclusionPeriodCollection ExclusionPeriods { get; }

Property Value

ExclusionPeriodCollection

Remarks

When Exclusion Periods are defined, jobs in this group (or sub-groups) do not execute during defined Exclusion Periods.

FailedJobs

Gets the number of failed jobs for the group.

public int? FailedJobs { get; }

Property Value

int?

Remarks

This value is only set if the group was fetched through GetJobTree(OID, bool, bool, bool).

See Also

FullyQualifiedName

Gets the fully-qualified name of the group in the form "level1\level2\level3".

public string FullyQualifiedName { get; }

Property Value

string

GroupCount

The number of child groups in this group (not including groups in sub-groups)

public int GroupCount { get; }

Property Value

int

Remarks

This is the total number of groups in the group, regardless of whether the user has permission to view them. See VisibleGroupCount for the number of groups that are visible to the user.

HoldType

The hold type for the group

public HoldType HoldType { get; set; }

Property Value

HoldType

Remarks

The group's HoldType applies to all jobs within the group or its sub-groups. Use GetEffectiveHoldType() to determine whether this group is held based on its own HoldType and the settings of its ancestor group(s).

See Also

InheritHoldType

Determines whether the group inherits its parent group's HoldType

public bool InheritHoldType { get; set; }

Property Value

bool

Remarks

InheritHoldType does not have any effect unless all parent groups have AllowHoldTypeOverride set to true.

See Also

IsDependent

Indicates whether the object is a dependent of (owned by) another object

[IgnoreDataMember]
public override bool IsDependent { get; }

Property Value

bool

Remarks

An independent object (IsDependent is false) is an object that can exist on its own without being part of another object. For example, Jobs, Job Groups, etc.

A dependent object (IsDependent is true) is a part of another object. For example, a JobStep cannot exist independently of a Job, so the JobStep is dependent.

Dependent objects cannot be directly fetched from the server: they are only fetched as part of the object they belong to. They also cannot be saved or deleted independently: they are automatically saved or deleted when the owning object is saved or deleted.

IsRootGroup

Indicates whether this group is the Root group (shown in the UI as the "Jobs" folder)

public bool IsRootGroup { get; }

Property Value

bool

Remarks

The Root group has RootGroup as its OID.

JobCount

The number of jobs in the group (not including jobs in sub-groups)

public int JobCount { get; }

Property Value

int

Remarks

This is the total number of jobs in the group, regardless of whether the user has permission to view them. See VisibleJobCount for the number of jobs that are visible to the user.

JobVariables

The job variables defined for the group

public JobVariableCollection JobVariables { get; }

Property Value

JobVariableCollection

Remarks

This collection only contains the variables defined explicitly for the group. Use GetInheritedVariables(bool) to retrieve variables inherited from higher levels (server, parent group).

To override a variable set at a higher level, add a new variable to this collection with the same name and the desired value.

Name

The user-supplied name for the group

public string Name { get; set; }

Property Value

string

Remarks

The Name must be unique within the parent ParentGroup. However, the name is not used by adTempus to uniquely identify the group; the OID is used for this. Changing the Name has no effect on links to other objects within adTempus.

Do not include backslashes ("\") in the group name, as these are used to separate levels in the group hierarchy.

The name of the Root group (IsRootGroup is true) cannot be changed; attempting to do so will produce an InvalidOperationException.

Exceptions

InvalidOperationException

Thrown if you attempt to change the name of the Root group.

NamespaceImports

A semicolon-delimited list of any additional namespaces to be included when compiling variable functions used in jobs within this group.

public string NamespaceImports { get; set; }

Property Value

string

ParentGroup

The group to which this group belongs

public JobGroup ParentGroup { get; set; }

Property Value

JobGroup

Remarks

Every group except the predefined Root group (IsRootGroup) must have a parent group

Responses

Responses to be executed for all jobs in the Group and its subgroups.

public ResponseCollection Responses { get; }

Property Value

ResponseCollection

ScriptLibraries

Script Libraries associated with this group

[ReservedForFutureUse]
public ScriptLibraryCollection ScriptLibraries { get; }

Property Value

ScriptLibraryCollection

SupportedResponseEvents

Gets a list of the events that are supported for Responses associated with this object.

public ReadOnlyCollection<SupportedResponseEvent> SupportedResponseEvents { get; }

Property Value

ReadOnlyCollection<SupportedResponseEvent>

SupportedSecurityActions

List of security actions supported by this object.

public override Dictionary<int, string> SupportedSecurityActions { get; }

Property Value

Dictionary<int, string>

A dictionary of the supported actions. The key is one of the SecurityPermission values and the value is the name of the permission (from GetSecurityPermissionName(SecurityPermission, string); a given SecurityPermission may use different names in different contexts).

SupportedSecurityInheritanceOptions

List of SecurityInheritanceOptions supported by the object

public override Dictionary<SecurityInheritanceOptions, string> SupportedSecurityInheritanceOptions { get; }

Property Value

Dictionary<SecurityInheritanceOptions, string>

UseInheritedResponses

Determines whether the Group will use Responses inherited from its parent Group.

[ReservedForFutureUse]
public bool UseInheritedResponses { get; set; }

Property Value

bool

VisibleGroupCount

Gets the number of groups in this group (not including groups in sub-groups) that are visible to the user, based on security settings

public int VisibleGroupCount { get; }

Property Value

int

VisibleJobCount

Gets the number of jobs in this group (not including jobs in sub-groups) that are visible to the user, based on security settings

public int VisibleJobCount { get; }

Property Value

int

WarningJobs

Gets the number of jobs with warnings for the group.

public int? WarningJobs { get; }

Property Value

int?

Remarks

This value is only set if the group was fetched through GetJobTree(OID, bool, bool, bool).

See Also

Methods

FindOwningObject()

Get the owner of this object based on relationships.

protected override ADTObject FindOwningObject()

Returns

ADTObject

The owning object, or null if the object is not owned by another object or the owner has not been set.

GetEffectiveAllowHoldTypeOverride()

Gets the effective AllowHoldTypeOverride for the group (combining the settings for the group and ancestor groups).

public bool GetEffectiveAllowHoldTypeOverride()

Returns

bool

GetEffectiveHoldType()

Gets the effective HoldType for the group (combining the HoldType for the group and ancestor groups).

public HoldType GetEffectiveHoldType()

Returns

HoldType

GetGroups(ObjectFetchOptions, bool)

Gets the child groups for this group

public JobGroupCollection GetGroups(ObjectFetchOptions options, bool refresh)

Parameters

NameTypeDescription
options ObjectFetchOptions

Options controlling how the groups are fetched

refresh bool

Set to true to refresh the latest data from the server. If false the data is current as of the last refresh.

Returns

JobGroupCollection
See Also

GetGroupsWithPaging(ObjectFetchOptions, int, ref bool)

Gets all child groups for this group, with options.

public JobGroupCollection GetGroupsWithPaging(ObjectFetchOptions options, int pageSize, ref bool restartPaging)

Parameters

NameTypeDescription
options ObjectFetchOptions

Options that control how objects are returned.

pageSize int

Specifies the number of objects to return in each call. Set to 0 to return all objects. See Remarks.

restartPaging bool

On input, indicates whether to start a new paging operation (true) or continue a previous paging operation (false). On return, indicates whether all records have been returned (true) or more records remain (false). See Remarks.

Returns

JobGroupCollection

Remarks

Calling this method has no effect on the set of groups returned by GetGroups or the Groups property, and vice-versa.

Paging

To fetch objects in pages (a maximum number of objects is returned in each request), set the pageSize to the maximum number requested and set restartPaging to true. On return, restartPaging will be false if there are more objects that can be fetched. To fetch the remaining pages of objects, continue to call the method, leaving restartPaging set to false, until restartPaging is true on return. At this point, all available objects have been returned.

GetInheritedVariables(bool)

Gets a collection containing the JobVariables inherited by this object, and optionally the variables for the object itself.

public JobVariableCollection GetInheritedVariables(bool includeSelf)

Parameters

NameTypeDescription
includeSelf bool

If true the returned collection contains both inherited variables and variables defined at this level. If false the results only include inherited variables.

Returns

JobVariableCollection

GetInstanceCounts()

Gets the instance counts for the group

public InstanceCounts GetInstanceCounts()

Returns

InstanceCounts

The ArcanaDevelopment.adTempus.Client.JobGroup.InstanceCounts for the group, or null if the group was not fetched through GetJobTree(OID, bool, bool, bool)

Remarks

This value is only set if the group was fetched through GetJobTree(OID, bool, bool, bool).

See Also

GetJobOIDs(SecurityPermission, bool)

Gets the OIDs of all jobs in this group (optionally including subgroups) for which the caller has the specified permission.

public ReadOnlyCollection<OID> GetJobOIDs(SecurityPermission requiredPermission, bool recursive)

Parameters

NameTypeDescription
requiredPermission SecurityPermission

The permission requested

recursive bool

Determines whether the operation is performed on descendent groups

Returns

ReadOnlyCollection<OID>

GetJobs(ObjectFetchOptions, bool)

Gets all jobs for this group that the caller has permission to view.

public JobCollection GetJobs(ObjectFetchOptions options, bool refresh)

Parameters

NameTypeDescription
options ObjectFetchOptions

Options controlling the fetch operation

refresh bool

If true, the list of jobs is refreshed from the server. If false, the cached set of jobs is returned.

Returns

JobCollection

Remarks

Jobs are not initially sent from the server. The first time this method is called, they are fetched from the server (regardless of the setting of the refresh parameter). On subsequent calls to this method, the jobs are re-fetched if refresh is True.

<p>Calling this method has no effect on the set of jobs returned by GetJobsWithPaging,
and vice-versa.</p>
See Also

GetJobsWithPaging(ObjectFetchOptions, int, ref bool)

Gets all jobs for the group, with options.

public JobCollection GetJobsWithPaging(ObjectFetchOptions options, int pageSize, ref bool restartPaging)

Parameters

NameTypeDescription
options ObjectFetchOptions

Options that control how objects are returned.

pageSize int

Specifies the number of objects to return in each call. Set to 0 to return all objects. See Remarks.

restartPaging bool

On input, indicates whether to start a new paging operation (true) or continue a previous paging operation (false). On return, indicates whether all records have been returned (true) or more records remain (false). See Remarks.

Returns

JobCollection

Remarks

Paging

To fetch objects in pages (a maximum number of objects is returned in each request), set the pageSize to the maximum number requested and set restartPaging to true. On return, restartPaging will be false if there are more objects that can be fetched. To fetch the remaining pages of objects, continue to call the method, leaving restartPaging set to false, until restartPaging is true on return. At this point, all available objects have been returned.

GetObjectDescription()

Gets a description of the object's key settings.

protected override string GetObjectDescription()

Returns

string

Remarks

This method is called by GetDescription() to get a user-friendly description of the object (such as its key settings) for display to the user. The description should contain enough information to distinguish this object from others of the same class.

GetRequiredHoldType()

Returns the HoldType options that are required for all children of this group.

public HoldType GetRequiredHoldType()

Returns

HoldType

Remarks

The return value is the HoldType options that are set at this level and/or parent levels where AllowHoldTypeOverride is false.

NewGroup()

Creates a new Job Group within this group.

public JobGroup NewGroup()

Returns

JobGroup

A new Job Group assigned to the target Group

Remarks

The caller must have Associate for the group

Exceptions

PermissionDeniedException

Thrown if the caller does not have permission to add groups to this group

NewJob()

Creates a new Job within this group.

public Job NewJob()

Returns

Job

A new Job assigned to the target Group.

Remarks

The caller must have Associate for the group

Exceptions

PermissionDeniedException

Thrown if the caller does not have permission to add jobs to this group

UpdateHoldType(HoldType, MissedJobCheckOptions, ChangeLogParameters, bool?, bool?)

Updates the HoldType for the Group immediately.

public void UpdateHoldType(HoldType newValue, MissedJobCheckOptions missedJobOptions, ChangeLogParameters auditRecord = null, bool? allowOverride = null, bool? inherit = null)

Parameters

NameTypeDescription
newValue HoldType

The new setting for the object's HoldType

missedJobOptions MissedJobCheckOptions

Indicates how missed executions will be treated if the HoldType.DisableTriggers flag is being turned off.

auditRecord ChangeLogParameters

Optional audit record for change log and snapshot.

allowOverride bool?

New setting for the group's AllowHoldTypeOverride. Set to null to keep the current setting.

inherit bool?

New setting for the group's InheritHoldType. Set to null to keep the current setting.

Remarks

This method makes an immediate server call to update the HoldType. No Save is required. The caller must have Modify or Hold/Release permission.

See Also

WriteToConfigurationReport(IADTObjectConfigurationReportWriter)

Writes the object and any contained objects to a configuration report

public override void WriteToConfigurationReport(IADTObjectConfigurationReportWriter reportBuilder)

Parameters

NameTypeDescription
reportBuilder IADTObjectConfigurationReportWriter

The report builder to write the object to.

Inherited Members