Integrate Software AG Products Using Digital Event Services : MashZone NextGen Help : Appendix : Legacy Presto components : Mashables and Mashups : Mashups in MashZone NextGen Wires : Creating Mashups in Wires : Add If/Else Conditions : If/Else Examples
If/Else Examples
This first example shows a mashup with very simple if/else logic based on the incident type for traffic issues:
The"if clause" consists of a single Transformer block that executes if there is at least one issue from construction and builds the mashup result from those issues.
The"else clause" also consists of one Transformer block that executes if there are no issues from construction and builds somewhat different results.
Only one of the Transformer blocks will execute when the mashup is run, so the Merge block simply makes sure that the results that are actually generated become the mashup results.
The next example has multiple conditions based on a user selecting either one of three specific job types or selecting no job type.
There are three"if clauses" which consist of a Filter block to filter the list of jobs to jobs of a type that matches the input parameter. The execution conditions for each Filter block check to see if the value of the input parameter matches the job type for this Filter block. If so, the filter executes.
The"else" clause is the final Filter block. In this case, the execute condition for this Filter block tests to make sure that the value of the input parameter is not one of the three job types covered by the other Filter blocks.
Merge makes sure that the results from whichever Filter block actually executes is used and this becomes the input to a calculation. The final output of the mashup is built in the Document block, mapping fields to the various calculations.
Copyright © 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback