Business Process and Data Transformation Language Reference
<switch>
|
|
<switch> <case> ... </case> ... <default> ... </default> </switch>
Attribute or Element | Description |
---|---|
name, disabled, xpos, ypos, xend, yend attributes | See “Common Attributes and Elements.” |
<annotation> element | |
<case> element | Required (at least one). Each <case> element defines a condition that may or may not be true. |
<default> element | Optional. Specifies the action to take if no <case> condition is satisfied. If present, must appear last in the <switch> element. |
<switch name='Approved?'> <case name='No PrimeRate' condition='context.PrimeRate=""'> <assign name='Not Approved' property="response.IsApproved" value="0"/> </case> <case name='No Credit' condition='context.CreditRating=""'> <assign name='Not Approved' property="response.IsApproved" value="0"/> </case> <default name='Approved' > <assign name='Approved' property="response.IsApproved" value="1"/> <assign name='InterestRate' property="response.InterestRate" value="context.PrimeRate+10+(99*(1-(context.CreditRating/100)))"> <annotation> <![CDATA[Copy InterestRate into response object.]]> </annotation> </assign> </default> </switch>