Wednesday, May 31, 2017

How to query database using function in WFA

Sometimes you need to get information from the database (WFA cache) but you don't want it to happen in the userinput, and you don't want to bother using a custom dictionary.

Examples : get the next available lun id, import settings (instead of hard-coding customer information in your workflows).  It also adds a level of re-usability to your workflows.  And better, you can share settings between multiple workflows (dns servers for example, domain information, ...)

Credits : Tim Kleingeld

How to quickly test/debug MVEL code ?

If you're working in WFA, you'll most likely have used a function.  And maybe you wrote one as well (or tried at least).  Functions in WFA written in MVEL.  In fact, MVEL can almost be used every where in WFA.  And mvel is pretty neat as well.  It's expression language based on java.  And you can use java objects as well.

If you tried to create a function, you might have already bumped into some issues and had to jump back and forth from the code to the test button to figure out what is going wrong in your code.

Here's a neat trick I learned from Mr. David Korns.

MVEL and string splitting, what's up ?

I had to create an mvel function the other day that required some splitting and it was driving me nuts.  If I splitted with a "," (comma), it worked fine, but when it splitted with a "|" (pipe), it was funny business.  Other issues if you want to split on a "." (dot).

So what's going on ?

Monday, May 1, 2017

Wfa command to set SPN

This command allows you set a service principal name (SPN).  I needed this command a few years back to handle SVM-DR (Cdot 8.2).  In my case, cifs clients would work against a dns-alias, during the cutover, the dns-alias would flip from the old svm-name to the new svm-name.  Even if the DNS-flip is instantaneous to client (TTL 0, dns cache cleared, etc...), during a snapmirror-break-dr-activate from one CIFS-SVM to another CIFS-SVM, you have a kerberos issue.  Your cifs clients still have the old kerberos ticket and won't trust the new connection to the new SVM (different name).  That's why you need to unregister the old svm name and register the new instead.  (in a snapmirror relation, the svm-names must be different).