Professional Documents
Culture Documents
Salary Processing Use Case: Scenario of Workflow
Salary Processing Use Case: Scenario of Workflow
In this document we will see how to perform various operations like lookup, group by, sorting, merging,
renaming etc. We will implement Salary Processing Use case in which we calculate employee net salary
considering his total working hours and allowance according to designation. We will be reading data from
three input files and consolidating the data to achieve the task. After calculating net salary of each employee,
we will send XML output file via email to a particular person.
Scenario of Workflow
Building workflow
1. In process studio, create a new workflow and save it as shown in below images:
3. Drag and drop a “Microsoft Excel input” step to read “Employee_List.xlsx” file. Double click on it to configure it
as follows:
Files Tab:
1. Rename the step as “INF_EmployeeDetails”
2. In “Spread sheet type (engine)” field, select file extension as “Excel 2007 XLSX (Apache POI)”
3. Browse the file “Employee_List.xlsx”
4. Click on “Add” button and it will added to “Selected Files” section
© 2018 AutomationEdge Inc. All Rights Reserved.
This document is for your company’s internal use only and may not be distributed to any third party.
5. Click on “Show filename(s)” button to ensure about the path and extension of the input file.
Sheets Tab:
Click on “Get fields from header row” button to fetch all columns from the input file.
Note: You can select “Format” also if required for any column.
© 2018 AutomationEdge Inc. All Rights Reserved.
This document is for your company’s internal use only and may not be distributed to any third party.
Click on “Preview rows” button to ensure that it is reading data from input file or not.
4. Drag and drop another “Microsoft Excel input” step to read “Employee_TimeSheets.xlsx” file. Double click on
it to configure it as follows:
© 2018 AutomationEdge Inc. All Rights Reserved.
This document is for your company’s internal use only and may not be distributed to any third party.
Files Tab:
1. Rename the step as “INF_TimeSheetDetails”
2. In “Spread sheet type (engine)” field, select file extension as “Excel 2007 XLSX (Apache POI)”
3. Browse the file “Employee_timeSheets.xlsx”
4. Click on “Add” button and it will added to “Selected Files” section
5. Click on “Show filename(s)” button to ensure about the path and extension of the input file.
Sheets Tab:
Click on “Get fields from header row” button to fetch all columns from the input file.
Note: You can select “Format” also if required for any column.
© 2018 AutomationEdge Inc. All Rights Reserved.
This document is for your company’s internal use only and may not be distributed to any third party.
Click on “Preview rows” button to ensure that it is reading data from input file or not.
6. Drag and drop “Group By” step to calculate the total working hours of each employee. Refer below image to
configure its properties:
Save and execute your workflow. You can see the result of “Group By” step in “Preview data” tab as shown in
below image:
8. Drag and drop “Sort rows” step to sort the data by “Role”. Double-click on it to configure its property as
shown in below image:
9. Drag and drop “Microsoft Excel input” step to read “AllowanceInput.xlsx” file. Double click on it to configure it
as follows:
Files Tab:
1. Rename the step as “INF_AllowanceDetails”
2. In “Spread sheet type (engine)” field, select file extension as “Excel 2007 XLSX (Apache POI)”
3. Browse the file “AllowanceInput.xlsx”
4. Click on “Add” button and it will added to “Selected Files” section
5. Click on “Show filename(s)” button to ensure about the path and extension of the input file.
Click on “Get fields from header row” button to fetch all columns from the input file.
Note: You can select “Format” also if required for any column.
10. Drag and drop “Sort rows” step to sort the allowance data by “Role”. Double-click on it to configure its
property as shown in below image:
12. Drag and drop “Rename Fields” step to rename any field and remove any unwanted fields from the workflow
stream. Refer below image to configure its properties:
Click on “Get fields to select” button to fetch all the fields available in workflow stream.
14. Now we need to save output in an XML file. Drag and drop “XML Output” step and connect it with the
previous step (Calc_TotalSalary) step. Double-click on it to configure its properties:
File Tab:
Specify a Filename with complete path where you want to save the output file.
Mention Extension as “xml”
“Add filenames to result” checkbox should be checked. If it is not, then output file will not be added to the
result for further processing e.g. sending o/p file as an attachment in an email.
Fields Tab:
Click on “Get Fields” button to fetch all the fields available in workflow stream
In Content type column, select “Element” or “Attribute” from drop-down depending on your requirement,
which column you want to save as element (XML tag) and which one as attribute of that element.
© 2018 AutomationEdge Inc. All Rights Reserved.
This document is for your company’s internal use only and may not be distributed to any third party.
Let see the output file, if we select “Element” for every field as shown in below figure:
Now, let see the output file, if we select “Element” for few fields and “Attribute” for few fields as shown in
below figure:
© 2018 AutomationEdge Inc. All Rights Reserved.
This document is for your company’s internal use only and may not be distributed to any third party.
Save and Run the workflow.
Building Process
15. In process studio, create a new process and save it as shown in below images:
16. In process, we need put entries “START” and “Success” in starting and at the end of the process as shown in
below image:
Note:
${Internal.Entry.Current.Directory}: It refers to the current directory of “PR_SalaryProcessing.psp”, so that if
you change the location of your parent folder (where you are saving all workflows/process, input/output
folder), then also no change is required in path of “WF_SalaryProcessing.psw” workflow in “Workflow” entry.
Server Tab:
Message Settings:
Include date in message? : If you want to include date in mail body, then you can select this
checkbox.
Only send comment in mail body? : By selecting this checkbox, mail body doesn’t include auto-
generated code. It will include only “Comment” in mail body which we have defined.
Use HTML format in mail body: select this checkbox when you are using HTML tags in “Comment”.
Manage priority: You can prioritize the email selecting this checkbox.
Message:
Note: If you are using HTML tags in “Comment”, check the “Use HTML format in mail body” checkbox to
enable it. Otherwise it won’t work.
Check the “Attach file(s) to message?” checkbox and choose “General” from “Select file type:” list as shown in
below image: