Registering Custom Tasks as Capabilities in SAS Enterprise Guide

Overview

Custom add-in tasks are .NET assemblies (DLL files) that you create, deploy, register in SAS Enterprise Guide, and execute from the SAS Enterprise Guide task list or add-in menu.
To provide access to custom tasks based on the job responsibilities, you can register custom tasks as capabilities, assign capabilities to roles, and assign users to roles.

Create Custom Tasks

To create custom tasks, you develop Windows executables and package them as .NET assemblies. It is convenient to assemble multiple tasks in a single .NET assembly so that you can share code and implementation among the tasks. For additional information, sample DLLs, and sample executable source files, see the topic Creating Custom Add-In Tasks for SAS Enterprise Guide, at http://support.sas.com/documentation/onlinedoc/guide/customtasks/index.htm.reference.

Deploy Custom Tasks

You can deploy custom tasks to SAS Enterprise Guide computers in two ways, using drop-in deployment or add-in deployment. Drop-in deployment copies .NET assemblies into local directories that are recognized by SAS Enterprise Guide. Custom tasks in drop-in directories are automatically registered (made available for execution) the next time the user starts SAS Enterprise Guide.
Add-in deployment copies .NET assemblies into any local directory. You then identify those directories in SAS Enterprise Guide using the Add-In Manager to make those tasks available for execution.
When you deploy, make sure that you include any dependent assemblies that are referenced by your custom tasks. Make sure that you do not include any dependent assemblies that are provided by SAS Enterprise Guide or the SAS Add-In for Microsoft Office.
Follow these steps to use the Add-In Manager:
  1. Copy the .NET assembly into one of the following directories:
    • C:\Program Files\SAS\EnterpriseGuide\version\Custom
    • %appdata%\SAS\EnterpriseGuide\version\Custom
      %appdata% is the Microsoft Windows environment variable that maps to a user account. Repeat the copy in other user accounts if multiple users run SAS Enterprise Guide on the same host.
    • %appdata%\SAS\SharedSettings\version\Custom
      Use this method to deploy custom tasks to specified user accounts, using a shared directory that is accessed by both SAS Enterprise Guide and the SAS Add-In for Microsoft Office.
  2. Restart SAS Enterprise Guide. SAS Enterprise Guide automatically registers the new custom tasks in the specified directories.
  3. Test the new custom tasks by selecting Viewthen selectTask List or Toolsthen selectAdd-In.
Follow these steps to use add-in deployment:
  1. Copy the .NET assembly into any local directory.
  2. In SAS Enterprise , start the Add-In Manager. Select Toolsthen selectAdd-Inthen selectAdd-In Manager.
  3. In the Add-In Manager dialog box, select Browse.
  4. Navigate to the directory where you stored your .NET assembly.
  5. Click Open to display the names of the custom tasks in the assembly.
  6. Click OK to accept the custom tasks and register them in SAS Enterprise Guide.
  7. Test the new custom tasks by selecting Viewthen selectTask List or Toolsthen selectAdd-In.

Register Custom Tasks as Capabilities

After you deploy custom tasks, follow these steps to register custom tasks as capabilities:
  1. In SAS Enterprise Guide, start SAS Enterprise Guide Explorer. Select Toolsthen selectSAS Enterprise Guide Explorer.
  2. In Explorer, select Toolsthen selectTask Import Wizard.
  3. In the first page of the Task Import Wizard, you see your current metadata profile connection. If you need to connect with a different profile, click Cancel to close the wizard and select Filethen selectManage Profiles. After you change your profile, click Close, and then start the Task Import Wizard.
  4. In the second page of the Task Import Wizard, specify the location of the directory where you copied your .NET assembly. Note that the directory that you select must be local to your current host.
  5. Select tasks to receive metadata, and then click Finish in the sixth wizard page to create metadata.
If you are unable to create metadata, then you might need to install the package named SAS Enterprise Guide Server Data on the host that contains your current metadata repository.

Apply Custom-Task Capabilities to Roles

Follow these steps to apply custom-task capabilities to roles:
  1. In SAS Management Console, open the User Manager.
  2. To create a new role for your custom-task capabilities, right-click in the User Manager and select Newthen selectRole.
  3. To add a custom-task capability to an existing role, double-click an Enterprise Guide role.
  4. In the role properties dialog box, click the Capabilities tab.
  5. Expand the Plug-Ins branch in the tree view.
  6. Click the custom-task capabilities that you want to add to that role.
  7. Click OK.
The custom-task capabilities will be applied to the role the next time affected users initialize SAS Enterprise Guide.