Designer 10.7 | webMethods BPM Task Development Help | Working with Task Portlets | Adding a New Portlet to a Task
 
Adding a New Portlet to a Task
 
Accessing the New Portlet Wizard
About the Task Portlet Type Templates
Modifying the Task View Definition
About Modifying the Task Details Page Contents
Modifying the Task Start Definition
There are two typical scenarios for adding a portlet to a task:
*When you create a task in the Task wizard, you specify the creation of several default portlets within the task. If you choose not add a particular portlet at creation time but want to add it later, you can add from a list of default portlets after you create the task.
*After you create the task, you may want to replace the default portlet with a customized portlet.
Tip:
You can customize the existing default portlet in the task editor, or create an entirely new portlet to replace the portlet. For example, if you created the task with the default settings in the task wizard, the audit, comment, and collaboration portlets are not available in the Solutions view and cannot be customized. When you create a new portlet with the procedure below, the existing portlet remains in the task, but it is replaced by the new portlet in the task definition, making it immediately available for publication.
Many of the procedures for creating and defining a task portlet are very similar to the procedures for developing any other CAF portlet. For more information about creating and working with portlets in general, see webMethods CAF and OpenUI Development Help.
Note:
When you add a task portlet to a task, the task portlet is created with JSF 1.x-based .view files, even if you create the project as a JSF 2.x task application. You can migrate these .view files to .xhtml files with JSF 2.x support. For more information, see Migrating Task Projects and .view Files to JSF 2.x Format.
There are certain specific procedures that pertain to portlets within a task. For a description of the available task portlet type templates, see About the Task Portlet Type Templates.
*To add a new portlet to a task
1. Open the portlet wizard as described in  Accessing the New Portlet Wizard.
2. On the Project Selection page, specify a project by doing one of the following:
*Accept the predefined contents of the Project box.
*Click a task application project in the Project box.
*Click New and create a new task application project.
3. Click a task portlet type template in the Portlet Type box.
Important:
If you create a new portlet in a task that contains an existing portlet of the same name, the new portlet will automatically replace the existing one when the task application is published. The original portlet remains in the task but is not used.
4. When a task portlet type template is selected, additional controls appear on the page.
*For a list of available portlets, see About the Task Portlet Type Templates.
*For information about the individual portlets that are available, see About Default Task Portlets and About Customizable Task Portlets.
5. Specify the task that will contain the portlet by doing one of the following:
*Accept the predefined contents of the Task box.
*Click a task in the Task box.
*Click New and create a new task.
6. Select your settings for the following check boxes (some options do not apply to all type templates):
Value
Description
Auto-accept task upon modification
Applies to task data view portlet only. Select this check box to cause a task to be automatically accepted by a user when the user modifies the task, and released immediately after the modification. This option serves as a temporary lock, allowing the user to make a modification to the task without explicitly accepting it. When this check box is not selected, the user must manually accept the task before updating it. You can modify this setting later, as described in Working with Task Client Options.
Display Style
Applies to search results portlet only. Enables you to define the search results display as table view, tree view, or toggle between table and tree view.
Enable user routing
Applies to task data view portlet only. Select this check box to provide the ability for a user to assign a task in the user's inbox to another user, group, or role. If you do not select this check box now, you can still add this functionality later by adding the appropriate controls and functionality to the task portlet.
Include Task Data View
Applies to task overview portlet only. Select this check box to add a task data view PORTLET INCLUDE statement to the Overview portlet. The task data view portlet appears when the user clicks the Data tab in the task interface.
Note:
The generated Overview portlet will still contain a Data tab even if you clear this check box. To remove the Data tab, open the view and select the Toggle Tabs control. In the Properties view, click the Choices tab and delete the TaskDataOption entry.
Use task indexed search content provider
Select this preference to create the portlet with an indexed search content provider instead of a standard (full) search content provider; for more information, see About Indexed Business Data Fields. This option can be enabled by default depending on the Task Development preference settings (see Setting Task Development Preferences For more information about indexed search content providers, see About Indexed Business Data Fields.
Use AJAX controls
Select this check box to enable the use of AJAX (Asynchronous JavaScript And XML) controls in the portlet.
7. From this point on, you can click Next to specify custom settings for the portlet, or click Finish to create the portlet with remaining default settings. The remaining pages in the wizard provide standard portlet configuration options.
8. Click Finish or click Next to continue configuration (see the Important note below if you click Finish).
9. On the Create Portlet page, specify a unique portlet name, and a portlet title. Accept the default values for the remaining values on the page, or specify new values. Click Next.
10. On the Create Portlet page, specify any text you want to appear at deployment time. Click Next.
11. On the Create Portlet page, specify the portlet class values you want to apply, or accept the default values. Click Next.
12. On the Create Portlet page, specify any resource bundle values you want to apply, or accept the default values.
13. When you click Finish, the new portlet is created within the specified task, and the default view for the portlet opens in the portlet view editor.
Important:
If you are replacing or adding to any of the portlets that are referenced in the Portlet Include controls in the overview portlet, be sure to open the overview portlet in the task editor and modify the appropriate Portlet Include control to reference the newly added portlet. If the new portlet is not already included in the overview portlet references, add a new Portlet Include control with a reference to the new portlet.
Related Topics