Designing and Implementing Business Process Models 10.5 | Designing and Implementing Business Process Models | Working with Business Rules in My webMethods | Using CSV Import | CSV Formatting
 
CSV Formatting
The following describes how data in the CSV file must be formatted.
For instructions on how to import a CSV file, see Importing a CSV File.
Separator
Use ; (semicolon) as separator.
Example: =North;=yes;=SupportTeam;>= 300;=GROUPS[ServiceCenterNorth]
Header Line
The first line of the CSV file must be a header line. The number of values in the header line must match the number of columns in the target decision table, with exception of the In effect column.
Example: targetGroup;isVIP;team;score;assignee
for a decision table with 5 columns and 1 In effect column.
CSV Data Contains Separator
If a value in the CSV file contains the separator character ; (semicolon), the whole value must be wrapped in double quotes "".
Example: = North;East must be written as "= North;East".
CSV Data Contains Double Quotes
If a value in the CSV file contains a double quote, the whole value must be wrapped in double quotes "", and a double quote " must be prepended to each double quote in the value.
Note: Excel does this automatically when saving as CSV.
Example: != Team "VipCustomers" North must be written as
"!= Team ""VipCustomers"" North".
CSV Data Contains Line Break
If a value in the CSV file contains a line break, the whole value must be wrapped in double quotes "".
Example:
= North
East
must be written as
"= North
East".
Whitespace
Whitespace before or after a CSV value will be trimmed during import.
Example: ;>= 5;, ; >=5;, or ;>=5 ;
will all be imported as operator >= and literal 5.
Decimal Separator
Use . (dot) as decimal separator.
Example: > 3.141592
UTF-8 Characters
Values containing UTF-8 characters can be imported without any special considerations.
Example: = Ɣ
Date Columns
If the target decision table contains a column of data type Date, the corresponding value in the header line must contain the date pattern and timezone information. For more information about time formats, see the Java documentation for SimpleDateFormat.
Example:
targetGroup;isVIP;team;incidentSubmission[dd/MM/yyyy HH:mm:ss|Europe/Berlin];score;assignee
(values for header line)
=North;=yes;=SupportTeam;>=31/10/2019 18:00:00;>= 300;= GROUPS[ServiceCenterNorth]
(values for rule)
Expressions
If you import an expression into a decision table, the expression must be wrapped in $[].
Example: = isLeapYear(2015) must be written as = $[isLeapYear(2015)].
If an expression contains
*a double quote, the whole value must be wrapped in double quotes "", and a double quote " must be prepended to each double quote in the value.
*a semicolon, the whole value must be wrapped in double quotes "".
*a line break, the whole value must be wrapped in double quotes "".
Note: Excel does this automatically when saving as CSV.
Example: For example, an expression containing a double quote and a semicolon,
e.g. = inList({"North;East", "APAC", "East"})
must be written as
"=$[inList({""North;East"", ""APAC"", ""East""})]".
Principals
If the target decision table contains a column which was annotated as principal, you can specify any combination of users, groups, and roles. The CSV value must be formatted as follows:
= USERS[userId1] GROUPS[groupId1] ROLES[roleId1]
If more than one user, group, or role is specified, they must be separated by a comma:
=USERS[userId1,userId2] GROUPS[groupId1,groupId2] ROLES[roleId1,roleId2]
Principals from a directory service such as LDAP must follow their backend-specific notation (e.g., cn=James,ou=marketing,o=ABC). For more information, see Administering My webMethods Server, Managing External Directory Services.
If a user ID itself contains a comma, the comma must be escaped by a backslash \.
Example: = USERS[cn=James\,ou=marketing\,o=ABC],
= USERS[userId1,cn=James\,ou=marketing\,o=ABC]
If a user ID itself contains a semicolon or double quote, the whole value must be wrapped in double quotes "", and a double quote " must be prepended to each double quote in the value.
Example: = "USERS[Tom ""T"" Miller,cn=James;Smith\,ou=marketing\,o=ABC]"
Example of a CSV File
The following is an example of a CSV file to be imported into a decision table that contains 5 columns and 1 In effect column:
targetGroup;isVIP;team;score;assignee
= North;= no;=SupportTeamVIP;> 0.50;=GROUPS[082358North]
= East;= no;=SupportTeamVIP;> 0.50;=GROUPS[082379East]
= East;= yes;=SupportTeamVIP;> 0.70;=USERS[Supervisor]

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.