Archiving Chains or Processes

Redwood provides Process Definitions for archiving, which are used in a in a four-phase work flow:

  • mark the items to be archived
  • process the marked items, this is where the Chains and/or processes are copied to the Active Archive
  • verify the Chains and processes in the Active Archive
  • delete archived Chains or processes in Redwood Server

The following definitions can be obtained from Redwood Software for the Archiving Server functionality:

  • Archive_Feeder_Configure - configure Redwood Server to connect to an Active Archive

  • Archive_Feeder_Mark_DateStatus - mark Chains and processes to be archived

    • Archive_Feeder_Mark_Filter
    • Archive_Feeder_Mark_SQL
  • Archive_Feeder_Process - archive the Chains or processes

    • Archive_Feeder_JobList
  • Archive_Feeder_Verify - verify archived Chains and processes then set their status to V erified

  • Archive_Feeder_Delete - delete V erified Chain and process (only those which have been successfully archived)

Marking Chains and Processes with Archive_Feeder_Mark_SQL

This uses SQL to select the Chains and processes; when you use empty or prefix/suffix syntax, your SQL is inserted into the SQL boilerplate. The FULL: syntax allows you full control; note that the suffix is recommended with the FULL: syntax, though not a hard a requirement.

The SQL can be

  • empty - this will select everything

  • prefix/suffix

    • prefixed with select j.UniqueId from Job j and
    • suffixed with and not j.UniqueId in (select jd_1.Job from JobDatum jd_1 where jd_1.DatumDefinition = ?)
  • start with FULL:select j.UniqueId

    • You must alias the Job table to j
    • Restrict the Chains and processes included using the where clause suffix above, and potentially also where j.Status in ('C', 'E', 'A', 'U', 'K') (or a subset of those statuses)

Note: The FULL: syntax requires special attention as you are responsible for selecting the appropriate Chains and processes; you do not want to attempt archival of running or pre-running Chains and processes. If you are unsure, use the other definitions.

Example

SQL parameter:

Using prefix/suffix

Copy
select j.UniqueId from Job j where j.Description like '%2BeArchived%' and not j.UniqueId in (select jd_1.Job from JobDatum jd_1 where jd_1.DatumDefinition = ?)

Using FULL:

Copy
FULL:select j.UniqueId from Job j where j.Queue in ( select Queue.UniqueId from Queue where Queue.Name = 'MSLN_UNIX_GENERIC') and j.UniqueId in (select jd_1.Job from JobDatum jd_1 where jd_1.DatumDefinition = ?) and j.Status ='C'

Prerequisites

Procedure

Using Archive_Feeder_Mark_DateStatus to mark Chains and processes for archival

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of Archive_Feeder_Mark_DateStatus.
  3. Fill the values from the table below in the fields.
  4. Choose Submit and Submit again.
Parameter Description Value
pServer Server Name

pOverwrite Overwrite?

pRecursive Recursive

pDeletionDate Deletion Date =Time.expressionNow('add 30 days')
pStartDate Starting

pEndDate Ending

pCompleted Completed x (checked)
pCancelled Cancelled (unchecked)
pKilled Killed x (checked)
pError Error x (checked)
pCompleted Completed x (checked)

Using Archive_Feeder_Mark_Filter for mark Chains and processes for archival

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of Archive_Feeder_Mark_Filter.
  3. Select a Filter that reflects the Chains and processes you would like to mark.
  4. Choose Submit and Submit again.

Using Archive_Feeder_Mark_SQL to mark Chains or processes for archival

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of the Process Definition Archive_Feeder_Mark_SQL.
  3. Fill where j.Description like 'Prod_FCC%' and not j.UniqueId in (select jd_1.Job from JobDatum jd_1 where jd_1.DatumDefinition = ?).

Archiving Chains and Processes

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of the Process Definition Archive_Feeder_Process.
  3. Choose Submit, specify a Queue and choose Submit again.

Verify Chains and Processes are Archived

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of the Process Definition Archive_Feeder_Verify.
  3. Choose Submit, specify a Queue and choose Submit again.

Delete Archived Chains and Processes

  1. Navigate to Definitions > Processes.
  2. Choose Submit from the context menu of the Process Definition Archive_Feeder_Delete.
  3. Choose Submit, specify a Queue and choose Submit again.

See Also