Monday 30 April 2018

lemmatizing in NLTK

# -*- coding: utf-8 -*-
"""
Created on Mon Apr 30 18:30:26 2018

@author: Jayesh
"""
Defination :-

Lemmatisation (or lemmatization) in linguistics, is the process of grouping together the different inflected forms of a word so they can be analysed as a single item.
In computational linguistics, lemmatisation is the algorithmic process of determining the lemma for a given word. Since the process may involve complex tasks such as understanding context and determining the part of speech of a word in a sentence (requiring, for example, knowledge of the grammar of a language) it can be a hard task to implement a lemmatiser for a new language.
In many languages, words appear in several inflected forms. For example, in English, the verb ‘to walk’ may appear as ‘walk’, ‘walked’, ‘walks’, ‘walking’. The base form, ‘walk’, that one might look up in a dictionary, is called the lemma for the word. The combination of the base form with the part of speech is often called the lexeme of the word.
Lemmatisation is closely related to stemming. The difference is that a stemmer operates on a single word without knowledge of the context, and therefore cannot discriminate between words which have different meanings depending on part of speech. However, stemmers are typically easier to implement and run faster, and the reduced accuracy may not matter for some applications.
Programms :-
import nltk
wn = nltk.WordNetLemmatizer()
ps = nltk.PorterStemmer()

dir(wn)
print(wn.lemmatize('goose'))
print(wn.lemmatize('geese'))

import pandas as pd
import string
import re

pd.set_option("display.max_colwidth",100)
stopwords = nltk.corpus.stopwords.words('english')
data = pd.read_csv("SMSSpamCollection.tsv", sep ='\t')
data.columns =['label','body_text']

data.head()

def clean_text(text):
    text="".join([word for word in text if word not in string.punctuation])
    tokens = re.split('\W+',text)
    text = [word for word in tokens if word not in stopwords]
    return text
data['body_text_nonstop']= data['body_text'].apply(lambda x:clean_text(x.lower()))
data.head() 

def lemmatizing(tokenized_text):
    text = [wn.lemmatize(word) for word in tokenized_text]
    return text
data['body_text_lemmatized'] = data['body_text_nonstop'].apply(lambda x:lemmatizing(x))
data.head() 
 

Monday 3 October 2016

Selenium API automation

What is API :
An application-programming interface (API) is a set of programming instructions and standards for accessing a Web-based software application or Web tool.
now a days there is Mulesoft tool is also available for web service design and there is also testing available in that using MUnit. for more about Mule Soft prefer below link:-
Example :
An API is a software-to-software interface, not a user interface. With APIs, applications talk to each other without any user knowledge or intervention. When you buy movie tickets online and enter your credit card information, the movie ticket Web site uses an API to send your credit card information to a remote application that verifies whether your information is correct. Once payment is confirmed, the remote application sends a response back to the movie ticket Web site saying it’s OK to issue the tickets.
What is JSON :
JSON (JavaScript Object Notation) is a lightweight, text-based, language-independent data exchange format that is easy for humans and machines to read and write. JSON can represent two structured types: objects and arrays. An object is an unordered collection of zero or more name/value pairs. An array is an ordered sequence of zero or more values. The values can be strings, numbers, booleans, null, and these two structured types.
Example : 
JSON is an easier-to-use alternative to XML.
Note : Here i am just conferring how to parse and How to convert JsonObject to JavaObject.So that you could use it your live projects using selenium.
 Application contentType : Json
Basic Code :-

Please consider the below code as a reference.
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Scanner;
import org.json.JSONArray;
import org.json.JSONObject;
import org.testng.Reporter;
import org.testng.annotations.Test;
public class ReadJsonObject{
@Test
public void aptTesting() throws Exception {
try {
URL url = new URL(
“";);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod(“GET”);
conn.setRequestProperty(“Accept”, “application/json”);
if (conn.getResponseCode() != 200) {
throw new RuntimeException(” HTTP error code : ”
+ conn.getResponseCode());
}
Scanner scan = new Scanner(url.openStream());
String entireResponse = new String();
while (scan.hasNext())
entireResponse += scan.nextLine();
System.out.println(“Response : “+entireResponse);
scan.close();
JSONObject obj = new JSONObject(entireResponse );
String responseCode = obj.getString(“status”);
System.out.println(“status : ” + responseCode);
JSONArray arr = obj.getJSONArray(“results”);
for (int i = 0; i < arr.length(); i++) {
String placeid = arr.getJSONObject(i).getString(“place_id”);
System.out.println(“Place id : ” + placeid);
String formatAddress = arr.getJSONObject(i).getString(
“formatted_address”);
System.out.println(“Address : ” + formatAddress);
//validating Address as per the requirement
if(formatAddress.equalsIgnoreCase(“Chicago, IL, USA”))
{
System.out.println(“Address is as Expected”);
}
else
{
System.out.println(“Address is not as Expected”);
}
}
conn.disconnect();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
That’s it, Now you know to convert JsonObject to Java Object and use it in your Selenium snippet.
*HTTP Request and Response Code :-
*For more you can see videos which I preferred :-
 

Tuesday 21 July 2015

workday Glossary

Workday Business User Terminology Glossary

1.Accrual
Defines how much time off employees can accrue, the timing of the accrual, and other rules. Can define eligibility rules, frequency and limits that differ from the time off plan.
2,Additional Job
A job held by an employee that is not his or her primary job.
3.Additional Payment
An off-cycle payment made in addition to a worker's scheduled on-cycle payment. Additional payments can be processed as part of a manual payment or on-demand payment.
4.Advanced Report
There are three types of custom reports: simple, advanced, and matrix. An advanced report provides all the features of a simple report, plus more advanced features such as accessing related business objects and producing multiple levels of headings and subtotals. Advanced reports also enable the use of sub-filters, run time prompts, charts, bubbles (worklets) and report sharing, and provide the ability to expose the report as a web service.
5.Aggregation Security Group
An aggregation security group is one whose members are other security groups. Workers associated with any included security group are granted access through an aggregation security group.
Annual Work Period (AWP)
The number of months a faculty employee works in a year.
Annualization Factor
The multiplier used to calculate an annual amount of compensation for compensation plans. Each compensation plan has a frequency of payment, and each frequency has an annualization factor.
Approve
Indicates that a task in a business process can proceed due to the approval by a designated participant. The participant is able to approve the completion of the task due to having defined responsibilities for this task.
Assignable Roles
You can assign positions to organization roles. Depending on the staffing model, a position may or may not necessarily have a worker specified.
Auto-fill
A time entry method that copies time blocks from a worker's schedule or from a previous week onto the current week on the time entry calendar.
Awaiting Action
A business process task waiting for someone to act upon it (e.g. approve, send back).
Balance Period
The period of time, such as current period, month-to-date, quarter-to-date or year-to-date, over which Workday calculates a pay component value.
Base Currency
Also known as default currency. The primary currency in which a company does business and reporting.
Base Pay
Base wages for exempt and non-exempt employees excluding faculty and students.
Base Pay Element
The compensation components included in the calculation of base pay for the purposes of determining the compa-ratio.
Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Benefit Coverage Type
A type of benefits coverage. For example, Medical, Dental, Vision, Group Term Life, Long Term Disability and Short Term Disability benefits coverage. Each Coverage Type can contain one or more specific benefit plans. Rules can be set for benefit elections at the benefit coverage type level. For example, employees can be restricted to selecting only one plan of a specific coverage type. Which coverage types are available for employee election during which benefit events can be specified.
Benefit Event
An event in the employee's life that gives the employee the opportunity to change benefit elections. These include staffing changes (such as getting hired or promoted) as well as "life events" such as getting married or having a child.
Benefit Event Rules
These rules specify coverage increase limits, waiting periods and other rules and conditions of enrollment for benefit enrollment events.
Benefit Event Type
Identifies the events that trigger benefit enrollment, for example open enrollment, new hire or the birth of a child. It also identifies the coverage types to make available to employees when an event of this type occurs.
Benefit Group
Identifies workers who qualify for similar benefit plans and elections. Workday builds benefit groups dynamically based on eligibility rules that control group membership; all workers who meet the criteria specified in a group's eligibility rules are automatically assigned to that group. For example, benefit groups can be created by defining eligibility rules that assign executive management staff to one group, salaried employees to a second group and hourly employees to a third group.
Benefit Plan
Defines the coverage levels or amounts available to employees enrolling in an insurance, health care, defined contribution or spending account plan. Benefit Plan also identifies the populations (e.g. employee, employee + spouse, employee + children, etc.) eligible for benefits. Finally, it provides restrictions on the age(s) of the covered dependent(s) as well as plan rates and costs.
Benefit Validation
Restricts the coverage options available to workers under a specific benefit plan. For example, the maximum age of dependents covered under a plan or the maximum and minimum coverage amounts can be restricted.
Bubble (also known as Worklet)
An icon on the home page, which provides easy access to tasks and information that are used regularly. Examples include Benefits, Pay and Personal Information.
Business Object
Workday stores data as business objects—organizations, workers, positions, etc.—which can be thought of as database tables or worksheets in Excel. Just as a database table or worksheet has columns and rows, a Workday business object has fields and instances. A business object is composed of a set of related fields, similar to how a table or spreadsheet is composed of a set of related columns. Instances of a business object in Workday are like rows in a table or spreadsheet, with each instance representing a unique occurrence of that type of object such as an organization or worker. A business object can have no instances, one instance or many instances. Workday automatically links related business objects together. For example, purchase order lines are linked to a purchase order header, the purchase order header is linked to a supplier, the supplier is linked to a company, etc.
Business Process Conditional Rule
A condition attached to a business process task that, depending on the outcome, determines where it will be routed.
Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Business Process Definition
The set of tasks that need to be completed for an event to occur, the order in which they must be done, and who must do them. Workday includes a number of predefined business processes for different purposes. Default definitions can be edited, and different versions of the same business process can be created for different organizations.
Business Process Instance
A business process that the initiator has started. For example, the Hire Employee for Organization X business process definition becomes an instance when the initiator uses it to hire a particular pre-hire.
Business Process Security Policy
A business process security policy secures the initiation step, step actions and process-wide actions including view, rescind, cancel and correct. It specifies which security groups have access to each action.
Business Site Location
An employee's work location.
Business Title
A descriptive title of the employee’s job. The business title is published in the university directory.
Calculated Time
Result of applying time calculations to a worker's reported time. Automates application of company or regulatory rules.
Calculation Priority
Calculation priorities specify the order in which time calculations execute.
Cancel (business process)
Canceling a business process stops the workflow in progress and reverses any changes made to Workday data. It is also a securable action in a business process security policy.
Carryover Limit
The maximum amount of time off employees can carry over from one balance period to another.
Cascading Leave
A sequence of related leave types that are linked together. When an employee meets the conditions defined for ending a leave, Workday generates a return from leave request and a separate request for the next leave.
Compensation Basis
A user-defined grouping of compensation components, such as the sum of salary, allowance, bonus, future payments and retirement savings plans. Compensation plans that should be included in the compensation basis calculation can be specified. This calculation can be used to view employee compensation in Workday.
Compensation Component
The umbrella term for compensation packages, grades, grade profiles and plans.
Compensation Defaulting Rule
Establishes the criteria for how compensation components default to worker compensation during staffing transactions (hire, promote, demote, transfer). Compensation defaulting rules ease data entry by automatically defaulting compensation components to worker compensation for employees who meet the rule's eligibility requirements.
Compensation Element
The smallest unit of compensation for a worker in a specific position. Workday uses compensation elements to determine the amount, currency, frequency and other attributes of a worker’s compensation. Compensation elements, such as base pay, are linked to compensation plans.
Compensation Grade/ Grade Profile
Compensation Grade is assigned to a Job Profile based on the level of responsibilities performed by an incumbent of the Job Profile. Pay ranges are defined in Compensation Grade Profile. Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Compensation Matrix
Defines the bonus and merit increase range based on such factors as an employee’s salary range quartile, etc. You can use a compensation matrix to provide basic cost forecasting, compensation reference guidelines, etc.
Compensation Package
A grouping of compensation guidelines (grades, grade profiles and their associated steps) and plans that you can assign to workers as a set. Packages provide a quick view the eligible plans for a particular job or group of employees.
Compensation Plan
A component of pay used to assign monetary amounts to a worker's pay such as a salary, an allowance or a bonus. Some compensation plans are discretionary. You are not paid from these compensation plans in every paycheck. By contrast, other plans, like a salary plan, are included in every paycheck.
Compensation Rule
Guidelines for determining which workers are eligible for which components of compensation.
Compensation Step
A specific monetary amount within a grade or grade profile. Steps defined on a grade profile override any steps defined on the grade.
Compensation Structure
The arrangement of compensation grades, grade profiles, plans and packages you create to best fit your company's compensation needs. These compensation components and compensation eligibility rules can be used to assign and update a worker's compensation plans.
Compensation Target Rule
Used to segment your employee population for assignment of compensation plans.
Competency
A functional or technical ability that is needed to perform a job. In Workday competencies can be associated with job families, management levels, job profiles and positions.
Conditional Calculation
Time calculation that tags time blocks that meet certain conditions.
Conditions
Conditions are one or more logical matches that are resolved to True or False and used to decide if some action should be taken. For example, you can add conditions to steps in a business process to determine if the step should run.
Consolidated Approval
One Consolidate Approval step is generated when one role has multiple successive approval actions in a business process.
Contextual Custom Report
Simplifies the selection of data and fields by limiting choices to those related to the context of the object.
Contingent Worker
A worker who is not an employee. Contingent worker types, such as a contractor or a consultant, can be used to categorize and track contingent workers in an organization.
Correct (business process)
Correcting a business process changes a specification or data in the workflow while in progress. It is also a securable action in a business process security policy
Cost Center
Cost Centers are used to track the financial impact of human resources transactions.
Costing Allocation
Costing Allocations define which Cost Centers a worker’s expenses are charged. Costing Allocations override the worker’s default Cost Center.
Country Region
Political entities (such as states, provinces, cities or other legislative entities) where specific laws and regulations require companies to track and report on unique kinds of worker and job information. Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Cross Plan Dependency
Limits the coverage options available to workers during an enrollment event based on their choice of other benefit plans and coverage amounts. For example, you can limit coverage in a specific plan to a percentage of the total coverage in one or more other benefit plans.
Currency Rate Type
More than one conversion rate can be established for the same currency pair during the same time frame. For example, one rate type can apply to the daily rate used in operational transactions, and then average and historical rate types can be used for financial reporting. The default rate type is used in all operational activity. You can define names for currency rate types; typical names are Period Average, Daily, End of Day Daily and Historical.
Custom Report
Custom reports are designed and built by customers using the Workday Report Writer. They can be created new or as a copy of another standard or custom report.
Data Source
A data source defines a particular set of business object instances for reporting purposes. A data source is similar to a database view, except it is more flexible in two key areas. First, a database view always returns a flattened out tabular data structure, whereas a data source can return hierarchical data structures. Second, a database view requires that technical staff manually join related tables together, while a data source automatically allows reportable access to all business objects related to those in the data source.
Day Breaker
The time of day on which a worker's work day and work week begins. Defines the 24-hour period over which daily time calculations execute and the 168-hour period over which weekly time calculations execute. Unless otherwise specified, the default day breaker is 12:00 a.m.
Default Cost Center
Where all worker expenses are charged unless Costing Allocations are entered to override the Default Cost Center.
Default Weekly Hours
The standard hours that a full time employee works in the worker’s supervisory organization.
Defined Contribution Plans
A type of benefit plan in which employees make contributions to predetermined plans. Defined contribution plans can be established and added to benefits programs. Employees can make or change defined contribution elections at any time, and those changes are sent to payroll for the periods in which the elections are effective.
Deny
Designated participants in business processes, with a defined responsibility in this type of event, indicate that they deny the proposed action. The business process is not authorized to proceed to the next step. In some cases the entire business process may be terminated and all Workday data restored to its state before the business process started.
Derived Roles
Roles can be assigned to a user when he is given a responsibility within a functional area for a particular organization. A user can have different roles in different organizations.
Disbursement Plan Period (DPP)
For Faculty working eight months or more, the number of months over which the faculty elects Core Compensation to be paid.
Domain
A domain is a collection of related securable items such as actions, reports, report data, report data sources or custom report fields. Each domain is secured by a domain security policy.
Domain Security Policy
A domain security policy is a collection of related securable elements of different types and user-specified security groups that have access to elements of each type. Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Drilldown
Matrix reports enable users to drill down to see underlying data. When a drillable element (such as a drillable field in the table view or a column, line or pie segment in the chart view) is clicked, a context menu appears that enables a new View By field to be selected. If the Enable Drilldown to Detail Data check box is selected on the Advanced tab of the report definition, Details associated with the selected report element can also be selected.
Earning Code, Earning
Payroll codes linked to specific Compensation Elements.
Eligibility Rule
Specify one or more criteria that categorize workers into a group that is used to qualify them for participation in an HR-related task. Examples include benefit plans and compensation plans.
Employee
An individual who works directly for Carnegie Mellon University, is paid through Payroll and may be eligible for university benefits.
Employee Self Service (ESS)
Employee Self Service, also known as ESS, is the functionality for employees to initiate tasks.
Employee Type
A user-defined type assigned to each employee when the employee is hired. For the most part this designation is informational only; users can search or filter employees by their employee type. However, Fixed Term Employees can be designated as a type, and employees of that type have fixed end dates of employment.
Employment Action Close Out
Activities performed when a worker transfers out of or terminates from an organization.
Enrollment Event
Any event that results in a gain or loss of benefits coverage. This encompasses both open enrollment and benefit events, such as a new hire, a termination, the birth of a child, and a job change. For each event, the benefit plans and elections that become available or are lost to employees as the result of that event must be specified. For example, medical, dental, basic life, supplemental life and vision plans can be made available to new hires; by contrast, for the birth of a child, only basic life, supplemental life and medical coverage might be made available to affected employees.
Enrollment Event Rule
Defines coverage start and end dates, waiting periods, coverage increase limits, Evidence of Insurability requirements and other coverage rules and conditions. This ensures that the benefits process presents only the options for which each employee is eligible based on the event type. Defined at the benefit group, enrollment event and benefit type levels.
Event
A transaction that occurs within an organization, such as hiring or terminating an employee.
Faculty Leave
Paid and unpaid leave types that are available only to faculty.
Field (reporting)
In a Report Writer report, a field contains data related to a particular primary or related business object.
Filter
Used to limit the amount of viewable data after running a report. The data is limited by user-entered criteria.
First Day Back at Work
The first calendar day after the last leave of absence day. For example, if a worker’s last leave of absence day is Friday, February 9, then Saturday, February 10 would be the First Day Back at Work. Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
First Day of the Leave
The first calendar day that the employee is unavailable to work. For example, if a sorker’s last day at work is Friday, February 9, then Saturday, February 10 is the First Day of the Leave.
Forward Accrual
Estimates payroll payments to be made in a future payroll period that spans two financial reporting periods.
Frequency
Used in compensation and payroll to help calculate worker compensation and pay.
Full Time Equivalent (FTE) %
The ratio of a worker's scheduled weekly hours to the business site's weekly hours. If a worker works 20 hours a week and the business site's weekly hours are 40, then the worker's FTE is 50 percent.
Functional Area
A functional area is a collection of domain or business process security policies that are related to the same set of product features, for example Benefits or Compensation.
Future Payment Plan
A type of bonus plan that can be paid out over multiple bonus plans, one-time payment plans or both. Any remaining target amount can be paid in a final true up payment.
Get (permission)
Get is an integration action that retrieves Workday data. It is a permission that can be granted in a domain security policy.
Grade Profile
A breakdown of a compensation grade by functional task, geographical region, or other categorization. A profile allows more granular compensation ranges to be assigned to workers.
Gross-to-Net Proration
Proration of a worker's gross-to-net pay as a result of certain mid-period changes, such as a change in tax authorities, that creates sub-periods. Gross-to-net proration results in a separate payment for each gross-to-net sub-period.
Headcount
The number of workers in an organization.
Headcount Group
The basic unit of the headcount management staffing model. One or many headcount groups can be created for an organization, each with its own definition and hiring restrictions. A fixed number of positions to fill in the headcount group can be specified, and hiring can continue until all positions are filled.
Headcount Management Staffing Model
One of the three staffing models available to use in an organization. One set of hiring restrictions can be created that applies to all positions in the headcount group. As a result, headcount management does not provide the same level of control over individual positions as position management. This model is particularly useful for organizations that hire large numbers of workers into the same or similar jobs with the same or similar requirements and restrictions.
Headcount Plan
A headcount plan forecasts the number of workers necessary to achieve business goals in a specified period of time. This is a foundational component of workforce planning. Headcount plans can be created with different statistic types, dimensions and time frames; link to financial budgets; and pre-populate headcount plan data. Headcount plan reports help provide an understanding of whether organizations are hiring to plan, headcount is allocated correctly, and if the right workforce is in place to support your goals.
Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Hiring/Position Restrictions
Use hiring restrictions to define rules and conditions for holding jobs and positions in a position management, headcount management, or job management organization. Hiring restrictions consist of limiting staffing to a specific job family/job profile, limiting to a business site, defining the required qualifications such as experience or skill level, limiting staffing based on a specific worker type, limiting staffing based on a specific time type (full-time or part-time).
Home (landing page)
The default landing page for the user.
Hukou
Used in China, a hukou is a type of residency permit used to grant eligibility and rights. Workers with a local hukou are entitled to the full spectrum of social rights and welfare benefits. Without a local hukou, workers can hold only a temporary residency certificate. Temporary residence certificate holders are referred to as non-locals.
Initiate
Start a business process.
Initiation Step
An initiation step is the first step of a business process.
Integration
The movement of data between two systems. For example, data flows between Workday and Oracle Financials.
Intermittent Leave
A single leave of absence taken as separate blocks of time. To facilitate tracking, time offs can be coordinated with leaves of absence. Validation rules and supporting data for coordinated leaves and time offs can reference combined balances. For example, eligibility and validation rules can check to see if an employee has a sufficient balance across coordinated leave types and time offs to take all days in a leave of absence or time off request.
Intersection Security Group
An intersection security group is one whose members are other security groups. Workers associated with all included security groups are granted access through an intersection security group.
Job Catalog
The collection of user-defined job family groups, which each contain job families, available for use in hiring and other staffing transactions.
Job Category
Attached to a job profile, user-defined job categories allow tracking of additional job information. Job categories can be defined to fit your business. The job category is displayed on the position—based on that position's job profile’s job category—which facilitates reporting at the position level.
Job Classification (Group)
Job classifications are required for many kinds of job-related regulatory reporting and can be used to categorize job profiles. A job classification group is the means by which individual job classifications are grouped and maintained.
Job Family (Group)
A grouping of job profiles, which in turn may be assigned to a job family group, so job profiles can be organized according to how organizations work.
Job Level (Hierarchy)
Categorizes job profiles (and their associated jobs and positions) based on compensable factors such as the level of education, experience or training required to perform a job. Job profiles are assigned job levels, and those job levels are organized into a hierarchy.
Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Job Management Staffing Model
One of the three staffing models available. It provides the least control over the definition of individual positions; the hiring restrictions defined apply to all jobs in the supervisory organization, and only one set of hiring restrictions can be defined per organization. In addition, with job management, specific limits are not set on the number of jobs that can be filled. This model is particularly useful for organizations that prefer to define broad job requirements and rely on staffing workflows and approvals to control the number of workers in a supervisory organization.
Job Profile
Defines generic features and characteristics—such as company insider type, pay rate type, and competencies and proficiencies—of a job and of a position that uses that profile. The more specifically-defined a job profile is, the more specifically-defined those jobs and positions will be, by default. Job profiles are the most specific element in the job catalog; job profiles make up job families, which make up job family groups.
Job Requisition
Enable user to request the approval to fill a position. Job requisitions obtain approval for the timing of the fill and require the complete definition of a position's hiring requirements. All fill events for vacant positions will require an open job requisition.
Job-Based Security Group
A job-based security group includes one or more job-related attributes or objects including job profile, job family, job category, management level, or exempt/non-exempt status.
Landing Page
Landing pages display a collection of different worklets to enable you to quickly view data and perform tasks. Different landing pages have different display formats (grid or bubble) and support different functions. The Home landing page is intended for very common worklets, such as self-service worklets. The Dashboard is a specialized landing page intended for more role-specific worklets, such as analytical worklets.
Last Day Worked
The last day a person is a Carnegie Mellon University employee. This may differ from their actual last day of work.
Leave Family
A set of similar leave of absence types. For example, a company-specific family might include disability leave and bereavement leave, while a separate regulatory family might include jury duty, Family Medical Leave Act (FMLA), and similar leaves. Workday displays the leave family name as a category of leave types for requesters to select from when entering leave requests.
Leave of Absence
Non-timesheet-based leaves that are one week or longer.
Leave of Absence Rule
Can be used to define worker eligibility for leaves of absence and to define validations that prevent users from submitting invalid leave requests.
Leave Type
Defines rules that apply to a specific type of leave of absence, such as jury duty or FMLA. Identifies the leave of absence family and unit of time for leave requests. It can also identify employee eligibility rules for requesting a leave, validation rules for preventing invalid requests, whether to track entitlement balances, and other options.
Life Event
A kind of benefit event that occurs in the employee's personal life, for example getting married or having a child.
Location
The physical building where a worker works. The building name is in the Location field. The work street address is located in Contact Information.
Location Membership Security Group
A location membership security group is one whose members are any workers assigned to that location. Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Management Level (Hierarchy)
Categorizes job profiles (and their associated jobs and positions) based on the management level to which they belong. For example, a particular job or position may belong to the Supervisor, Manager or Individual Contributor management level. Job profiles are assigned management levels, and those management levels are organized into a hierarchy.
Manager Self Service (MSS)
Manager Self Service, also known as MSS, is the functionality for managers to view their team, review notifications and initiate certain tasks.
Manual Payment
An off-cycle calculation that records check or cash payments made outside Workday Payroll.
Matrix Report
There are three types of custom reports: simple, advanced, and matrix. A matrix report forms the foundation for custom analytics. It summarizes data by one or two fields that contain repeating values. The resulting matrix is displayed as either a table or chart that users can drill through to see the associated details. The specific detail data users should see when they drill down is controlled by selecting the desired fields when defining the report. Matrix reports also provide features such as filtering, run time prompts, worklets and report sharing.
Modify (permission)
Modify is an action through the Workday user interface that can be permitted on securable items in a domain security policy. It includes view permission.
Multicurrency
Companies use a base currency for transactions and reporting. Each company in a tenant can have its own base currency. When a transaction currency is different than the company base currency, the transaction is recorded in the transaction currency and automatically converted to the base currency. Default currencies can also be defined for customers and suppliers.
Multiplier-Based Coverage
Insurance coverage based on multiples of salary, for example, 1x, 2x, 3x, 4x, 5x, or 6x salary.
No Retro Processing Prior To date
The earliest date that Workday can process supported retroactive changes for a worker.
Non-active Worker
A worker with a status of Terminated or On Leave for payroll processing purposes. A run category can define rules for processing non-active workers.
Off Cycle
A payment, such as a manual payment or on demand payment, made outside the regularly scheduled payroll run. Reversals and history payments are also classified as off cycle. Off cycle manual and on demand payments enable additional or replacement payments to be issued.
On Cycle
A scheduled payroll run.
On Demand check
Manually processed check generated outside the usual payroll processing cycle.
On Demand Payment
An off cycle payment that replaces, or is issued in addition to, a worker's on cycle pay.
On Hold
Used in a business process to coordinate multiple events that are entered during the same time period. Additional events are placed On Hold until a previously submitted event process is complete.
One-Time Pay
Payment for a Compensation Plan type that is paid one time, such as a bonus. Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Open Enrollment Event
A type of enrollment event that controls the benefits open enrollment process. An open enrollment event applies to an entire, chosen employee population.
Organization
An organization refers to a grouping used to organize people, resources, workers and other organizations. Organizations provide management, visibility into, and reporting (roll-up) structures for resource allocation. Organizations can be defined for application uses like defining departmental hierarchies, project teams, etc. They can also be used to define cost centers and geographic or regional reporting structures.
Organization Security Group
An organization security group is one whose members are any workers assigned to that organization.
Passive Event
Events that result from the passage of time rather than from a specific change to employee data. For example, passive events can be set up to track and manage benefit eligibility for employees who reach the age of 65 (retirement age). Based on the event rules, Workday automatically searches for employees turning 65 and generates an enrollment event to record any benefit gains or losses.
Pay Accumulation
Returns values used in gross-to-net pay calculations. Sums (can add and subtract) the value of a group of earnings, deductions, pay component-related calculations (PCRCs), pay component groups and other pay accumulations. Workday delivers several predefined pay accumulations, such as Federal Taxable Wages by Company and Local Withholding Subject Wages by Company.
Pay Component
An earning (such as base salary or bonus) or deduction (such as federal withholding taxes or medical) that applies to a worker's gross-to-net pay calculation or tax liability.
Pay Component Group
A collection or combination of related earnings, deductions or pay component related calculations that are combined to simplify payroll calculations. Workday provides several pay component groups, such as Employer-Paid Benefits, Pre-Tax Deductions, and Federal Taxable Wages, that you can modify. Pay component groups such as 403(b) Eligible Wages can also be created.
Pay Component Proration
The proration of an earning, deduction or pay component related calculation in response to a mid-period change to a worker's compensation. Workday can proportionately calculate the pay component for each sub-period.
Pay Component Related Calculation
A related calculation that is used in the definition of an earning or deduction.
Pay Group
A group of workers defined to have their pay calculated and processed together. Workers in a pay group must share the same period schedule.
Pay Group Detail
The combination of a run category and period schedule defined for a pay group, such as a regular run category and weekly period schedule. A pay group can have more than one set of pay group details.
Pay Rate Type
Defines whether the worker is paid a salary or a certain amount per unit of time, for example hourly or weekly. Defined by country and associated with job profiles and, by extension, with employees in that job profile.
Pay Run Group
A convenience feature used to process multiple pay groups with the same period schedule at the same time. When adding a pay group to a pay run group, select which of the pay group’s run categories to include. The selected run categories must share the same schedule. Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Payment Elections
Control how to pay workers for each type of pay that they receive, such as regular payments and bonus payments. Payment elections designate the payment type (check or direct deposit), account information for direct deposits, payment order and the distribution of balance for split payments.
Payroll Effect
An option available in Workday Absence Management to stop paying workers while on leave. Run categories can be configured to pay workers on certain leave types when the Payroll Effect option is enabled for the leave type.
Payroll History
Payments made to employees before using Workday Payroll that are loaded into Workday to establish starting balances for workers. Carnegie Mellon University payroll information prior to Workday will be available in iPay as view only.
Payroll Input
Rates, units, amounts or other values that are entered manually or loaded into Workday Payroll for a worker's on cycle or off cycle run. Sometimes referred to as worker input.
Payroll Period Schedule
Defines when and how often to process payroll. Defines payment dates and forward accruals using a Period Start Date, Period End Date and Payroll Payment Date. Period schedules can be associated with any run category or pay group with the same payment frequency.
Payslip
Online or printed summary of an employee's gross-to-net earnings. Also referred to as a pay stub.
Period Schedule
Defines the accrual frequency for a time off plan, such as annual or monthly (unless the plan has a custom frequency), and the start and end date of each reporting period. The period controls reporting of both accruals and time off requests.
Position
A unique “seat” with a number identifier in a Supervisory Organization. All Hires are placed into Positions.
Position Management Staffing Model
The staffing model that provides the tightest control over hiring, as different staffing rules and restrictions can be specified for each position. Carnegie Mellon University is using this staffing model.
Position Requirements
Used in job requisitions to define rules and conditions for holding positions in a supervisory organization using position management as its staffing model.
Position requirements enable you to limit staffing to specific job families and job profiles; restrict the business sites where a position can be filled; define the required qualifications, experience and skill levels of workers hired into a position; limit staffing for a position to a specific worker type (employees or contingent workers); limit staffing for a position to a specific time type (full or part-time workers).
Pre-Hire
Used in Staffing to identify and track individuals prior to employment. Used in Recruiting to identify candidates who are in the Offer or Background Check stage.
Predefined security Group
Workers are assigned to the predefined security groups through a business process. These groups cannot be changed except by reversing the business process or executing a new business process, such as applying for a position or being hired. Examples include Employee, Contingent Worker and Pre-Hire.
Prenotifications (Prenotes)
Optional live or zero-dollar entries that are sent through the Automated Clearing House (ACH) to a financial institution to verify account and related information before sending or receiving actual direct deposits. If the prenote amount is not zero, cash is transferred to the account. Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Primary Business Object
When defining a report, the primary business object is the business object returned by the data source.
Project
An undertaking that encompasses a set of tasks or activities having a definable starting point and well defined objectives. Usually each task has a planned completion data (due date) and assigned resources.
Prompt (reporting)
A Report Writer report can be defined so that it prompts the user for filtering criteria when they run the report. Report prompts can also be built in to a data source.
Proration
Used to create sub-periods when there is a change in the workers compensation mid-period. Proration is set up on the Calculation Details tab of Create Earning or Create Deduction and the Compensation Element tab of Create Earning. It can be based on calendar days or days worked (work shift).
Quick Add
A time entry method that enables a time block to be created and copied to multiple days in a week.
Reference Pay Range
A range of pay deemed appropriate for a compensation grade or grade profile. During compensation transactions, if proposed compensation for an employee extends beyond the limits of the range for the employee's grade or grade profile, Workday issues a warning yet still permits submission of the proposed compensation.
Related Business Object
When defining a report, fields that return objects related to the primary business object are said to contain related business objects. These related objects may have their own set of fields that can be included in the report as well.
Replacement Payment
An off cycle payment that replaces a worker's on cycle payment in a period that is in progress or not yet started. Replacement payments can be processed as part of a manual payment or on demand payment.
Report Data Sources
Predefined groups of logically related fields, used when creating reports with Report Writer, which define the data in the report row. For example, the report data source “Employees” contains contact information, personal data and identification information. Report data sources also include which roles have access to see the report data.
Reported Time
A worker's time that has been entered onto the time entry calendar, but has not had any time calculations applied.
Rescind (business process)
Rescinding a business process operates on completed business processes. It completely reverses all changes made to Workday data. It is also a securable action in a business process security policy.
Reversal
An off cycle calculation that reverses the results of a completed pay calculation for a worker.
Role-Based Security Group
A role-based security group specifies one organization role and includes workers in job positions defined for that organization role.
Roles
Roles define a group of people with specific responsibilities and permissions. When a business process runs, the role for each step includes all of the workers in that role in the business process target organization.
Routing
The automated movement of a business process from one role to another role. Routing rules are, in part, based on the type of transaction, supervisory organization, employee type and who initiated the transaction. Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Run Category
Defines a type of payroll run, such as regular or bonus. Specifies criteria for processing employees by status (Active, Terminated, On Leave), components to calculate automatically for on cycle and off cycle runs, whether a supplemental tax rate applies and other details. Run categories are assigned to pay groups.
Scheduled Weekly Hours
The hours a worker is scheduled to work per week. This may different from the hours actually worked.
Securable Item
A securable item is an action, report or data that is part of a security policy. Access can be secured by defining the security policy to restrict access to the item to specified security groups. Related securable items are grouped into domains. Also, business-process-related actions are securable items.
Security Group
A security group is a collection of users or a collection of objects that are related to users. Allowing a security group access to a securable item in a security policy grants access to the users associated with the security group.
Segment
A security segment is a grouping of related securable items, such as pay components, that can be secured together using a segment-based security group for that segment.
Settlement
The agreed upon terms for an employee’s separation from Carnegie Mellon University.
Simple Report
There are three types of custom reports: simple, advanced, and matrix. A simple report provides straightforward design options for the beginning or occasional user to create reports quickly and easily.
Staffing Event
Any event that changes an employee's position or job, for example a hire, transfer or promotion. Staffing events usually trigger an opportunity to change benefits elections.
Staffing Model
Defines how jobs and positions are created and filled in a supervisory organization. Workday supports three kinds of staffing models: Job Management, Headcount Management, Position Management.
Standard Report
Standard reports are developed by Workday and delivered to all Workday customers. Depending on the reporting requirements, standard reports may be defined using the Workday Report Writer or in XpressO (Workday's internal development tool). Standard reports that were designed using the Report Writer can be copied to create a custom report and then modified according to user requirements.
Student Wages Hourly
Base wages for student workers.
Sub-Period
A partial period created when there is a change in a worker's compensation mid-period. Payments are prorated over each sub-period according to the change in compensation and the settings on the Compensation Element tab of Create Earning.
Subfield
Subfields are additional details about a field, like a master/detail relationship. Subfields are used when creating reports using Report Writer.
Subject Wages
All of a worker's wages subject to a particular tax, including wages for exempt positions and those that exceed a wage cap. See Taxable Wages.
Supervisory Organization
An organization for a group of workers that report directly to one manager.
Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Supplemental Earning
Any compensation paid in addition to an employee's regular wages that includes, but is not limited to, severance or dismissal pay, vacation pay, back pay, bonuses, moving expenses, overtime, taxable fringe benefits and commissions. In Workday, only supplemental earnings can be grossed-up.
Supported Retro Transaction
A type of transaction entered for a prior period, such as a retroactive compensation change, for which the Retro Pay Calculation process can automatically recalculate employee earnings and deductions.
Task
A business process step that must be completed. For example, steps in a business process trigger task alert notifications.
Taxable Wages
All of a worker's wages subject to a particular tax, excluding wages for exempt positions and those that exceed a wage cap.
Temporary Report
Any custom report can be made temporary. When creating or copying simple report types, select the Temporary option when creating the report, which results in automatic deletion of the report after seven days. Similarly, for advanced and matrix report types, set the Temporary option when creating the report, and by default the report will be deleted automatically after seven days. The default deletion date can be changed on the Advanced tab of the report definition.
Tenant
Carnegie Mellon University’s version of Workday.
Termination
An employee voluntarily or involuntarily leaving Carnegie Mellon University.
Termination Adjustment
A time off adjustment that automatically sets the remaining balance of a worker's time off plan to zero upon the worker's termination.
Termination Date
The first full day a person is no longer a Carnegie Mellon University employee.
Time Block
A time block carries information about a portion of time, such as the number of hours worked or in/out times. Time blocks can be reported or calculated, but only calculated time blocks are pulled into Workday Payroll.
Time Calculation
A set of rules to apply time calculation tags to calculated time blocks for Payroll or other purposes. For example, a time calculation could be created to automatically convert regular hours into overtime hours if a worker works more than 40 hours in a week.
Time Calculation Tag
Workday applies calculation tags to time blocks during time calculations. The tags map to payroll earnings to drive how time blocks are paid and can be included in time off and accrual calculations. They can be used to display time and time off totals on the time entry calendar.
Time Clock Event
A time clock event describes a worker's actions, such as a check-in or check-out, on the web time clock or an external collection system. Workday matches time clock events to form time blocks, which workers can edit and submit using the time entry calendar.
Time Code Group
The primary use of time code groups is to determine which time entry codes a worker is eligible for. Time code groups are assigned to a worker or to a position via eligibility rules.
Time Entry Calendar
A set of self-service pages that workers use to enter, edit and view time.
Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Time Entry Code
A time entry code describes the type of time a worker enters, such as worked time or meal allowance. In order to use time entry codes they must be attached to time code groups, with the exception of the default time entry code assigned to a time entry template.
Time Entry Template
A template defines how a worker's time entry calendar is configured. Workers are matched to time entry templates through eligibility rules.
Time Entry Validation
Errors or warnings that prevent users from entering invalid time. Critical validations prevent a user from submitting time. Warnings appear on the time entry calendar but do not prevent the user from submitting time.
Time Off
Reported time that is not worked. Common types of Time Off include Paid Time Off and jury duty.
Time Off Plan
Defines rules for entering and tracking one or more related time offs. Identifies the unit of time (hours or days), eligibility requirements, whether to track balances, and if time offs are position-based or worker-based. Time off plans that track balances also specify the balance period (plan year), accruals that add to the plan balance, carryover limits and other balance tracking rules.
Time Off Type
Names a type of time off users can request, such as Paid Time Off. This is the name users see when entering a time off request. A time off type can be associated with more than one time off.
Time Period Schedule
A time period schedule defines which dates are available for entry at a given time and defines which dates will be paid in which pay periods. They can line up with pay periods or, in more complex scenarios, they can be paid on a lag.
Time Shift
A grouping of consecutive time blocks that you can use in standard overtime calculations, time block conditional calculations and validations.
Time Type
A characteristic of a job profile that categorizes the amount of time required for the job or position, such as full time or part time. In Workday, the time type is specified in the Create Position, Create Headcount or Set Hiring Restrictions tasks. The value defaults to the value defined on the job profile by the manager, HR Partner or other authorized role.
Time-Off Type
Time off that an employee can request such as Paid Time Off or Jury Duty.
To-Dos
To-Dos are reminders to do something outside of the Workday system. They can be part of business processes and have to be marked complete before the workflow will go to the next step.
True Up
To pay the outstanding balance for one or more bonus plans in order to meet the bonus target.
Union Organization
A grouping for all employees who belong to specific unions.
Unsupported Retro Transaction
A type of transaction entered for a prior period, for which the Retro Pay Calculation process cannot automatically recalculate employee earnings and deductions. Workday identifies these transactions so that the necessary adjustments can be manually entered.
User-Based Security Group
A user-based security group has workers as members. When used in a security policy, it grants access to the securable items to all members of the group.
Workday Business User Terminology Glossary
Workday Business User Terminology Glossary
Validation Rules
Rules that prevent the entry of invalid time off requests or that trigger an error or warning message upon submission of an invalid leave of absence request. For example, a validation rule can prevent the entry of unpaid time off or requests of less than four hours. A validation rule for a leave of absence can ensure that an employee does not exceed the maximum number of leave days allowed each year.
View (business process)
Viewing a business process means seeing its status and reporting on it. This is a securable item in a business process security policy.
Work Assignment
Wages for non-exempt faculty.
Work Schedule Calendar
In Time Tracking, standard work patterns for workers can be defined, such as Monday through Friday, 8:00 a.m. to 5:00 p.m. Work schedule calendars are used for a variety of purposes throughout Time Tracking.
Work Week
A seven-day period defined by a worker's start day of week and day breaker. By default, begins on Sunday at midnight and ends on the following Saturday at 11:59 p.m.; however, this can be configured for a group of workers through the use of work schedule calendars. Used for time entry and time calculations.
Worker
A person who is either an employee hired by a company or a contingent worker contracted by a company.
Worker Eligibility
Identifies the conditions a worker must meet to be eligible to receive a particular earning or deduction.
Worker Sub-type
A further categorization of Worker Type that is used on a Job Requisition. Examples include Faculty, Staff, etc.
Worker Tax Elections
A worker's marital status, number of elections, exemption status and other information required for tax calculations, as specified through the Add Worker Tax Elections task.
Worker Type
Employee or Contingent Worker. There can also be several user-defined types of contingent workers. Compensation, benefits and staffing events are tied to the worker type.
Workday Business User Terminology Glossary

Thursday 12 March 2015

ANT(Another Neat Tool)



A  N T
(Another Neat Tool)



[ANT Topics List]

  • Definition of ANT
  • What is a Build Tool?
  • Need of ANT Software
  • Advantages and Features of ANT
  • History of ANT
  • Comparing ANT with some known build techniques
  • ANT Software installation
  • ANT software folder hierarchy
  • Setting environment with ANT software
  • Verifying ANT installation
  • Finding different options of ant command
  • ANT Basics
  • Sample Programs







Definition of ANT
Ant is a Java based, open source, platform-independent build automation tool.
It is written purely in Java for automating Java projects build process.

Ant is a powerful technique that helps the developers to convert their developmental structures in deployment structures.

ANT software is developed by James Duncan Davidson to help building Tomcat.

It is developed in XML scripting using Java classes that ensures its extensibility to any development environment based on Java.

Ant is a free tool under the GNU License and is freely available at http://jakarta.apache.org/ant/

What is a Build Tool, build process, and why ANT software is called Build tool?
In ANT software terminology
- Build means “collection of all components of a project”.
- Build Process means “collecting all components of a project”. It means transforming the source into deployable and useable software is called build process”.

In general terms,
-          The war file creation process is called build process and
-          that war file is called build

Build tool is software that provides a mechanism to describe the operations and structure of the build process. Since ANT software provides a way to build Java projects, it is called Build tool.

To understand more about the above words, consider what is required to build a software system. Typically, there is much more to building software than just typing in and then compiling the source code.

There are a number of steps required to transform the source into a deployable and useable software solution. The following is a hypothetical build process you might use with a simple software system
1.    Get the source. You may need to download or fetch the source from a source code repository (CVS/SVN). For this, you might need to know the tag or version of the source code you want to build.
2.    Prepare a build area. You will probably want to create a set of directories, perhaps according to some standardized directory layout.
3.    Configure the build. In this step, you will determine what optional components can be built based on the current environment. You might want to set build numbers and version numbers to be included in the build.
4.    Validate the source code. You may have a standard style guide and you wish to ensure all code conforms to this before you build a release.
5.    Compile the source code
6.    Build the compiled code into libraries potentially including non-code resources such as properties, images and sound files.
7.    Run the system's tests to validate the build.
8.    Build the documentation for the software. This may range from something as simple as collecting text files up to processing content through some form of publishing system to produce the documentation in its final form
9.    Package up all of the components of the software – code, resources, images, documentation, etc. – into a deployable package. You might need to produce several packages in different formats for different target users
10.  Deploy the software to some standard location for use or distribution

If you try to use a manual process for building your software you would find it to be tedious, error prone and, in general, not very repeatable. You might forget to set the version number or to provide a tar file for Unix users. You might change the directory structure, confusing users who upgrade from the previous version of the software. Even worse, you may forget to test the software and ship a version that may not even work. Such ad-hoc build processes are always a source of problems and the best solution is to automate the build process. The tools you use to automate the build process are known, unsurprisingly, as build tools. Ant is such a tool.

Need of ANT
Ant is developed by Apache Foundation specifically to build projects based on java platform.

But why to use Ant if there already exists other build tools like make, jam and many. Tool like make uses shell commands that facilitate integration of other tools to extend its functionality on the operating system where it runs. But this limits the functionality of the build tool specific to that OS only, e.g., make is specific to the UNIX platform. Ant has overcome this shortcoming as it uses java classes with XML scripting that makes it portable through cross-platform behaviour.

Ant enables automatic generation of build processes that is more reliable than manual procedures. Ant can also compile source code from version controls and package the compiled code and other resources (JAR, EAR, TAR etc.).

It allows the developer to automate the repeated process involved in the development of J2EE application. Developers can easily write the script to automate the build process like compilation, archiving and deployment.

A build process is an essential part of any development cycle because it removes the gap between the development, integration, and test environments. It also helps to remove other issues while deploying such as compilation, classpath, or properties that cost many projects time and money.

Advantages of ANT over other Build techniques
  1. Since the software is developed in JAVA, the ANT script file is Platform independent, hence no need to write separate file per Operating system.
  2. Since it accepts instructions in the form of XML documents thus it is extensible and easy to maintain.
  3. Commands are executed in a controlled manner; if one command execution is failed its dependent command execution can be terminated.
  4. Executes only the required commands.
  5. Single point of modification of order of commands execution
  6. Like this we have many other advantages, you will learn them as part of course

Features of ANT
The best features of the Ant technology can be summarized as below -
Easy to Use: It is not a programming language, it is an XML based scripting tool, therefore easy to understand and implement.
Portable and Cross-platform based: Uses of Java classes makes it portable, i.e., it can be run on any operating system.
Extended Functionality: Ant is based on java platform, that’s why its functionality can be extended to any development environment based on java. It is easier to implement than any specific IDE because it is automated and ubiquitous.
Build Automation: Ant provides automated build processes that is faster and more efficient than manual procedures and other build tools can also be integrated with it.
Compilation of Source Code: Ant can use and compile source code from a variety of version controls and packaging of the compiled code and resources can also be done.
Handling Dependencies between Targets: An Ant Project describes the target and tasks associated with it and also handles dependencies between various targets and tasks.





History of ANT
The following is a brief history of Ant. It will give you a flavour for the evolution of Ant.

Ant started life as a quick hack by James Duncan Davidson to help building Tomcat, which was, at the time, Sun's servlet engine in development. Ant was originally developed on a Windows laptop, which some people find surprising. James was instrumental in the donation of the Tomcat codebase to the Apache Software Foundation by Sun to form the Apache Jakarta project. Included, indeed some might say tucked away, in that donation was Ant. Apparently the name started out as an acronym for "Another Neat Tool".

Ant was added to the jakarta-tools CVS repository on October 9th, 1999. At this time, Ant was still considered part of the Tomcat project. It underwent development as part of the Tomcat project and at around Christmas 1999, Ant was released as a part of Tomcat 3.0. With this release, many people began to see Ant in operation and how it could be used to build software. Already people within the Apache Jakarta and XML projects had begun to use Ant to build other projects besides Tomcat. For example the Xerces XML parser project began using Ant in November 1999.

It became clear, with Ant's increasing popularity, that it was not really suitable to remain a part of Tomcat and that it should become a top level sub-project of the Apache Jakarta project. In February 2000, the code for Ant was moved to its own repository, jakarta-ant, at Apache. After some significant development work, Ant 1.1 was released in July, 2000. This was the first official release of Ant as a separate entity. To avoid confusion with the version released with Tomcat, there was never a 1.0 release of Ant. In the end, the original release as part of Tomcat 3.0 came to be known as Ant 0.3.

In November 2002, The Apache board promoted Ant to a top–level Apache project.

Since that initial release of Ant 1.1, there have been regular updates to Ant. For latest release check ANT home page http://ant.apache.org/.

Comparison of ANT with some known build techniques
Before ANT, developers used some kind of extension files for executing more than one command / task on command prompt (md, cd, copy, delete, javac etc), the extensions are .bat (batch), .cmd, .sh, etc... So with these files developer need not have to executes each command on command prompt, instead developer can write all these commands on a plain notepad, save with .bat extension and runs for many times

Below I have given problems with these files, and solutions for these problems using ANT





Problem 1:
If developer write one bat file for WINDOWS OS, the same file need to developed for other OSs also

Solution with ANT
Instead of running .bat file on OS (C:\>a.bat), ANT tool written in Java programming language (it is a java class). This tool nothing but a java class runs on any OS, but developer must write and give all the commands in a plain notepad file / text editor, save the file with .xml extension and passes into ANT tool (java class). ANT tool reads each command from .xml file, verifies current OS and converts commands into OS specific command

"ANT is a Platform Independent Build/Batch Process Automation Tool"

Problem 2:
In a batch file if javac command followed by java command is written, batch runs each command one after another (sequential manner) without verifying whether previous command(s) are executed.

Solution with ANT
In ANT all the commands are written and given in a XML file [called build.xml], when writing commands in this file, we can link one command to another command. If first command execution fails the second command won't execute and the batch processing will come out with a detailed error statements.

“This way ANT executes commands in a controlled manner”

Problem 3:
In .bat file if the sequence of commands execution wants to be changed we need to cut and paste the sequence of commands

Solution with ANT
Though all commands are written in sequence they are not executed in given sequential manner. Their sequence must be specified at the end of the document. If the commands sequence want to changed we must modify last statement but not the whole XML document

In this way we can achieve single point of modification to the execution sequence of commands.







ANT Installation procedure
Download ANT distribution file from Apache home site http://ant.apache.org/.

Click on http://ant.apache.org/bindownload.cgi. It takes you to download page
Download zip extension file for Windows and tar.gz extension file Linux/Solaris OS.

Installing ANT software is simply extract that file into a drive, assume “C” drive. Once it is extracted you will find a folder
apache-ant-<version>
Ex: apache-ant-1.8.1

Therefore, The ANT_HOME will be C:\apache-ant-1.8.1.

ANT software installation is completed, now check its folders and jar files to update required environment variables.

ANT folder hierarchy

Directories provided with Ant
bin - Batch files, Perl scripts, and shell scripts for running Ant.
docs - Ant documentation.
lib - Libraries required by Ant to run.
src - Source code for Ant. Provided only in the source distribution. 

Like other softwares,
Ø  all its binary files are stored in bin folder and
Ø  all its library files are stored in lib folder

Ant.bat is the main binary file used to execute build.xml. Hence, it must be accessed throughout the system.

In order to use this file from all drives and folders of computer we must create and update below environment variables.

Environment setup for ANT
Below environment variables must be created or updated to use ANT software.
Ø  JAVA_HOME
Ø  ANT_HOME
Ø  Path

Flow below steps to create and update above environment variables permanently
1.      Right click on "My Computer", Click on "Properties",
Below window is opened
2.      Click on "Advanced System Settings" hyper link, below window is opened
3.      Click on "Environment Variables" button, below window is opened

  1. In System Variables portion click New button, to create ANT_HOME environment variable, below window is opened

  1. Enter
Variable name as- ANT_HOME
Variable value as- C:\apache-ant-1.8.1
            As show in the below diagram
       
     click on Ok
It is always good practice to set software home directory with an environment variable.
  1. Follow the same above steps and create JAVA_HOME environment variable, if not yet created.
  2. To add ant binary files path, select Path environment variable and click on Edit button,

  1. Press End key on your key board, press “;” and then add the path
C:\apache-ant-1.8.1\bin.
  1. Click on Ok till all windows are closed.
Note: No need to set CLASSPATH environment variable for ANT.

Now your system is updated with ANT software. Rock !!!!! now.

Verifying ANT installation
Flow below steps to check ant installation

  1. Open command Prompt [window+R, type cmd, press Enter key]
  2. Type the command ant, press Enter key. If the following message
 
appears, then it indicates that your installation is successful;
Ant is properly installed in your system. 

  1. If the following message is appeared,
It means you did not update Path environment variable correctly, double check it again.

Finding different Options of ANT command
Type below command at command prompt, it shows all options of ant command J
            C:\>ant –Naresh Technologies










Sample Programs

/**
 * Below program explains compiling and executing using ant script
 *
 * Create a folder "anttest"
 * Save this file with HelloWord.java in this folder.
 */
package anttest;
public class  HelloWorld
{
            public static void main(String[] args)
            {
                        System.out.println("Hello World!");
            }
}


<!-- Save this file as build.xml -->
<project name="test" basedir=".">
            <target name="compile">
                        <javac srcdir="./anttest"></javac>
            </target>
            <target name="execute">
                        <java classname="anttest.HelloWorld"></java>
            </target>
</project>

<!--
Execution:
1. Open command prompt
2. Change directory to current working directory
3. type the command "ant compile execute"
-->











<!-- build.xml with the attribute "depends", and execute with the command "ant execute"-->
<project name="test" basedir=".">
            <target name="compile">
                        <javac srcdir="./anttest"></javac>
            </target>
            <target name="execute" depends="compile">
                        <java classname="anttest.HelloWorld"></java>
            </target></project>

<!-- build.xml with the attribute "default", and execute with the command just "ant"-->
<project name="test" basedir="." default="execute">
            <target name="compile">
                        <javac srcdir="./anttest"></javac>
            </target>
            <target name="execute" depends="compile">
                        <java classname="anttest.HelloWorld"></java>
            </target>
</project>


<!-- build.xml with the attribute "default" with a target to have centralized place to change the order of execution of targets -->
<project name="test" basedir="." default="all">
            <target name="compile">
                        <javac srcdir="./anttest"></javac>
            </target>
           
            <target name="execute" depends="compile">
                        <java classname="anttest.HelloWorld"></java>
            </target>

            <target name="all" depends="compile, execute"/>
</project>











<!-- build.xml to create directory and store class files in that directory -->
<project name="test" basedir="." default="all">

            <target name="mkdir">
                        <mkdir dir="./build"/>
            </target>

            <target name="compile" depends="mkdir">
                        <javac srcdir="./src/anttest" destdir="./build"></javac>
            </target>        

            <target name="execute" depends="compile">
                        <java classname="anttest.HelloWorld" classpath="./build">
</java>
            </target>

            <target name="all" depends="execute"/>
</project>

<!-- build.xml to create executable jar file, adding manifest attributes to execute class from jar -->
<project name="test" basedir="." default="all">

    <target name="clean">
        <delete dir="build"/>
    </target>

    <target name="compile" depends="clean" >
        <mkdir dir="build/classes"/>
        <javac srcdir="src" destdir="build/classes"/>
    </target>

    <target name="jar" depends="compile">
        <mkdir dir="build/jar"/>
       
            <jar destfile="build/jar/HelloWorld.jar" basedir="build/classes">
            <manifest>
                <attribute name="Main-Class" value="anttest.HelloWorld"/>
            </manifest>
          </jar>
    </target>

    <target name="execute" depends="jar">
        <java jar="build/jar/HelloWorld.jar" fork="true"/>
    </target>
           
            <target name="all" depends="execute"/>
</project>

<!-- build.xml with property tag-->
<project name="HelloWorld" basedir="." default="main">

    <property name="src.dir"     value="src"/>

    <property name="build.dir"   value="build"/>
    <property name="classes.dir" value="${build.dir}/classes"/>
    <property name="jar.dir"     value="${build.dir}/jar"/>

    <property name="main-class"  value="anttest.HelloWorld"/>


    <target name="clean">
        <delete dir="${build.dir}"/>
    </target>

    <target name="compile" depends="clean">
        <mkdir dir="${classes.dir}"/>
        <javac srcdir="${src.dir}" destdir="${classes.dir}"/>
    </target>

    <target name="jar" depends="compile">
        <mkdir dir="${jar.dir}"/>
        <jar destfile="${jar.dir}/${ant.project.name}.jar"
basedir="${classes.dir}">
            <manifest>
                <attribute name="Main-Class" value="${main-class}"/>
            </manifest>
        </jar>
    </target>

    <target name="execute" depends="jar">
        <java jar="${jar.dir}/${ant.project.name}.jar" fork="true"/>
    </target>

     <target name="main" depends="execute"/>
</project>


Creating a deployable WAR file from Eclipse Project
Below ant script shows preparing deployable war file of a web application, that is created using Eclipse and then deploy that war file directly into Tomcat server.

Steps to prepare war file using Eclipse directly – not using ANT
Eclipse allows us to run the application and then export the application to a standard WAR file. But then someone has to manually do the following steps:
·         Export the project to a WAR file using Eclipse Interface
·         Copy the WAR file from the location created to the Tomcat webapps folder

Here is a better alternative and a solution to the question:

Create an ANT script that will look at the Eclipse Project structure and build the WAR file and copy over the WAR file to the destination (Tomcat webapps folder).

Here is the ANT script:

<project name="Deploy From Eclipse to Tomcat" basedir=".">
      <property name="warfile" value="test"/>
             <target name="unpack">
                        <unwar src="${warfile}.war" dest="${warfile}" />
             </target>

            <target name="create">
                <war destfile="${warfile}.war" webxml="WebContent/WEB-INF/web.xml"  update="true">
     <classes dir="build\classes"/>
                       <fileset dir="WebContent">
                           <exclude name="WEB-INF/web.xml"/>
                      </fileset>
               </war>
            </target>

            <target name="copy">
             <copy todir="C:\apache-tomcat-6.0.26\webapps" overwrite="true">
                     <fileset dir=".">
                        <include name="*.war"/>
                     </fileset>
             </copy>
            </target>

            <target name="deploy">
            <antcall target="create"/>
            <antcall target="copy"/>
           </target>
</project>

Save the above code into a file and name it “build.xml”. Place the build.xml into the root folder of your eclipse project. For example, if “C:\AntTest” is my eclipse workspace and “HelloServlet” is the name of my project then all the files related to the project will be under “C:\AntTest\HelloServlet”.