Defining URL patterns for work items
Share your work items with users of the same application by defining URL patterns for the work items in your application, for example, cases, reports, landing pages, or other work items, such as sitemap.xml. Simple, meaningful URLs make collaboration more efficient for users. For example, they can bookmark a case for quick access, and then send a direct link to the case to other users.
Before you define URL patterns for work items, your application must contain a URL
Mappings rule. Each application can have only one URL Mappings rule, whose name is always
pyDefault. You define URL patterns by editing this rule.
- Create a URL Mappings rule in your application:
- In the header of Dev Studio, click .
- In the Context section, in the Add to ruleset list, select the name and version of a ruleset to store the URL Mappings rule.
- Click Create and open.
- Click Save.
- In the navigation pane of Dev Studio, click Records.
- Expand the Technical category, and then click URL Mappings.
- In the list of URL Mappings instances, click pyDefault.Each application has only one valid URL Mappings rule, whose name is always pyDefault.
- On the Definition tab, expand the category of work items for which you want to define the URL pattern.
- Start configuring a URL pattern:
- To add a URL pattern to a work item, click Add URL alias.
- To modify a pattern, click the Switch to edit mode icon.
- In the Identifier field, enter a name for the URL alias that uniquely identifies it in all patterns in the rule.
- Optional: To generate a valid URL for an object, apply the URL pattern to the object:
- Select the Map path elements for URL generation checkbox.
- In the Class field, specify the class of the object for the properties mapping.
- In the Path element type column, select
Constant.The first path element must be a constant.
- In the Value field, enter text that is a constant element in the URL pattern.
- Optional: To add more path elements to the URL pattern, click Add path
element.
- To define text, in the Path element type column, select Constant and then, in the Value field, enter the text.
- To define a parameter, in the Path element type column, select Parameter.
- If you selected Map path elements for URL generation in step 8, in the Property mapping column, enter a clipboard property to map to the URL path element.
- Optional: To make this URL pattern the default for objects in specific classes, in the
Make this resource path the default for the following classes
section, click Add class, and then in the text field, enter the
name of the class.The class can be the same class that you entered in step 8, or any of the child classes.
- Click Next.
- In the Edit processing activity dialog box, in the Class field, enter the class of the processing activity for the URL pattern.
- In the Activity field, specify the processing activity that controls running the URL.
- In the Value column, enter the values for the processing activity
parameters.Map your URL path elements (parameters) to the processing activity parameters. For example, in step 11, if you defined a URL path element as the {param1} parameter, in the Value field for an activity parameter, enter {param1}.
- Optional: To pass an additional parameter to the activity that the current activity invokes, click Add parameter, and then repeat step 16.
- Click Finish.
- Optional: To add a URL pattern to another category, expand the category, and then repeat steps 6 through 18.
- On the URL Mappings form, click Save.
Previous topic Text File rules - Completing the Create, Save As, or Specialization form Next topic Creating a function