Unit Test for Flow Outputting a Multiline String
Comments
-
Note: currently using version 3.2.0 Revision 26300M, so this may not be an issue in newer versions.
I have a flow which, as its input, takes in a custom structure with many different properties. The flow then builds up a string of HTML, based off of the properties of the input structure (usually using step AppendHTMLLine and a mapping type of Text Merge.HTML" to apply some special formatting for each property). The flow then outputs this large HTML string.
When adding a test under "Flow Unit Tests"
-
The best solution here is to write your HTML explictly using an nVelocity merge step. Here is a link to the document describing its use. http://documentation.decisions.com/advanced-text-merge-using-the-nvelocity-component/
You can create your HTML and then use $variableName to create parameterized inputs. This step respects html tags the most out of all of Decisions merge types. After creating this merge you can just pass the output string to whereever you need to map it to, there is no need for an additional merge step.
The best way to view the raw HTML being created is to pass the output of the nVelocity step to a log step and then open the logs and validate the html being created. You could also use a create file step and pass the html text into it. The debugge hides all HTML/XML/JSON tags from view by default.
Howdy, Stranger!
Categories
- 4.1K All Categories
- 61 General
- 11 Training
- 201 Installation / Setup
- 1.1K Flows
- 106 Rules
- 260 Administration
- 212 Portal
- 489 General Q & A
- 693 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 178 Pages
- 5 Process Mining
- New Features
- 178 Datastructures
- 69 Repository
- 219 Integrations
- 28 Multi-Tenant
- 27 SDK
- 76 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 66 Lunch And Learn Questions