PowerWF News, Tutorials, and more...

Get the latest tips and tricks directly from the PowerWF development team. Find out about new releases and upcoming features.


Seamless Automation

From the Desktop to the Data Center

The PowerWF family of products are easy enough for desktop and departmental automation, yet powerful and scalable enough for the Data Center. PowerWF compliments Opalis and other RBA solutions, lets you leverage your workforce and preserves your investment as your automation needs grow.


Special - 20% Discount


In conjunction with our recently announced Silver Award from Windows IT Magazine we would like to offer our customers an opportunity to save 20% off any Devfarm product purchase through the end of the year. This includes all PowerWF products as well as Devfarm's new PowerVI product!

PowerVI

vSphere Automation fueled by PowerShell


Designed for the VMware Administrator, PowerVI eases the automation of vSphere infrastructures. PowerVI includes over 100 PowerShell automation scripts that simplify everyday VMware administration tasks and PowerVI makes it easy to author new scripts.
November 18, 2009

Tutorial: Creating Toolbox Activities

One of the unique features of PowerWF is the ability for users to extend it by adding their own toolbox activities. This tutorial will create a workflow that uses SAPI to speak whatever text is passed to it. This workflow will then be converted into a toolbox activity which can be dropped into other workflows

Topics Discussed

  • Naming Activities
  • Combining PowerShell and COM
  • Using Input Parameters
  • Creating Toolbox activities
  • Using custom toolbox activities
  • Using the ExecScript activity.
  • Using the FormatString activity.
  • Using the ForEach activity.
  • Using the GetProperty activity.

Procedure

  1. Create a new workflow project called “speakToMe”
  2. This workflow will utilize the Speech API (SAPI) by using the ExecScript activity from the PowerShell V2 toolbox. Drop an ExecScript activity onto the canvas and set the script to:

    $sapi = new-object -com SAPI.SpVoice


    This command creates the SAPI object for later use.

  3. To make the workflow more readable, set the Name of ExecScript1 to “Create SAPI”
  4. Drop a second ExecScript activity onto the canvas and set the script to:

    $sapi.speak(“I hunger”);$sapi.waitUntilDone(10000);




    The speak command tells the speech API to say, “I Hunger”. To work properly, the speech API requires that an option be set to wait until the Speak activity is done before proceeding, unless it takes longer than 10 seconds.
  5. For readability, set the Name of ExecScript2 to “SayWords”
  6. Although PowerWF scripts will run in their own run-space and clean up automatically on shutdown, one more ExecScript activity can be added to clean up the SAPI object. Drop another ExecScript activity on the canvas and set the script to:

    $sapi = $null



    Set the name of the ExecScript to “CleanupSAPI”

Read More