Specify property values
In a simulation, step properties represent the relevant elements of a message, such as a header, payload, or name. You can use rules and values to define these step properties. For example, you can insert, verify, or save data. You can also trigger a service by comparing a value. Values can be either static or dynamic.
This topic shows practical examples of how to specify property values in your simulations. The examples also explain which steps properties work with which values.
Use multiline values
YAML uses indentation instead of indicators to mark the structure. This is essential when you use multiline values. Make sure these values are indented under the property.
In this example, you can see an indented multiline payload value.
schema: SimV1
connections:
- name: http
services:
- name: Welcome
steps:
- name: Request
- name: Response
message:
payload:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<wsse:Security soapenv:mustUnderstand="false" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>acs_devel_111</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
<wsa:To>http://sensetrunkcn1:1080/STS/services/SecurityTokenService</wsa:To>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>urn:uuid:9667500f-4751-46c3-bb2a-5a2c27f757c6</wsa:MessageID>
<wsa:Action>http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue</wsa:Action>
</soapenv:Header>
Escape special characters
To use the special characters {, }, [, ], *, and " as text in your simulations, escape them so they're treated as part of the text string. You can escape single characters or entire strings.
Use double quotation marks " before and after the character or string.
In this example, you want to use the value {[Hi]} as plain text. Therefore, you enter "{[Hi]}".
Escape double quotation marks
The double quotation mark " requires an additional quotation mark to indicate that the subsequent " is part of the actual string and not the end of an escaped string.
In this example, you want to use the value {"Text"} as plain text. Therefore, you enter "{""Text""}".
Use dynamic values
You can automatically generate dynamic values at runtime based on your predefined specifications. Use these types of dynamic expressions in your simulations:
-
Buffer values – Reuse temporarily stored values for comparisons or calculations in different parts of your simulation to increase efficiency and consistency.
-
Date and time values – Generate and use dates and times automatically. For example, use the current date as a unique identifier for messages to ensure time-sensitive data handling.
-
Calculations – Delegate complex mathematical operations to your simulation.
-
Random values – Generate random numbers or strings. For example, test workflows where specific values aren't crucial. This provides a robust method for stress testing and variability.
-
Regular expressions – Use pattern matching to find, replace, or validate strings within your simulation for accurate and flexible text processing.
-
Data resources – Integrate and use external data from resources such as CSV tables to provide enriched and contextually relevant simulation data.
-
Variables – Work with confidential data in your simulations without exposing sensitive information to other users.
-
Replacement values – Run a simulation even if a specific dynamic value can't be found. The simulation uses a replacement value instead to ensure continuity.