Import/Export problems
In PackOS besides adding problems manually we've got the possibility to import them from a prepared csv file. This allows you to speed up your configuration work with machines.
File format
Problems are imported and exported as CSV files.
Details of file format:
CSV,
Field separator: ';' (semicolon)
Value quoting: optional with '“' (double quotes)
Row ending: CRLF (DOS)
Mandatory header row
Columns:
Column name | Type/values | Optionality | Version | Description | |
---|---|---|---|---|---|
1 | WorkStateName | One of: | Required |
| Name of the work state |
2 | Name | text | Required |
| Canonical (English) name of the problem. |
3 | RuleType | One of: | Optional | 3.14+ | Determines a format of the RuleBody:
|
4 | RuleBody | text
| Optional |
| PackOS rule or C# expression as determined by RuleType. See above links. If there are multiple rows with the same Name and different RuleBody a single Problem will be created or updated and each listed rule will be added to the Problem |
5 | RulePriority | number (integer), non-negative | Optional |
| Rule priority. Determines the order of rule evaluation. |
6 | RuleDisabled | True/False | Optional | 3.18+ | If rule is disabled. |
7 | TaxonomyCode | text | Optional | 3.18+ | Code name of a problem taxonomy, e.g. OeeLossType |
8 | TaxonomyNodeCode | text | Optional | 3.18+ | Code name of a problem taxonomy node, e.g. PerformanceLoss |
9 | IsDefault | True/False | Optional |
| If the problem is the default problem for its work state. |
Each record has 3 parts:
Problem part: WorkStateName, Name, IsDefault
For the purpose of import/export each problem is uniquely identified by (WorkStateName, Name).
If there are multiple records for the same problem their additional values (IsDefault) must be consistent, otherwise the result of import will be unpredictable.
If existing problem with the same (WorkStateName, Name) is found it will be updated. Otherwise a new problem will be defined.
Import is additive: no existing problems are removed during import.
Rule part: RuleType, RuleBody, RulePriority, RuleDisabled
If present, a rule will be added or updated.
For the purpose of import/export each rule is uniquely identified by (WorkStateName, Name, RuleBody), where (WorkStateName, Name) identify the result problem of the rule.
If existing rule with the same result problem and body is found it will be updated. Otherwise a new rule will be defined.
Import is additive: no existing rules are removed during import.
Taxonomy assignment part (3.18+): TaxonomyCode, TaxonomyNodeCode
If the columns are not present (pre 3.18 format) the taxonomies will not be updated.
On import taxonomy assignments will be grouped by their respective problem (WorkStateName, Name) and all taxonomy assignments for each problem listed in the import file will be replaced.
In particular it means that if a problem is listed in the import file without any taxonomy assignements specified, all its existing taxonomy assignments will be removed.
Examples:
prior to 3.14:
3.14+:
3.18+:
Usage of the import and export of problems
Path: Plant configuration → Problems → select Line
Normal usage:
1. Export problems
2. Based on exported file, change or add The problem file (one or more records)
3. Import the new file
4. Import problems are being added
System will recognize if the problem exists already (then it will present an “updated“ message and replace the old data) or if it’s the new one, will add it to the direct problem list.