Importing Redwood Server Objects with Imports
Imports are used to import objects from CAR files. They were introduced to ease the promotion work-flow and submit a System_Import_Archive process definition with the corresponding parameters. You can upload a car file or specify a remote car file to be retrieved by the central Redwood Server.
Prerequisites
- Sufficient privileges to create the objects contained in the CAR file.
- You need the App_Administrator global privilege to import CAR files if the privilege has been enabled.
Importing Objects from CAR Files
A CAR file is located on a remote system, you would like to import it into Redwood Server. You have multiple choices, you can:
- Run the import wizard and use the file browser to upload the CAR file.
- Copy the file over to the target central Redwood Server and either use the import wizard or submit System_Import_Archive; specify the path to the file, for example
c:\\files\\Example.car
. - Copy the file to a web server, where it can be downloaded, and either use the import wizard or submit System_Import_Archive; specify the URL to the file, for example
http://prd1.example.com/Example.car
. - Use
api-tool.jar
(available in the Configuration > Software section), requires a connection file created withjsecret -c
; see examples for more information. - Use
curl
(curl.exe
on Windows) or any other client, requires a basic Authorization header which requiresbase64
or Powershell.
Specifying CAR Files to Import in the Import Wizard
The following table lists the fields on the Specify CAR file tab of the import wizard
Field | Use |
---|---|
Upload file to server | Choose the Browse button to navigate to the file and open it, the file is uploaded to the server. You use the shell (explorer.exe on Windows, for example) to navigate to the file, any CAR file accessible to the shell that you can browse to can be specified, this includes UNC paths (SMB shares). On Apple macOS and other UNIX-like systems, for example, the shell allows you to access SMB, NFS, and FTP shares seamlessly. |
File on server | You specify the full path to the file, or use a JobFile expression. (see below) |
URL | You specify a URL (FTP, HTTP, HTTPS) to the file. (See below) |
Uploaded file: | This field is only shown when you previously uploaded a file and return to the Specify the CAR file tab, its value is the filename of the uploaded file. |
When you specify CAR files, you can use the following syntaxes:
- File on server
- Native (local, NFS, SMB share) -
C:/car/import.car
orC:\\car\\import.car
on Windows and/opt/car/import.car
on UNIX - UNC -
\\\\samba.example.com\\shared\\car\\import.car
or//samba.example.com/shared/car/import.car
(The central Redwood Server must reside on Windows, see note below) - JobFile expression -
JobFile:<process_ID>:<shortname>
<process_ID>
- the ID of the process that has the CAR file as an output file<shortname>
- the short name of the process output file. The short name of a CAR file previously imported with System_Import_Archive will becarin.car
.
- Native (local, NFS, SMB share) -
- URL
-
file://
-file://C:/car/import.car
, orfile:///opt/car/import.car
(note the three forward slashes (/
) on UNIX). - UNC -
file:////samba.example.com/shared/car/import.car
(Note the four forward slashes (/
). The central Redwood Server must reside on Windows, see note below); use of the File on server field is recommended, as this allows you to browse to the file to avoid typos in the path. ftp[s]://
- anonymous or with the username and password specified in the URL, likeftp://jdoe:secret@ftp.example.com/pub/car/import.car
. If your client is running on Apple macOS or UNIX, it is recommended to browse to the file to avoid typos. If you are usingFTPS
, the Redwood server must trust yourFTPS
certificate.http[s]://
-http://share.example.com/car/import.car
, you may encode the username/password in the URL, depending on the web server. If you are usingHTTPS
, the Redwood server must trust theHTTPS
certificate.
-
note
Note that the user the JEE server runs as needs to have access to the share. If the central Redwood Server is running on Windows, ensure it is not running under local System account (NT Authority\System
), as that user has no access to network shares.
note
Microsoft Windows accepts forward slashes (/
) instead of backslash (\
) in paths as long as the command used with the path does not use old-style parameters like /?
. Since backslash is a special character in a lot of programming languages, Redwood strongly recommends the use of the forward slash over the backslash when you are not programming in Windows Command (CMD) / Batch (BAT).
warning
When you use FTP or HTTP with authentication, the password is sent in clear text over the network.
Specifying Import Rule Sets in the Import Wizard
The import wizard enables and/or disables certain fields in the Import Rule Set tab according to settings in your remote systems. This allows you to control which CAR files can be imported and into which partitions the CAR files can be imported. Note that the System_Import_Archive process definition only allows you to specify an import rule set, no checks are done at submit time.
The wizard will enable the Use Import Rule Set field which allows you to specify an import rule set if any of the following is the case:
- There is no source remote system in the GLOBAL partition that matches the source system as specified in the CAR file
- The matching source remote system in the GLOBAL partition allows its import rule set to be overridden
The Import all objects into Partition field is enabled if there is at least one partition which either has no source remote system, or the source remote system matches the source of the CAR file and allows its import rule set to be overridden. Note that this option creates a temporary import rule set that is used to set the partition of all imported objects. If your CAR file contains objects that must reside in the GLOBAL partition, such as the System_Defaults_System process definition, for example, then the import will fail.
The Use Remote System Import Rule Set is enabled if there is at least one source remote system that matches the source system in the CAR file. Multiple entries will be available if there are more than one source remote system whose name matches the name of the source system in the CAR file, the remote systems specify different import rule sets and at least one does not allow its rule set being overridden.
The Use embedded Import Rule Set with Target Partition is only enabled when the CAR file contains an import rule set and no matching source remote system exists, or the matching source remote system allows its import rule set to be overridden.
Setting the Partition
When you import CAR files, you can specify the target partition for the objects. When you set a target partition, all partitionable objects will be set into the partition.
Setting the Name of the Import in the CAR file
You set the App-Description
property in the META-INF/MANIFEST.MF
of the CAR file to set the name of the import. The default import name is Import definitions from: <car_file_name>
.
Context-Menu
Imports support the following context-menu actions:
Action | Description |
---|---|
Delete | Delete the import |
Edit | Edit the import |
Show permalinks | Show links that can be used from third party applications to link to the object |
Submit Import Job | Submits an import job |
Filter > New Filter | Create a new import filter |
Filter > Edit Filter | Edit current import filter |
Filter > Delete | Delete current import filter |
Filter > Duplicate Filter | Create a copy of the filter |
Filter > Export Filter | Export the filter into a CAR file |
Filter > Add to navigation bar | Add the filter to a navigation bar |
Filter > Create filter from search | Create a filter from the current IntelliSearch query |
Procedure
Using Imports
- Navigate to "Promotion > Imports".
- Choose Import from the context-menu.
- Fill in the location of the CAR file.
- Choose Save & Close.
Using Import Rule Sets
- Navigate to "Promotion > Imports".
- Choose Import from the context-menu.
- Fill in the location of the CAR file and specify an import rule set to narrow down the imported objects.
- Choose Save & Close.
Example
Importing Objects with System_Import_Archive
A local CAR file contains process definitions that need to be imported. The CAR file is located in D:\\data\\definition.car
. You do not require import rules for these process definitions.
- Navigate to "Definitions > Processes".
- Choose Submit from the context-menu of the process definition System_Import_Archive.
- Fill
D:\\data\\job_definitions.car
into the File field. - Choose Submit.
See Also
- Migrating Objects with the Promotion Module
- Importing Objects
- Importing Objects with Import Rule Sets
- Export Rule Sets
- Creating Export Rule Sets
- Exporting Redwood Server Objects
- Promoting Objects with Remote Systems
Import