Tuesday, February 6, 2018

WFA maintenance workflow (powershell only)

If you are working with WFA quite a lot, there are some maintenance tasks that might be handy.  And they are either not possible in the GUI, or they take a lot of manual work.

  • Clean ALL execution logs
  • Clean ALL reservations
  • Enable Full RBAC
here is a workflow to do this...

Cleaning all execution logs

These include both datasource execution logs & workflow execution logs.  
Why clean them ?  Maybe you want to give a demo and you want a clean start.  Maybe you prepared an environment for a customer and you want to clean you previous tests ?
Anyhow, in the gui you can't really clean them out.

Clean all reservations

Same reason, maybe you did some tests, it's full of reservations, and you just want them cleaned out.  Instead of deleting them manually, why not just remove them all in one go.

Enable full RBAC

When you deploy a new WFA server, by default it has all of these demo workflows.  In the admin menu, you can hide those, but they are only hidden in the GUI.  In the API they are still very much accessible !

Why hide workflows ?  Well, in a production environment I'd rather say who can run what.   First of all, the default workflows are visible.   But often new workflows are created and by default they are also available for everyone.
If you truly want to hide them, you should restrict all categories.  But still, some workflows don't have a category.

This maintenance workflow will create a new "No Category" category, move all non-assigned workflows to that category AND will then restrict all categories.

Now no-one but the admins can run workflows by default and all categories must be assigned to users or groups.

Download Workflow

PS : do you think of any other tasks ?  Let me know and I'll see if I can add them.


  1. This manipulating wfa tables/data is breaking the house rules. The database 'wfa' is for WFA for its own internal use. Manipulating wfa tables/data can have serious consequences w.r.t your WFA working properly.

    Worse, NetApp TSE,Eng supp can't detects such manipulations done if some WFA malfunctioning is reported. I don't think WFA ever recommended playing with 'wfa' db.

  2. That's correct, we don't recommend to just start playing around in the WFA database.
    That being said, the manipulations here are minor.

  3. This is an AWESOME workflow. While agreed that we want to minimize direct manipulation of the wfa database, some scenarios leave us with no other option (i.e. turning on RBAC on all categories).

    Thank you Mirko for sharing.

  4. Thank you, Mirko.
    This package succeeded to clean a reservation that the GUI was not able to do!
    Saving a lot of time and trouble.