Specifying details for a Set Parameter element
- Select the Set Parameter element to display the Set Parameter Properties pane.
-
Specify this information:
- Name
- Specify a name for the Set Parameter element.
- Parameters to be set
- Click the + icon to
add one or more rows to the list of parameters to be set.
On each row, select a parameter name in the Name column. Each workflow parameter can be selected only once.
The Data Type column is automatically filled with the data type of the selected parameter.
The Assignment Type column is automatically filled with “Value” and the parameter is set with a default value specific to the data type.
Select a row to open the Set Parameter details panel. In this panel, you can change the Assignment Type and the values that are used in the assignment.
- Assign with
- Specify one of these assignment types:
- Value: The parameter is assigned with a fixed value.
- Parameter: The parameter is assigned with the value of another parameter.
-
Expression: The
parameter is assigned with an expression.
Only applicable for parameter types Integer, Decimal, Date And Time, String, and Hyperlink.
-
Person Name for Person
ID: The parameter is assigned with the value
of the Common
Name field that corresponds to the specified
Person ID in IFS.
Only applicable for Parameter type String. The Person ID can be retrieved from a parameter of type String or User.
- Value from Structure: The parameter is assigned with a value extracted or calculated from a structure.
Only applicable for Parameter types String, Boolean, Integer, Decimal, Date, Date and Time.
- Value
- This field is displayed if you specified the Value assignment type. Specify the fixed value that must be assigned to the parameter. This table shows an example:
Parameter Assign with Value Isvalid (boolean) Value True Isvalid (boolean) Value False - Value of Parameter
- This field is displayed if you specified the Parameter assignment type. Specify the parameter that must be assigned to the parameter. You can only select Parameters of the same type.
- Expression
- This field is displayed if you specified the Expression assignment type. Specify the expression that must be assigned to the parameter.
- For parameters of type integer and decimal, an expression consists of numeric parameters between brackets and operators. Valid operators are '+', '-', '*', and '/'. Additionally, parentheses can be used.
- To select from a list of available numeric parameters, press Ctrl+Spacebar. To select a parameter, use the arrow keys and press Enter, or use the mouse. To leave the list without selecting a parameter, press Esc.
- This table shows an example:
Parameter Assign with Value Profit (decimal) Expression [Salesprice] - [Purchaseprice] -
For parameters of types integer and decimal you can specify an expression using these operators:
ID()
to get the ID of the current workflow instance.MAJORVERSION()
to get the major version of the workflow definition.MINORVERSION()
to get the minor version of the workflow definition.FROMSTRING(string, decimal separator)
to convert a string to an integer or decimal. These are possible “decimal separator” values, without quotes:DOT
COMMA
You can nest the integer/decimals operators. Use square brackets for parameter placeholders.
To select from a list of available parameters, press Ctrl+Spacebar. To select a parameter, use the arrow keys and press Enter, or use the mouse. To leave the list without selecting a parameter, press Esc.
The expression is validated when you leave the input field. If the calculation fails at runtime, the original parameter value, or the value set in the previous steps, is kept.
This table shows examples of expressions with integer and decimal parameters types:
Parameter Assign with expression Result IntegerParameter(Integer) FROMSTRING(“The amount equals 200,000.00”, DOT) 200000 IntegerParameter(Integer) FROMSTRING("The amount equals 200,000.00", COMMA) 200 IntegerParameter(Integer) FROMSTRING(The amount equals 200,000", DOT) 200000 IntegerParameter(Integer) FROMSTRING("The amount equals 200000.59", COMMA) 20000059 IntegerParameter(Integer) FROMSTRING("20.07.2022 the amount is 200,000.59.", DOT) Exception. The default value, that is, the initial value or the value set in the previous steps, is set. IntegerParameter(Integer) FROMSTRING("20.07.2022 the amount is 200,000.59.", COMMA) 20072022200 DecimalParameter(Decimal) FROMSTRING("The amount equals 200,000.59878", DOT) 200000.59878 DecimalParameter(Decimal) FROMSTRING("The amount equals 200,000.59", DOT) 200000.59 DecimalParameter(Decimal) FROMSTRING("The amount equals 200 000.59", COMMA) 20000059.00 DecimalParameter(Decimal) FROMSTRING("As a result of 1, 2, and 3 quarters, the amount is 200 000,59", DOT) Exception. The default value, that is, the initial value or the value set in the previous steps, is set. -
For parameters of type string and hyperlink, an expression consists of these elements:
- String constants
- String parameters
- Parameters of type hyperlink, code, or integer
- Operators
The parameters of type hyperlink, code, and integer are automatically converted to strings when the expression is evaluated.
You can use these operators:
- Ampersand (
&
) to concatenate two or more strings. SUBSTRING(string, start index, length)
to extract a substring.REPLACE (string, substring, replacement)
to replace all occurrences of substring.TRIM(string)
to trim beginning and ending white spaces. White spaces are Space, Tab, and Enter.GETLAST(string, length)
to extract the last characters of a string.TOUPPERCASE(string)
to convert the whole string to uppercase.TOLOWERCASE(string)
to convert the whole string to lowercase.NAME()
to get the workflow definition name for the current workflow.SOURCETYPE(string)
to get the source type that started this workflow.Possible source types:
- Manual
- Alert
- Process.Workflow BOD
- Workflow
- Activation PolicyNote: When a workflow is started from a document flow, the source type is Process.Wokflow BOD.
SOURCE(string)
to get the identifier of the source that started this workflow instance. Depending on the source type, one of these identifiers is retrieved:- The user identifier
- The alert ID
- The logical ID of the Process.Workflow BOD
- The Activation Policy name
- The workflow definition name
FROMNUMBER (integer/decimal, decimal separator, digit grouping symbol, decimal places)
to convert a decimal/integer to a string.- Possible “decimal separator” values, without quotes,
are:
DOT
COMMA
- The "digit grouping symbol" value can be any string.
- The value of "decimal places" can be a whole number from 0 to 9. Using parameters is not possible.
- Possible “decimal separator” values, without quotes,
are:
You can nest the string operators. Use square brackets for parameter placeholders and double quotes for constant string values.
To select from a list of available parameters, press Ctrl+Spacebar. To select a parameter, use the arrow keys and press Enter, or use the mouse. To leave the list without selecting a parameter, press Esc.
The expression is validated when you leave the input field. If valid expressions are defined that fail at runtime, the workflow execution fails in this set parameter step. These are examples of failures:
- A parameter used in an expression has not been initialized and has value NULL.
- The result of a concatenation is a string with more than 4000 characters.
This table shows examples of expressions with strings:
Parameter Assign with expression Result Prefix(string) SUBSTRING("abcde", 1, 3) “abc” TestX(string) REPLACE("a_ba_ca_", "a_", "x") “xbxcx” Link(hyperlink) “http://” & [Prefix] & “.com” “http://abc.com” Address(string) [Street] & SUBSTRING([AddressLine], 1, 3) Value of Street concatenated with the first three positions of the AddressLine FromDecimal(string) FROMNUMBER(200000.59, DOT, ”,”, 3) "200,000.590" FromDecimal(string) FROMNUMBER(200000.5, COMMA, ”/”, 2) "200/000,50" FromInteger(string) FROMNUMBER(200000, DOT, ”,”, 1) "200,000.0" FromInteger(string) FROMNUMBER(200000, COMMA, ”,”, 2) "200,000,00" -
For parameters of type date you can specify an expression using these operators:
PLUS(date, number, UNIT)
to add several days, months, or years. Possible UNIT values,without quotes:DAYS
MONTHS
YEARS
MINUS(date, number, UNIT)
to subtract several days, months, or years. Possible UNIT values, without quotes:DAYS
MONTHS
YEARS
TODAY()
to receive the current dateFROMDATETIME(date and time)
to extract the “Date” part from the Date and Time parameterSTARTOFMONTH(date)
to receive the first day of the monthENDOFMONTH(date)
to receive the last day of the monthSTARTOFYEAR(date)
to receive the first day of the yearENDOFYEAR(date)
to receive the last day of the year
You can nest the date operators. Use square brackets for parameter placeholders.
To select from a list of available parameters, press Ctrl+Spacebar. To select a parameter, use the arrow keys and press Enter, or use the mouse. To leave the list without selecting a parameter, press Esc.
The expression is validated when you leave the input field. If the calculation fails at runtime then the original parameter value, or the value set in the previous steps, is kept.
Note: Date is based on epoch time (milliseconds after Jan 1, 1970, midnight GMT). Therefore, the results of the calculation cannot be earlier than this date. When, the calculation returns a date before 01.01.1970 the value 01.01.1970 is returned as the result.This table shows examples of expressions with dates:
Parameter Assign with expression Result Yesterday(date)
MINUS(TODAY(), 1, DAYS)
The current date is calculated and decreased by one day. CenturyAgo(date)
MINUS([Date parameter], 100, YEARS)
If the Date parameter equals 31.01.2022 then the result is 01.01.1970. MonthForward(date)
PLUS([Date parameter], 1, MONTHS)
If the Date parameter equals 31.01.2022 then the result is 28.02.2022. DatePart(date)
FROMDATETIME([Date and Time parameter])
If the Date and Time parameter equals 01.08.2022 15:00:00 then the result is 01.08.2022. EndOfTheMonth(date)
ENDOFMONTH([Date parameter])
If the Date parameter equals 01.08.2022 then the result is 31.08.2022. StartOfTheYear(date)
STARTOFYEAR([Date parameter])
If the Date parameter equals 01.08.2022 then the result is 01.01.2022. For parameters of type date and time you can specify an expression using these operators:
NOW()
to receive the current date and time as UTC.STARTTIME()
to receive the time when this workflow instance was started, as UTC time.PLUS(date and time, number, UNIT)
to add several seconds, minutes, hours, days, months, or years. Possible UNIT values, without quotes:SECONDS
MINUTES
HOURS
DAYS
MONTHS
YEARS
MINUS(date and time, number, UNIT)
to subtract several seconds, minutes, hours, days, months, or years. Possible UNIT values, without quotes:SECONDS
MINUTES
HOURS
DAYS
MONTHS
YEARS
STARTOFMONTH(date and time)
to receive the start of the first day of the monthENDOFMONTH(date and time)
to receive the end of the last day of the monthSTARTOFYEAR(date and time)
to receive the start of the first day of the yearENDOFYEAR(date and time)
to receive the end of the last day of the year
You can nest the date and time operators. Use square brackets for parameter placeholders.
To select from a list of available parameters, press Ctrl+Spacebar. To select a parameter, use the arrow keys and press Enter, or use the mouse. To leave the list without selecting a parameter, press Esc.
The expression is validated when you leave the input field. If the calculation fails at runtime then the original parameter value, or the value set in the previous steps, are kept.
Note: Date and time is based on epoch time (milliseconds after Jan 1, 1970, midnight GMT). Therefore, the results of the calculation cannot be earlier than this date and time. If the calculation returns date and time before 01.01.1970 00:00:00, then the value 01.01.1970 00:00:00 is returned as the result.This table shows examples of expressions with date and time parameters:
Parameter Assign with expression Result Yesterday(date and time)
MINUS(NOW()1, DAYS)
The current date and time is calculated and decreased by one day. MonthForward(date and time)
PLUS([Date and time parameter], 1, MONTHS)
If the Date and time parameter equals 31.01.2022 15:00:00 then the result is 28.02.2022 15:00:00. EndOfTheMonth(date and time)
ENDOFMONTH([Date and time parameter])
If the Date and time parameter equals 01.08.2022 15:00:00 then the result is 31.08.2022 23:59:59. StartOfTheYear(date and time)
STARTOFYEAR([Date and time parameter])
If the Date and time parameter equals 01.08.2022 15:00:00 then the result is 01.01.2022 00:00:00. - Person Name for Person ID
- This field is displayed when you specified the Person Name for Person ID assignment type. Select a parameter that contains the person ID for which the user name should be retrieved. Any parameter of type string or User, other than the parameter to be assigned, is displayed and can be selected.
- The selected parameter contains a valid person ID. The result of this assignment is the value of the Common Name field from IFS, corresponding to this person ID. The person ID can be obtained from the completion properties of a previous user Task, or as an input parameter to the workflow.
- The selected parameter does not contain a valid person ID, or there was an error retrieving the user name from IFS. The result of this assignment is the value of the parameter selected for the Person ID field.
- Two users with the same name in a company can cause confusion. We recommend then to show the user name and the person ID in subsequent Tasks or Notifications.
- This table shows an example:
Parameter Assign with Person Name for Person ID UserName (string)
Person Name for Person ID UserID (string, user)
- Function
- This field is displayed if you specified the Value from Structure assignment type. Depending on the parameter data type, a pre-defined set of functions is available. You must select one function to apply. The function is applied to the element of the structure that is selected in the Path property. If the function does not return a valid result, then the parameter is assigned with the Default Value specified.
- This table shows the functions available for each data type:
Parameter type Function Result Boolean Get field value Returns the field value that is specified in the path. Possible results are "True" or "False". If there are no occurrences of this field, then the Default Value is returned. Date or DateAndTime Get field value Returns the field value that is specified in the path. The result is a Date or a DateAndTime value. If there are no occurrences of this field, then the Default Value is returned. Maximum value From all field occurrences that are specified in the path, returns the one with the highest value. This is the latest date value. If there are no occurrences of this field, then the Default Value is returned. Minimum value From all field occurrences that are specified in the path, returns the one with the lowest value. This is the earliest date value. If there are no occurrences of this field, then the Default Value is returned. Decimal Get field value Returns the field value that is specified in the path. The result is a decimal value. If there are no occurrences of this field, then the Default Value is returned. Maximum value From all field occurrences that are specified in the path, returns the one with the highest value. If there are no occurrences of this field, then the Default Value is returned. Minimum value From all field occurrences that are specified in the path, returns the one with the lowest value. If there are no occurrences of this field, the Default Value is returned. Average value Calculates the average from all field occurrences that are specified in the path. If there are no occurrences of this field, then the Default Value is returned. Sum of values Calculates the sum of all field occurrences that are specified in the path. If there are no occurrences of this field, then the Default Value is returned. Integer Get field value Returns the field value that is specified in the path. The result is an integer value. If there are no occurrences of this field, then the Default Value is returned. Maximum value From all field occurrences that are specified in the path, returns the one with the highest value. If there are no occurrences of this field, then the Default Value is returned. Minimum value From all filed occurrences that are specified in the path, returns the one with the lowest value. If there are no occurrences of this field, then the Default Value is returned. Count values Counts all occurrences of the field or level that is specified in the path. If there are no occurrences of this field, then the value zero is returned. Sum of values Calculates the sum of all field occurrences that are specified in the path. If there are no occurrences of this field, then the Default Value is returned. String Get field value Returns the filed value that is specified in the path. The result is an integer value. If there are no occurrences of this field, then the Default Value is returned. Concatenate values Returns the concatenated string of all occurrences of the field that is specified in the path. Delimited by the string that is specified in the Separator property. If there are no occurrences of this field, then the empty string is returned. If the concatenated string values exceed a total length of 4000 characters, then the execution of the workflow instance fails. An error message is displayed in the workflow instances manage screen.
- Path
- This field is displayed if you specified the Value from Structure assignment type and is used in combination with the selected Function. You must specify a path in a structure on which the selected function is applied. To specify a path:
- Click zoom … next to the Path field. A dialog box, where all workflow structures are listed, is displayed.
- Expand the structure from which to make a selection. The structure fields and levels are displayed. Only the fields that have the same data type as the parameter in the assignment have a selection option next to them. Select an option to specify which field to use. At the bottom of the dialog, the path to the field is displayed. By default, the function applies to all occurrences of the field with this path from the workflow structure.
- Optionally select one level from the path to the selected field. You can specify a filter for the level. This table shows the options:
Option Effect All This is the default option. This means all occurrences of this level and its children are taken into consideration when the function is applied. First Only the first occurrence of this level and its children is taken into consideration when the function is applied. Last Only the last occurrence of this level and its children is taken into consideration when the function is applied. Parameter When selecting this option, you must also select a parameter of type Integer. Set the specified parameter with a value that can be used as an index in the structure. Do this before the Set Parameter step is reached. Only the occurrence with the index that is specified in the integer parameter is taken into consideration when the function is applied. The first occurrence in a structure has index 1. If the index is out of bounds, the Default Value corresponding to the selected function is returned. - Click OK to confirm the path selection and return to the workflow model screen.
- Default Value
- This field is displayed if you specified the Value from Structure assignment type and is used in combination with these functions:
- Get field value
- Maximum value
- Minimum value
- Average value
- Sum of values
- You must set this field to the value of the same data type as the parameter in the assignment.
- Separator
- This field is displayed if you specified the Value from Structure assignment type and used it in combination with the "Concatenate values" function for parameters of type String.
- You can specify any string in this field. The specified string is used to delimit concatenated values. Empty string or spaces are also allowed as separator.