Tips & Tricks

Parameters transfer

GUI

EXPORT

Mass parameter export (file format: XLSx)

Let's go through this process step by step. First log in to application using your login and password.

Then from main view go to Parameter screen:

Here you may select all parameters available in your view (by checking checkbox 1) or select only few parameters by checking only selected checkboxes in column with number 2.

When at least one parameter is selected, then button (3) on the right site of toolbar will be active. If any parameter is selected, the button "Selected (0)" act as a counter of selected parameters. X symbol next to it (on the right) allows to uncheck all selected elements:

To export selected parameters click on the button (3) and from dropdown list select Mass export to XLSx.

First zip file will be generated:

Then download will be available:

In mentioned zip file user will find XLSx file for every checked parameter.

Single parameter export

First log in to application using you login and password.

Then from main view go to Parameter screen:

Then parametr list will be shown where all parameter available in your current view are visible.

Click on the name of parameter, which you wish to export. That action will cause opening parameter information screen:

Here you may not only, implement any changes but also export parameter as XLSx file, by making an action from dropdown list (1) on the right and click Export do XLSx.

Window with information about creating XLSx file will appear:

And when XLSx file will be created - download will be available:

Export of multiple parameters (Superpack / Batch)

As said in user guide you may export any part of configuration including parameters by using batch export. Here we are gonna focus on how to create a batch export of any number of parameters as needed from every region and version that should be considered.

First log in to application.

Then go trough toolbar to batch export screen:

Here you will create your batch (also called a superpack) by using any steps of export you need. On the screen below you will see two sections. Section with number 1 is list of available steps to create batch and section 2 is list of selected steps and configuration set for those steps.

LoadParams

From the beginning, let's export batch with parameters from current view only.

Add Step LoadParams from list (2)

Now in section 2 settings for that step should be visible:

In the bottom part there are filters which may be applied in basic version which allows to filter all available parameters by part or full name.

You may apply full filter:

That functionality allows you to select only those parameters filtered by name , level code, Tag, assigned Region or even last "modified by". Whats more while creating superpack you may narrow your export to only those changes - published in defied period of time.

For filters: Levels, Tags, Region and Modified by to apply filters on your export, click + and to remove filter click sign X next to filter name.

When all your demand are applied on LoadParams step you may Create pack

MultiLoadParams

Step MultiLoadParams should be used when you need to move parameters from one region and version to another. For example from R1/V1 to R1/V2, or R1/V1 to R2/V1 etc. (where R stands for a Region and V- Version)

Under every question mark you will find guidelines: how to fill every field.

First you need to provide information about environment you are going to import your snapshot:

All you need to do here is give region name (field 1), which must exist on your target environment, files and versions will be filled automatically.

Then in field (with number 2) select Region existing on your current environment - Hyperon app, within your Profile. Next step is: adding versions from which parameters will be exported. This step allows to export as many versions as you wish, the only limit is that, those region versions must be exported to one region (but may be exported to different versions).

In the example export is made from region TRM (1) to region TRM (2) on the target environment and:

  • version 1 from region TRM (TRM/1) will become version 2 region TRM (TRM/2) on target environment
  • version 2 from region TRM (TRM/2) will become version 3 region TRM (TRM/3) on target environment
  • version 3 from region TRM (TRM/3) will become version 1 region TRM (TRM/1) on target environment
  • version 4 from region TRM (TRM/4) will become version 4 region TRM (TRM/4) on target environment

Versions were filled automatically with version numbers selected as Version to.

The Region from with export is made does not have to have the same name as import Region. But import Region must exist on the environment to which you are importing.

If you need to use filters please read instructions in paragraph LoadParams.

EMPTY ENVIRONMENT:

Add all listed steps to your batch before loading parameters steps (to change order use drag&drop mechanism on steps list on the left part of your screen):

SetOnSystemErrorOnPack and SetOnBusinessErrorOnPack

In many steps while creating pack you will need to set OnSystemError and OnBusinessError, for your convenience we advice to add those two steps. Settings in those steps are global for created Batch and thanks to them you won't have to set those again and again in every step of export.

By default both are false.

Business Error may appear, for example, when in batch is requirement to import parameters to version which does not exist on target environment.

System Error appears when user finds corner case causing application error. If such appears please contact us :)

CreateProfile - Creates new profile in target environment. You need to give code for new Profile.

CreateRegion - Allows to create new region with one basic version.

CreateVersion - Creates new version on base of existing one (you need to point from which version the new one should be created)

SetProfile - Sets profile before starting following steps.

SetVersion - Sets version as My View before going further with import.

Set those steps in given order and make sure those are before loading parameters - LoadParams - step (to change order use drag&drop mechanism on steps list on the left part of your screen).

All necessary steps for batch export/import when database is empty (MultiLoadParams may be replaced with LoadParams):

Creating Superpack / Batch is as much plan for export as plan of import. Configuration of every step is as important as arrangement of those steps. Order of steps in superpack allows to prepare target environment even if in the beginning database was empty. Superpack steps should be set in order of import.

Export parameter (Snapshot)

Snapshot export screen by default is set to export whole configuration on current profile. That may be changed by user, by unchecking checkboxes next to selected elements of configuration. Below is an example of export for profile GROUP, where exported are only parameters from profile GROUP and all global parameters (which are not assigned to any region)

In section 1 you can see from which profiles export will be made, if there will be no profiles, then only global parameters (not assigned to any region) will be exported.

To add region, from list on the left choose region (by clicking on its name) and then click right turned arrow. If you want to remove profile from list "to export" click its name ale then left arrow. Section with number 2 is parameter export settings, here you may apply filters (remember that here filters work by the rule "starts with", which basically means that if you type "code" and add it as filter, only parameters with name starting with word "code" will be exported). Every filter must be added to snapshot configuration by clicking symbol + (3).

  • From session - if checked export will consider only changes in current user session.
  • Remove elements not included in snapshot (if checked) works on all elements, on target environment, which were filtered by definition of snapshot and while comparison were not found in snapshot file.

Full information about snapshot export you will find here : user guide.

IMPORT

XLSx file

If you want to import zip file including XLSx files (one or more) go to Parameterization/Parameters and select Import from XLSx

And in popup window select your zip file or single XLSx file.

If you want to import single XLSx file for selected parameter you may also do it from the level of detail information about parameter:


And then in popup window select your XLSx file.

Superpack / Batch

If you want to import batch/superpack go to Tools/Batch import and select your file.

Snapshot

Go to Tools/Snapshot import :

Before selecting your file, you may decide, if you want to autocommit changes (if all went without problems) and if you want to consider all set while export mechanisms (remove not in file and set filters) - these informations are included in json file.

If any problem occurred while import autocommit can't be done and you will have to go through report, if import goes right report window will be empty or all status will be Imported files and Skipped. If no Errors and Warnings were detected autocommit will proceed when report is closed.

REST

All above cases may be done by REST endpoints. It will be described below.

EXPORT

Superpack / Batch

Allows to download the exported package based on the provided template

Path

/api/superpack/download Example path usage: http://example.pl/hyperon/api/superpack/download

Parameters

file = 'templateNamePack'.xml in call header

Result

object response with code

  • 200 when export success, details saved in entity,
  • 500 when export fail, details saved in entity.
Example

'curl -v -X POST -F file=@pack-tmp2.xml -o mysuperpack.zip --user userName:userPasswd http://localhost:8080/hyperon/api/superpack/download'

Response body

Returns .zip package to download

Postman response example

Snapshot

Path (to 1.6.40 Hyperon Studio version)

/api/snapshot

Path (since 1.6.41 Hyperon Studio version)

/api/snapshot/export

Example path usage: http://example.pl/hyperon/api/snapshot/export

Method

POST

Produces

application/zip

Result

object response with code:

  • 200 when export success,
  • 500 when export fail.
Parameter "fromSession"
  • false - exports user's perspective. So it means both published and unpublished user's changes.
  • true - export only unpublished user's changes.
Response body

Request body is optional. If request body is empty, then export will try to fetch active profile from given user or all profiles in the system, if user has no active profile.

Postman response example

IMPORT

Superpack / Batch

Allows to load the indicated package

Path

/api/superpack/upload

Example path usage: http://example.pl/hyperon/api/superpack/upload

Parameters

file = 'fileName'.zip in call header

Result:

object response with code

  • 200 when import success, details saved in entity,
  • 500 when import fail, details saved in entity.
Example:

The file will be loaded - superpack_2016-02-26_15_03_14.zip
'curl -v -X POST -F file=@superpack_2016-02-26_15_03_14.zip --user userName:userPasswd http://localhost:8080/hyperon/api/superpack/upload'

Response body
Postman response example

Snapshot

Endpoint for Snapshot Import takes zip file the same way as superpack functionality does.

Path (to 1.6.40 Hyperon Studio version)

/api/snapshot

Path (since 1.6.41 Hyperon Studio version)

/api/snapshot/import

Example path usage: https://example.pl/hyperon/api/snapshot/import

Method

POST

Consumes

multipart/form-data

Result

object response with code

  • 200 when import success,
  • 500 when import fail.

Besides zip file api takes new parameters since 1.6.41:

  • autocommit - true / false (default). Informs the system, if after successful snapshot import, it should try to publish all imported changes, if there were any in user's session.
Example

'curl -i -X POST -F file=@example.zip -F autocommit=true --user username:password https://example.pl/hyperon/api/snapshot/import'

Response body
Postman response example