Forum Discussion
njseq
Altostratus
Nov 07, 2019VPE customization multiple branches
Hello, I'm using VPE to create a workflow with several conditions, and I cannot have 2 exit branches for the same item. Like this image. So from a Browser Check item I have Successful and Fallba...
- Nov 08, 2019
Hi
You can add your Browser Check and Message Box into a Macro. Then, as long as they finish pointed at the same Ending then you can continue onto to your cert check. Something like...
Hi,
The catch command already executes the wrapped expression. So you could use [catch { eval $cmd } myresult]. Wrapping eval $cmd in square braces executes the output of eval again resulting in the invalid command name. Here's a version which should work and not require escaping the characters in the command:
when HTTP_REQUEST {
set cmd {if { [HTTP:uri] starts_with "/hello" }{ log local0.alert "match!!!" }}
if { [catch {
eval $cmd
} myresult] != 0 } {
log local0. "My rule failed: $myresult, \$cmd: $cmd"
} else {
log local0. "My rule succeeded: $myresult, \$cmd: $cmd"
}
}
That said, why do you want to use catch for this? catch handles errors, but it's not too likely that you'd get a runtime error with that anyhow.
Aaron
- Faruk_AYDINSep 17, 2019
Altostratus
use his iRule :
when HTTP_REQUEST { if { ([string tolower [HTTP::host]] eq "test.abc.com") && ([string tolower [HTTP::uri]] eq "/psp/ps/?tab=abdc_guest") } { HTTP::redirect "https://prod.abc.com/psp/ps/?cmd=login" } }