Skip to content

Utilizing the power of GA workflow engine to propel leave approval system

🚀 Welcome to the inside scoop, fellow creators and innovators! Right here on GA_Universe, we're all about turning your big ideas into reality, minus the coding headaches. Today, we're diving into a game-changer: building your very own leave request tool. And guess what? It's so easy, you'll wonder why you didn't start sooner. 🎉

Before we leap into the world of drag-and-drop magic, let's talk shop for a sec. 🛠️ To make this magic happen, you'll need a tiny bit of prep: a pre-connected MongoDB. Why MongoDB, you ask? Well, in the galaxy of databases, it's like the friendly alien that gets along with everyone. It's non-relational, super scalable, and accessible, making it the perfect sidekick for our adventure. If you're feeling adventurous, you can flirt with other databases, but MongoDB is our date to the prom, and you're about to see why. 💃🕺

So, you're probably thinking, "But why an internal tool for leave requests?" Come closer, friend. Imagine a world where requesting leave doesn't involve chasing approvals or getting lost in email threads. A world where everything is smooth, automated, and transparent. That's not just a dream; it's about to be your reality.

Stick with us, and we'll show you how to craft this no-code masterpiece right here in GA_Universe. From setting up your database to launching your tool, we've got you covered. Ready to revolutionize the way your team handles time off? Let's get this party started! 🎈👨‍💻

🔥 Step 1: Crafting the Enums like a Pro 🔥

Alright, brace yourselves, because we're about to dive deep into the heart of our leave request tool - and it all starts with enums. Enums, short for enumerations, are about to become your new best friends. They're like the secret sauce that adds that extra zing to your data models. 🌶️

First things first, let's get our hands dirty (not literally, though - this is all clean, no-code fun!). Here’s how you get the party started:

  1. Zoom Over to Settings: Picture yourself as a digital explorer, navigating through the vast expanse of GA_Universe. Your first destination? The settings area. It's not hidden in an asteroid field or anything; you can easily find it on your dashboard. 🚀
  2. Discover the Data Models: Within the settings, you'll find the treasure map - aka the Data Models section. This is where the magic happens. You've probably set up a data model or two before, right? If not, no worries, you're about to get a quick and exciting lesson. Click on Data Models and feel the anticipation build.
  3. Data Structure Enums, Ahoy! Now, inside Data Models, there's a shiny button or link that says "Enums." That's your golden ticket. Click it with all the excitement of a kid in a candy store because you're about to create something awesome.
  4. Create Three Mighty Enums: Here’s where we roll up our sleeves and create three new enums. Each one is like a piece of the puzzle, crucial and unique.
    • First Up, "Departments for Employees": This enum is where you'll categorize your team. Think of it as organizing your Avengers - everyone has their department, their special skill set. 🦸‍♂️🦸‍♀️
    • Next, "Leave Status": This enum is critical; it's the heartbeat of our leave request tool. Here, you'll define three values: Approved, Denied, and Pending. It's like the stoplight of leave requests - green for go, red for no, and yellow for 'hold up, we're thinking'. 🚦
    • Finally, "Type of Leave": Because not all leave is created equal, right? Here you'll categorize the different types of leave your team might request. It's like your leave request Baskin-Robbins - 31 flavors, but probably fewer types of leave. 🍦

And just like that, you've laid the groundwork for your leave request tool. You've started turning what could have been a complex coding task into a fun, no-code project that's as easy as pie (mmmm, pie 🥧).

🌟 Step 2: Sculpting the Data Model Masterpiece 🌟

Congrats on making it past the starting line! 🏁 You've got your enums ready, and it's time to get crafty with the backbone of our leave request tool – the data model. This is where things start taking shape, literally. You're about to create a digital clay model that's as flexible as it is powerful. Let's dive in:

  1. Back to the Data Models We Go: Embark on your journey back to the Data Models section in the settings area. You're becoming quite the navigator around GA_Universe, aren't you? 🧭
  2. Uncover the Data Structures & Objects: Within Data Models, there's a treasure chest waiting to be opened – the "Data Structures and Data Objects" section. Click it with the enthusiasm of a pirate finding gold because, in a way, you are about to strike digital gold. 💰
  3. Create a New Data Object – "Leave Requests": This is the moment you've been waiting for. Hit that "New Data Object" button with determination because you're about to bring "Leave Requests" into existence. This object is the heart of our tool, where all the action happens.
  4. Add Fields to Your Heart's Content: Now, with the canvas ready, it's time to paint our masterpiece by adding the following fields to our "Leave Requests" data object:
    • employeeId: Think of this as the social security number for your leave requests. It uniquely identifies who the leave request belongs to. 🆔
    • Department Enum: Remember the "Departments for Employees" enum you created? It's time for its grand entrance. This field categorizes leave requests by department, making you feel like the organizational wizard you are. 🧙‍♂️
    • TypeOfLeave Enum: Here comes another enum you crafted earlier. This field allows employees to specify the type of leave they're requesting, adding a scoop of clarity to the process. 🍨
    • Start Date & End Date: These fields are the "When?" of the leave request. They mark the beginning and end of the magical journey of... well, taking a break. 📅
    • Reason: Here's where employees can share the "Why?" behind their leave request. It's like a mini diary entry, but for work. 📖
    • Count (default to 1): Set this field with a default value of 1. It's a sneaky little trick that'll help us later with reporting. Plus, it makes us feel smart. 🤓
    • Status Enum: And finally, the "Leave Status" enum makes its debut. This field will track whether the leave is Approved, Denied, or Pending. It's the red, yellow, or green light of the entire operation. 🚦

And voilà! You've just created a data model that's not only functional but also a piece of art. You've set the stage for making the leave request process a breeze for everyone involved. Give yourself a pat on the back, because you're doing great! 👏

🛠️ Step 3.A: Crafting the "Add Leave Request" Page 🛠️

Great job on setting up the backbone of our leave request tool! Now, it's time to roll up our sleeves and build the stage where our users will perform—the “Add Leave Request” page. This is where your team will come to ask for some well-deserved time off. Let’s make it as welcoming and user-friendly as possible. Here’s how:

  1. Navigate to the Settings Odyssey: First, embark on your familiar journey to the settings area. You’re becoming quite the explorer in the GA_Universe by now!
  2. Discover the Layout Galaxy: Within settings, find and click on “Layout” and then “Pages.” This area is like the architect's table of GA_Universe, where pages are born and layouts are designed.
  3. Create New – The Birth of a Page: Hit that “Create New” button with the excitement of discovering a new planet. A form will appear, asking for the name and URL of your new world. Name it something intuitive like “Add Leave Request” and give it a URL to match. This is your page's identity in the vast universe of your application.
  4. Choose the Table Details Type: As you’re defining the characteristics of your new page, select “Table Details” type. This is the skeleton of our page, ready to be fleshed out with the data that powers the heart of our leave request process.
  5. Select Your Data Source: Remember the data model you crafted with care in Step 2? It’s time for it to shine. Select it as the data source for your page. This connection is what breathes life into the page, making it not just a form, but a form with a purpose.
  6. Configure the DataTable Column: Here’s where you detail what the page will display and collect. Select the datatable column and choose all the fields you added in Step 2. Oh, and don’t forget to include the _Id field—we’ll need it later for the magic behind the scenes. But since it’s not the star of the show, let’s keep it and the count hidden. They’re like the stagehands of our theater—crucial, but out of the spotlight.
  7. Decide on Input Types: Now, for the grand finale of our page setup, select the input types for each field:
    • EmployeeId and Reason: These are the narrative of our story, best told in a straightforward text box.
    • Start Date and End Date: These are the timelines of our tale, clearly marked by date pickers.
    • Departments, TypeOfLeave, and Status: These are the choices in our story, best suited for combo boxes, letting users select from the options you’ve predefined with the power of enums.

And just like that, you’ve created a page that’s not just functional but also intuitive and user-friendly. It’s a place where leave requests are not just processed but welcomed, with open arms and a smooth process.

🔄 Step 3.B: Making It Always Pending: Tweaking the Save Workflow 🔄

Now that our "Add Leave Request" page is up and running, it's time to fine-tune it to better suit our needs. We want to ensure every leave request automatically enters the system with a "Pending" status. This small but mighty change streamlines the process, making life easier for everyone involved. Here's how we'll do it:

  1. Venture into the Workflows Wilderness: Within your "Add Leave Request" page, seek out the "Workflows" section. This is where the magic behind the scenes happens, orchestrating how data dances when users interact with your page.
  2. Spot the Automatically Generated Save Workflow: Within the workflows, there's one that's been quietly working in the background – the automatically generated save workflow. This is our target for a slight, yet significant, modification.
  3. Introduce a New Character: Define Values Workflow Block: Before anything gets saved, we want to ensure that every leave request is stamped with a "Pending" status. To do this, add a "Define Values" workflow block to the stage. This block is about to play a crucial role in our play.
  4. Craft the Formula for "Pending": Inside this new block, you'll craft a formula that whispers the word "Pending" into the ear of our leave request. This formula isn't complex; it simply needs to mirror the string value of the "Pending" status as found on the Enums page. Give this formula the key of "status", setting the stage for the next act.
  5. Set the Scene with a "Set Values" Workflow Block: Now, bring in a "Set Values" workflow block. This block's job is to take the " status " variable we've just defined and make sure it fills the "LeaveStatus" combo box with unwavering determination. This way, every leave request knows it’s starting its journey as "Pending".
  6. The Final Curtain: Hide the "LeaveStatus" Element: Since the "LeaveStatus" is now always set to "Pending" by default, there's no need for it to take up space on our page. It's time for this element to exit stage left, hidden from the user's view. This doesn't mean it's unimportant, just that its role is played behind the curtains, keeping the front stage clean and focused.

And there you have it! With these adjustments, you've streamlined the "Add Leave Request" process, ensuring a smooth start for each request and a simpler experience for your users. This is the beauty of no-code; with a few clicks and some creative thinking, you've automated a piece of the workflow, making your tool not just functional, but smart.


📊 Step 4: Setting Up Dashboards for Insightful Analytics 📊

Congratulations on making it this far! You’ve set up the framework for handling leave requests like a champ. Now, it’s time to add another layer of awesomeness: dashboards. These aren’t just any dashboards; they’re going to give you and your team valuable insights at a glance. Let’s get to it:

  1. Create a New Canvas: Start by creating a new empty page in your application. Think of this as your canvas for painting a picture with data. Name it something intuitive, like “Leave Dashboard,” and get ready to bring some color to it.
  2. Design with the Grid System: With your new page open, it’s time to embrace the grid system. This is your secret weapon for keeping things neat and organized. Design the page layout to have two distinct locations for your dashboards. Imagine you’re an architect, and these are your plots for building.
  3. Text Blocks for Context: Add two text blocks to your page. These will serve as signposts, guiding viewers with crucial information. One will showcase the total number of leave requests, and the other will highlight how many of those are casual leaves. Position them strategically; they’re like the title of a painting, giving viewers insight into what they’re looking at.
  4. First Dashboard - The Pie Chart: Time to add some flavor with your first dashboard. Choose a pie chart for this one. It’s like the pie of charts – everyone loves a good slice. Set it up to group by the “Type of Leave” and aggregate over the count. This will give you a visual representation of leave types, making it easy to see which slices of the pie are the biggest.
  5. Second Dashboard - The Bar Chart: Now for the second dashboard. Opt for a bar chart here. It’s like the skyline of your data city, with each department being a building. Group this chart by the departments. This visualization will quickly show which departments are taking the most leaves, giving you insights into departmental dynamics.
  6. Bring It to Life with a Workflow: To make your dashboards dynamic and informative from the get-go, create a workflow that triggers on page startup. This little bit of automation is like the heart of your dashboards, pumping data into them as soon as the page loads.
    • Read Data with Finesse: Begin with a “Read Data” workflow block. Here’s where you filter by the “Type of Leave” enum, specifically looking for “Casual” leaves. Don’t forget to check the “Use Count” option to tally them up.
    • Announce the Count: Follow up with a “Set Status” workflow block, naming your variable something like “countVar.” This variable is about to become famous.
    • Display the Magic Number: Lastly, use a “Set Control Properties” workflow block to update the caption property of the text block dedicated to casual leaves with your “countVar” variable. It’s like revealing the grand total on a game show – exciting and informative!

For the total number of leave requests, repeat a simpler version of this workflow without the filtering step. This will give you the grand total of all leave requests.

🛠️ Step 5: Crafting the Leave Approval Process 🛠️

You've got the requests coming in and dashboards for insights; now it's time to empower the decision-makers with a streamlined approval process. This step is all about action – approving or denying leave requests with a click. Let's create this crucial part of our tool:

  1. Set the Stage with a New Page: Create a new empty page titled something along the lines of “Leave Approval.” This will be your command center for processing leave requests.
  2. Incorporate Reporting and Data Viewing Tools:
    • Add a Reporting Chart: Insert a bar chart on this page to visualize leave requests by status. This quick glance will show you how many requests are pending, approved, or denied, keeping everyone on the same page.
    • Insert a DataTable: Set the data source of this table to be the leave requests. This table will list all the leave requests, making it easy for the approver to review details before making a decision. Make sure to select the correct values that you want to show
  1. Set Up the Decision-Making Grid:
    • Build the Grid: Inside the grid, insert elements for the key details of each leave request you want to showcase. This includes employee ID, type of leave, dates, and importantly, the status.
    • Decision Buttons: Add two buttons within this grid, one for "Approve" and another for "Deny." These will trigger workflows to update the status of the leave request accordingly.
  1. Selection Change Workflow for Dynamic Updates:
    • Trigger on Selection Change: Create a workflow that triggers when a leave request is selected from the data table. This ensures that the grid updates to reflect the details of the selected request.
    • Workflow Steps: This workflow should:
      • Set a status named "selection."
      • Get the first list item from the selection.
      • Read the _Id property of the selected request.
      • Filter the leave requests to find the one with the matching _Id.
      • Get the first list item of this filtered selection.
      • Update the grid elements with the details of this request, readying it for an approval or denial action.
  1. Approval and Denial Workflows:
    • Approve a Request:
      • Show a confirmation message to the approver.
      • Define values for approval, setting the status to "Approved."
      • Set the updated status value on the leave request.
      • Save the item to update the database.
      • Refresh the data table and chart to reflect the change.
    • Deny a Request: The denial process is similar to the approval but sets the status to "Denied" instead. Ensure to show a message, update the status, save the item, and refresh the base.


And there you have it, folks! From the spark of an idea to a fully functional, no-code leave request tool, you've journeyed through the realms of GA_Universe, crafting, customizing, and fine-tuning every piece of the puzzle. 🌟

With your dashboards dazzling with data, your leave request page collecting submissions with ease, and your approval process streamlined to perfection, you've not only solved a problem but also empowered your team with a tool that's both efficient and user-friendly. This is no small feat! 🚀

But let's not forget, the beauty of what you've created lies not just in its functionality but in its flexibility. As your team grows and changes, so too can your leave request tool. The foundations you've laid are built for adaptation, ready to evolve with every new need and insight. 🌱

So take a moment to bask in the glory of your creation. Then, dive back in, explore new possibilities, and continue to innovate. Because in GA_Universe, the only limit is your imagination. And remember, every great tool starts with a simple idea and a dash of curiosity. Who knows what you'll build next? 💡🛠️

Thank you for embarking on this adventure with us. Here's to many more creations, solutions, and transformations. Until next time, keep building, keep dreaming, and above all, keep having fun doing it! 🎉