Tuesday, June 14, 2016

TIBCO BW/BE get all the global variables in a project

Go in the root of your project (where .beproject / .designtimelib lives):
find . -type f -exec grep '%%' {} \; | perl -ne '@x =m!.+%%([\/\w]*)%%.+$!xmi; printf "%s\n", $x[0] if $x[0] !~ /^\s*$/;' | sort | uniq
and then making markers for all the variables in the cdd
$ cat LegacyEvents.cdd | perl -ne '@x =m!(.+)%%([\/\w]*)%%(.+)$!xmi; if (@x) { printf "%s\$\{%s\}%s\n", $x[0], $x[1], $x[2];} else { print $_; }'