Workflow and ServiceDesk Community

 View Only

Compare Numbers Rule 

Jun 13, 2012 09:47 AM

Component definition

This component compares two numbers and determines whether one is less than, equal to, or greater than the other. Based on the comparison, one of three corresponding output paths is taken.

The Compare Numbers Rule component is very useful for simple comparisons. A similar component, Number Range Rule, provides different functionality by comparing multiple values.

Component Toolbox Paths: Math; and Rules > Math

Component icon

Description of component output paths

The following table lists the Compare Numbers Rule component properties and describes each property.

 
Property Description
less than This path is followed if Value1 is less than Value2.
equal to This path is followed if Value1 is equal to Value2.
greater than This path is followed if Value1 is greater than Value2.

 

Description of component tabs and their properties

The following table lists and describes the properties on the Evaluation tab in the Compare Numbers Rule component.

 
Property Description
Value1 A number or number variable. When you click the [...] button, the
value source selector opens. This number is compared to Value2.
Avariable array value can be selected when you drill into the array
and select a value.
Value2 A number or number variable. When you click the [...] button, the
value source selector opens. This number is compared to Value1.
Avariable array value can be selected when you drill into the array
and select a value.

All components have a common Settings tab in their component editors. The properties on the Settings tab are listed and described in the following table:

Property Description
Component Class Name The class name of this component. This property is not editable. This property is useful if you call Symantec support.
Description

The description of this component. This property lets you describe how the component is used. You can use it to provide any wanted
documentation for this component. This description is included in
the model reports that are created when you click Plugins > Generate Business Model.


When you click the [...] button, you can open the value source selector and enter the description.

Location The physical location of the top left point of this component on the
workflow model.
Name The name of this component. You can change the name. If you changed the component name when you double-clicked it on the workflow model, the changed name appears here.
Override Background Color

This property lets you change the background color of this component.

When you click the [...] button, you can open the value source selector to change the background color.

To Do

This property lets you record what you still need to do with the
component. Use this property to help you remember the configuration that you want to apply to this component. The text that you enter for this property appears at the bottom of the component editor. If you enter text for this property, a checklist symbol appears on the component in the workflow model.

When you click the [...] button, you can enter text in this option.

Is Enabled

This property lets you enable or disable the component. By default,
components are enabled. When a component is disabled, it has no
effect on the project.Whena component with more than one outcome
path is disabled, you must choose the outcome path that you want the component to take.

When you clear the Is Enabled checkbox, the component is disabled.

If the component has more than one outcome path, click the Execution Outcome list and select the outcome path for the workflow to follow.

If the component has output parameters, you must configure all output parameters with fixed data to pass on. This configuration can be performed in the Disabled Mapping option. When you click the [...]
button, you can open the value source selector and add the value for
each output parameter.

Connection information

Not applicable

Component settings

Unknown

 

Use cases

The Compare Numbers Rule applies to the following use cases, among others.

Purchase order request

According to a company’s purchasing policy, all purchases under $50 are automatically approved while purchases over $50 need manager approval.

To meet this need, you create a purchase order request in which all purchases under $50 are approved automatically, but purchases over $50 require manager approval.

This is a Workflow-type project, as shown in this screen shot:

When the employee submits the order request, the total cost is included. The employee enters this cost data manually, and the project stores the data in a variable called PurchaseTotalCost. The Compare Numbers Rule component then compares the two numbers: the value of PurchaseTotalCost and $50.

The following screen shot shows the entries in the component editor Evaluation tab:

If the value of PurchaseTotalCost is $50 or less, the purchase request is approved automatically and moves on to the purchasing department. If the value
is more than $50, the request goes to a manager for approval.

Vacation request

Vacation information for all employees is stored in a database. This information includes the number of available vacation days for each employee. Employees often forget how many days they have left and tend to believe they have more than they do. When requesting days off, sometimes they ask for more days than they have available.

To manage vacation requests, you use the Compare Numbers Rule to compare the number of vacation days requested to the number of available vacation days. If the employee's available vacation days are insufficient, the process politely informs the employee that he or she needs to revise the request and try again.

This is a Webforms-type project, as shown:

A Form Builder component containing the vacation request form begins the process. After the employee submits the vacation request, a custom component looks up the employee in the database and returns the number of remaining (available) vacation days. The Compare Numbers Rule component compares the number of days the employee requested with the number of days left on his or her vacation account.

The following screen shot shows the editor for the Compare Numbers Rule component:

If the employee has not requested too many days, an email is sent to the employee’s manager to approve the vacation request. If the employee has requested more days off than are left in his or her vacation account, an Add New Data Element component adds an error message to the Webform. The employee receives the error message and can fill out and resubmit the form with a corrected request.

Employment application evaluation

The Human Resources department is accepting applications for a position that requires at least three years of experience. The department is flooded with applications, many of which are from applicants who lack the required experience. The department needs help to reject the irrelevant applications.

You create an online employment application that requires applicants to enter their years of experience. If they have fewer than three, their applications are rejected automatically. If they have three or more years of experience, their applications are sent on to a manager for review.

This is a Webforms-type project:

In this process, the Compare Numbers Rule component receives a variable called YearsExperience from the Form Builder component. The Compare Numbers Rule component compares the YearsExperience value against a constant value of three (3).

The following screen shot shows the editor for the Compare Numbers Rule component:

If YearsExperience is less than three, a rejection email is sent to the applicant. If YearsExperience is three or more, the application is forwarded to a manager.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.