You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Current »

Introduction

The JS7 - Inventory provides the functionality to export and to import scheduling objects such as workflows, calendars, schedules etc.

  • Export and import can be used
    • to share examples and scheduling solutions between users,
    • for migration purposes when upgrading between JS7 minor/major releases,
    • as part of a rollout strategy for example to rollout from dev -> test -> prod environments. Find more details from JS7 - Rollout of Scheduling Objects.
  • Export and import

Export

Export Operation

The export operation is available from the Export button in the Configuration->Inventory view like this:


In addition, the export function is available from a folder's action menu like this:


The Export button is used to select scheduling objects starting from the top-level folder.

The Export action menu is used to export objects starting from the given folder.

After choosing the export action the following window offers to select objects:


Explanation:

  • File Name
    • The name and extension of the file to which the export is performed.
    • Consider that an extension has to be specified and has to match the File Format, e.g. export.zip, export.tar.gz.
  • File Format
    • ZIP: This format works for most Unix operating systems and for Windows and creates an archive with a .zip extension.
    • TAR_GZ: This format works preferably for Unix operating systems and creates an archive with a .tar.gz extension.
  • Filter Type
    • Controller: The export includes scheduling object types that are deployed to a Controller such as Workflows, Job Resources etc.
    • Automation: The export includes scheduling object types that are released by JOC Cockpit such as Calendars and Schedules.
  • Filter
    • Valid only: JOC Cockpit does not force users to have objects in a valid status, for example during ongoing work on workflows. Invalid, i.e. incomplete, objects can be exported and imported.
    • Draft:  The export includes a single version of an object. This option specifies that the draft version of an object will be preferred for export if a draft version exists that is newer than the deployed or released version.
    • Deployed:  Specifies that the latest deployed version of an object is exported. If an object is deployed a number of times then JOC Cockpit holds the JS7 - Deployment History and adds the latest version to the export file. 
      • If used with the Draft option in place then this includes to prefer the draft version to the deployed version of an object if a newer draft version exists.
      • If used without the Draft option being in place then deployed objects only will be exported and objects for which a draft version only exists will be omitted from export. 
    • Released: Specifies that the latest released version of an object is exported.
      • If used with the Draft option in place then this includes to prefer the draft version to the released version of an object if a newer draft version exists.
      • If used without the Draft option being in place then released objects only will be exported and objects for which a draft version only exists will be omitted from export.
  • Handle recursively:
    • Specifies that selection of a folder includes to export any objects and sub-folders recursively. If objects should be selected individually then this options should not be used.

When hitting the Submit button the export file is created and is offered for download.

Export File

The export file is an archive in .zip or .tar.gz format. Starting from the above example that exported the Examples.Unix folder the root of the export file looks like this:

The meta_inf file includes information about the JOC Cockpit version, inventory schema version and the version of the JS7 - REST Web Service API that were used during export. This information is important for later import with newer versions of JOC Cockpit as it triggers the migration of objects to newer inventory schema versions.

The contents of the Examples.Unix folder is the list of included sub-folders like this:

The contents of the 05_ScheduledExecution folder is a list of objects in JSON format.

The object type is indicated by the respective extension such as .calendar.json, .workflow.json etc.

Import

Import Operation

The import operation is available from the Import button in the Configuration->Inventory view like this:


Clicking the Import button brings forward the following popup windows:

Explanation:

  • Folder
    • During import the folder hierarchy inside the imported file is considered. However, users can specify a target folder as the top-level folder to which import file's folders are added, 
    • For example, if the import file's inside top-level folder is Examples.Unix and
      • no Folder is specified then the import file's top-level folder is added to the inventory root, i.e. /Examples.Unix.
      • a Folder /TestRuns/70 is specified then the import file's top-level folder will be added as /TestRuns/70/Examples.Unix.
  • File Format
    • ZIP: This format works for most Unix operating systems and for Windows and creates an archive with a .zip extension.
    • TAR_GZ: This format works preferably for Unix operating systems and creates an archive with a .tar.gz extension.
  • Overwrite
    • The JOC Cockpit inventory holds unique object names per object type. This means you can have a workflow with the name hello and a job resource, calendar, schedule etc. with the same name, but you cannot have two workflows with the same name. This applies to any scheduling objects.
    • Therefore object name collisions from an import file and from the JOC Cockpit inventory can happen independent from the imported folder hierarchy. The Overwrite option specifies what the title suggests: any existing inventory objects with the same name are replaced by objects from the same name and type of an import file.
  • Object Name: Options in this section are available only if the Overwrite option is not in place.
    • Ignore if exists:  This option grants precedence to objects that exist in the JOC Cockpit inventory should object name collisions occur from an import file: in this situation the object from the import file is ignored.
    • Add Prefix: For any objects of the import file a unique prefix is used. The value of the prefix is specified by JS7 - Settings, chapter: JOC Cockpit Settings with the import_prefix setting ("imported"). If an object with this name - including the prefix - exists then a number is added to the prefix and is incremented until a unique object name is identified.
    • Add Suffix: For any objects of the import file a unique suffix is used.  The value of the suffix is specified by JS7 - Settings, chapter: JOC Cockpit Settings with the import_suffix setting ("imported"). If an object with this name - including the suffix - exists then a number is added to the suffix and is incremented until a unique object name is identified.

The Drag & Drop zone and the Choose Files for Upload button can be used to import scheduling objects from a file.

Consider that any objects are put to the not deployed and not released status respectively when imported.

Relational Consistency

The import operation considers relational consistency:

  • Assume a workflow and a corresponding schedule that creates orders for the JS7 - Daily Plan to be available with the JOC Cockpit inventory.
    • When updating the workflow from an import file that does not contain the corresponding schedule then the existing schedule will automatically relate to the updated workflow. This similarly applies to any object references. This operation requires the above Overwrite option to be in place during import as otherwise the workflow would not be updated.
    • If the Overwrite option is not in place during import but instead one of the Add Prefix or Add Suffix options is used then during import a new workflow will be created with a unique name specified by the prefix/suffix. In this situation the imported schedule - even if not subject to object name collision - will accordingly receive the same prefix/suffix and will relate to the newly created workflow.
  • Assume a schedule to be imported that holds a reference to a workflow available with the inventory.
    • If the workflow is not included with the import file then the imported schedule will reference the existing workflow.
    • If a schedule with the same name exists in the inventory and the Add Prefix or Add Suffix options are in place then a new schedule will be created that references the existing workflow. As a result the workflow will be referenced by two schedules, the existing schedule and the newly imported schedule, that both create orders for the Daily Plan.

Export/Import for Rollout

Export/import is a valid strategy to perform rollout operations, for example from dev -> test -> prod environments.

At the same time this requires some discipline about the nature of scheduling objects to be local to a specific environment or to be prepared for rollout across environments.

Find details from JS7 - Rollout of Scheduling Objects.

Export/Import for Deployment

Export/import is used for deployment if JOC Cockpit is operated in a Security Level HIGH. The functionality includes to export scheduling objects for digital signing on an external device and to import the signed objects. After import the usual deployment operation is performed.

Find details from JS7 - Deployment for high Security Level.



  • No labels