New Automation Rule
3. Select the When the value of “<field>” checkbox if you want the criterion to evaluate true based on a specific
conditions.
Note
Select both checkboxes if you want the rule to run when the field both changes AND meets the selected conditions.
4. Click the drop-down arrow and select a condition for the field to be tested. Based on the field and condition you selected, additional drop-down lists or fields may display.
Select or add additional values as needed.
5. Click OK.
6. Repeat step 1 - 5 to add additional criterions.
7. Review the criteria you created in the display box. You can add more criteria, edit, move up, move down, or delete a criterion. Highlight a criterion to change, and then click Edit, Add a “When ...<end>” group, Move up, Move down, or Delete.
Invoke these URLs This section lets you add URLs to invoke when this rule runs.
To add a URL, click the New icon.
Icons
Edit - Click to edit the selected URL.
Move up - Click to move the selected URL up one place in the list.
Move Down - Click to move the selected URL down one place in the list.
Delete - Click to delete the selected URL.
New - Click to enter a new URL.
When you click New, a page opens that has the following fields available based on whether you select Invoke a URL or Create or edit an Incident.
Section/Item Description
Invoke a URL This option is useful for creating URLs that target another Web or Web application, or for targeting any Helpdesk command.
This is a URL address that launches a Web browser and goes to the location where a process or rule is initiated. You can use macros to pass contextual data associated with the incident or from Helpdesk or the Notification Server.
Note
Create or edit an incident specifically targets Helpdesk commands that create and edit incidents.
Name - The name of the URL within the rule. When Log to Incident is selected, this is the name that gets logged. It is displayed when logging to the incident and it is useful on the main page of Automation rules in the grid that lists the URLs of the rule.
Base URL – The base URL. This field will be initialized with
“http://”, but will not be modified upon saving.
URL Parameters – Name/Value pairs of parameters that will be sent to the server. Parameters can be used to send custom data to the server, as well as Helpdesk contextual data (example: data from the incident that is invoking the URL).
Parameter names and values can contain Helpdesk macros (evaluation will occur for both the name and value). There are macros that can be used to extract data from an incident.
Section/Item Description
Invoke a URL (continued)
Enter a parameter name and value and click Add to add it to the list. The drop-down list contains all the data that can be extracted from the current incident and sent to the server as a parameter. When the << button is clicked, a Helpdesk macro that resolves to the value of the selected field is copied into the Value field. After you have provided a name for the parameter, click Add to add it to the list.
The Remove button moves the parameter name/value pair that is selected in the list into the Name and Value fields.
This gives you the chance to modify the parameter data and then re-add it to the list if desired.
Send parameters using – Select the method that will be used to send the parameters from the browser to the server.
If the GET method is used, parameters are appended to the URL.
Caution
If there is a substantial amount of data, there is a potential for lost data if the GET method is used.
If the POST method is used, parameter data is packaged inside the body of the HTTP request. This means the size of the data is not limited; however, the data is a little more difficult to work with from a server perspective (example: the targeted Web will need to know how to retrieve the data for a POST request).
Create or edit an incident
This option is useful for creating URLs that target the requests that create and edit incidents in Helpdesk.
The data that is specified in this section is converted to parameters and a URL based on the parameters. This is why View Automation Rule can contain URL parameters that you might not have created when editing a URL. They were created on behalf of various settings and fields in this section.
The word “current” used in this section refers to the incident from which the URL is being invoked.
Name - The name of the URL. When Log to Incident is selected, this is the name that gets logged.
Helpdesk – The URL to the root of a Helpdesk Web. This URL can contain different schemas depending upon how Helpdesk is configured (examples: HTTPS and a non-default Web site).
Section/Item Description
Create or edit an incident
(continued)
Create or edit an incident – The following buttons
determine the incident modification that will occur, create or edit, as well as the incident or incidents that will be modified when the URL is invoked.
z Create a new incident – Use this to specify that a new incident should be created. When this is selected, Title must be specified or a validation message will be displayed. Macro evaluation occurs on this value. If Create incident as child of current incident is selected, the created incident will be linked to the incident that is invoking the URL.
The Link type drop-down list only applies if Create incident as child of current incident is selected.
Helpdesk currently ships with three link types: Simple, Inherit Status, and Push Status. The three link types have special semantic meaning in Helpdesk. Because these are Helpdesk objects, we recommend that they not be modified. Any modification could potentially break how incident status is handled in various situations by Helpdesk.
Simple – No special status processing will occur.
Inherit Status – The status of the incident will be inherited from the parent. If the status of the parent incident changes, the status will be updated in the child as well.
Push Status – The status of a child incident will be pushed to the parent. If the status of a child incident changes, the status will be updated in the parent as well.
You can create your own custom link types by selecting Admin > Lookups, selecting Link type, and clicking Edit. Custom link types can be used to create various rule criterion that automation processes are based upon.
z Edit current incident’s parent – Use this to specify that the parent of the current incident should be edited. If the child does not have a parent, the modification is obsolete.
z Edit current incident’s children – Use this to specify the children of the current incident should be edited. If the current incident does not have children, the modification is obsolete.
Section/Item Description
Create or edit an incident
(continued)
z Edit this incident – Use this to provide the incident number of the incident to be edited. If this is selected, then Incident will need to be specified. Macro evaluation will occur for the value entered. The value must be a valid incident number.
z Set these properties – The incident property values that will be set for incidents affected when this URL is
executed.
Add – When clicked, a specialized assignment editor will be invoked based upon the field that is selected in the drop-down.
Set from current – When clicked, an assignment for the currently selected field is added to the list (the user will not be taken to a specialized assignment editor as when Add is clicked). The value of the assignment will be a WORKITEM macro whose argument is the SQL field name of the field that is selected in the drop-down. This is an easy way to specify that the properties of the incident or incidents being modified should be set to the same value as the current incident (the incident that is causing the URL to be invoked). This feature should not be used when Edit current incident is selected.
Credentials z Impersonate the worker - Uses the logged in user’s credentials. This should almost always be selected.
z Use Helpdesk application credential - Uses the Helpdesk application ID when running the URL. This can be used when you need to invoke a Helpdesk identity such as when a 3rd party webservice and URL is not available to the worker.
Section/Item Description
Log to incident z Save the raw text of the response in the incident – If Log to Incident was selected on the previous screen, you can also choose to record the response in the incident by selecting Save the raw text of the response in the incident.
When this is selected, the response will be saved in the incident and can be accessed from the field
workitem_modified_by_rule_result in the workitem view.
The response will be wrapped in a <response> XML element.
Save the raw text of the response in the incident works the same way that it does in Tasks. The only difference is that when saving the raw text of the response, a separate <response> node is created for each URL that is invoked. Each one is then added as a child of a root <responses> element.
There are two possible outcomes for the result that will be saved within the incident depending on whether or not Advanced response processing is selected:
Advanced response processing is not selected – In this case, the fact that the rule was invoked is recorded as the name of the rule. Because Helpdesk will not be displaying the report, there is no ability to view the response. In this case, Helpdesk only records the fact the rule was invoked.
Advanced response processing is selected – In this case, the response is processed before it gets saved. If Advanced response processing is not selected, the default processing will occur. If the response is HTML, the raw text of the response is wrapped in a CDATA which becomes the text of the <response> element. If the response is XML, the element is appended as a child of the <response> element.
If Advanced response processing is selected, you can choose to perform advanced processing by selecting Advanced response processing. This lets you provide VB.NET code as the body of the ProcessResponse function which is run to process the response. The signature of this code is:
Public Function ProcessResponse(url, response, item) As String
Section/Item Description