Archiving Workflows or Processes

Redwood provides Job 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 Workflows and/or processes are copied to the Active Archive
  • verify the Workflows and processes in the Active Archive
  • delete archived Workflows 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 Workflows and processes to be archived

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

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

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

Marking Workflows and Processes with Archive_Feeder_Mark_SQL

This uses SQL to select the Workflows 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 Workflows 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 Workflows and processes; you do not want to attempt archival of running or Pre Running Workflows 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 Workflows and processes for archival

  1. Navigate to Configure > Automate > Job Definitions.
  2. Choose Run from the context menu of Archive_Feeder_Mark_DateStatus.
  3. Fill the values from the table below in the fields.
  4. Choose Run and Run 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 Workflows and processes for archival

  1. Navigate to Configure > Automate > Job Definitions.
  2. Choose Run from the context menu of Archive_Feeder_Mark_Filter.
  3. Select a Filter that reflects the Workflows and processes you would like to mark.
  4. Choose Run and Run again.

Using Archive_Feeder_Mark_SQL to mark Workflows or processes for archival

  1. Navigate to Configure > Automate > Job Definitions.
  2. Choose Run from the context menu of the Job 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 Workflows and Processes

  1. Navigate to Configure > Automate > Job Definitions.
  2. Choose Run from the context menu of the Job Definition Archive_Feeder_Process.
  3. Choose Run, specify a Queue and choose Run again.

Verify Workflows and Processes are Archived

  1. Navigate to Configure > Automate > Job Definitions.
  2. Choose Run from the context menu of the Job Definition Archive_Feeder_Verify.
  3. Choose Run, specify a Queue and choose Run again.

Delete Archived Workflows and Processes

  1. Navigate to Configure > Automate > Job Definitions.
  2. Choose Run from the context menu of the Job Definition Archive_Feeder_Delete.
  3. Choose Run, specify a Queue and choose Run again.

See Also