Table of Contents

Interface IApplicationIntegration

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

Allows an application run by adTempus to communicate with the adTempus server.

public interface IApplicationIntegration

Properties

Checkpoint

Gets or sets the Checkpoint for the job.

string Checkpoint { get; set; }

Property Value

string

JobInstanceOID

Gets the unique ID for this job instance.

OID JobInstanceOID { get; }

Property Value

OID

JobOID

Gets the unique ID for the job definition.

OID JobOID { get; }

Property Value

OID

JobVariables

Gets the Job Variables for the job.

IReadOnlyDictionary<string, string> JobVariables { get; }

Property Value

IReadOnlyDictionary<string, string>

StepInstanceOID

Gets the unique ID for this step instance.

OID StepInstanceOID { get; }

Property Value

OID

StepNumber

Gets the step number

int? StepNumber { get; }

Property Value

int?

StepOID

Gets the unique ID for the job step definition.

OID StepOID { get; }

Property Value

OID

Methods

CaptureFile(string, string)

Captures a file on disk and stores it in the job history.

void CaptureFile(string fileName, string displayName)

Parameters

NameTypeDescription
fileName string

The path/name of an existing file.

displayName string

The name that the file should use after it is captured. Specify null or empty string to use the original name.

Remarks

The file is copied to the adTempus CapturedFiles directory when you call CaptureFile.

CaptureFileData(byte[], string, string, DateTime)

Stores data as a Captured File in the job history.

void CaptureFileData(byte[] fileContents, string displayName, string originalPath, DateTime fileDate)

Parameters

NameTypeDescription
fileContents byte[]

The contents to write to the file

displayName string

The file name to display for the data.

originalPath string

The path to display for the file. Can be null or empty.

fileDate DateTime

The timestamp to display for the file.

Connect()

Connects to the adTempus server.

void Connect()

Remarks

This method throws an exception if the connection fails.

You may call this method explicitly to confirm the connection. If you do not, it is automatically called the first time you use a property or method that requires a server connection.

See Also

Connect(out Message)

Connects to the adTempus server.

bool Connect(out Message failureMessage)

Parameters

NameTypeDescription
failureMessage Message

Returns

bool

True if the connection succeeds. If it fails, the failureMessage contains more information.

Remarks

You may call this method explicitly to confirm the connection. If you do not, IApplicationIntegration.Connect is automatically called the first time you use a property or method that requires a server connection.

See Also
IApplicationIntegration.Connect

IsRunning()

Indicates whether the job step is still active.

bool IsRunning()

Returns

bool

Remarks

The ApplicationIntegration connection is only valid while the job step it is running under is active. If you attempt to perform any operations after the step ends, they will throw an InvalidOperationContextException exception. Use IsRunning to see if the context is still valid.

LogMessage(MessageType, int, string)

Logs a message to the Job Log for the job.

void LogMessage(MessageType messageType, int messageCode, string message)

Parameters

NameTypeDescription
messageType MessageType

The message type (severity)

messageCode int

The message code. Can be used to filter messages. Note: The value 100000 will be added to the messageCode when the message is recorded in adTempus.

message string

The message text.

Remarks

Each message logged with LogMessage creates a log message in the Job Log for the job and a record in the adTempus database. To avoid cluttering the job log and using large amounts of database space, use MessageTypeEnum.Debug for debug-level messages. These messages will be written to the Job Detail Log instead of the main Job Log. The detail log is a single log file with detailed/diagnostic information for the job, available from the Captured Files list for the job.

ReplaceVariableTokens(string)

Expands variable tokens in a string

string ReplaceVariableTokens(string sourceString)

Parameters

NameTypeDescription
sourceString string

The string to expand tokens in.

Returns

string

Remarks

This method replaces any valid variable tokens it finds with the corresponding values.

For example, if Job Variable "SomeVariable" has the value of "423", calling ReplaceVariableTokens("Current value: %SomeVariable%") returns the result "Current value: 423".

This method does not support the expansion of inline functions.

SendNotificationMessage(NotificationMessage)

Sends a notification message through the adTempus notification system.

void SendNotificationMessage(NotificationMessage message)

Parameters

NameTypeDescription
message NotificationMessage

The message to send.

SetAdditionalResult(string, string)

Communicates additional result information to the host.

void SetAdditionalResult(string key, string value)

Parameters

NameTypeDescription
key string
value string

SetJobVariable(string, string)

Adds or updates a Job Variable

void SetJobVariable(string name, string value)

Parameters

NameTypeDescription
name string

The name of the variable to add or update.

value string

The value for the variable

Remarks

The variable is only defined for the current execution of the job.