SAP CapEx Approvals

Category: Solution Templates
Subcategory: All

Overview

The SAP CapEx Approvals solution template shows how workflow and a rules engine can be used to implement an Approvals process for Capital Expenditure Requests in a corporate environment. The functionality is implemented using a Mendix Workflow and an incorporated rules engine tailored to the needs of the system.

Documentation

https://youtu.be/uc-hZX8KBjw
Demo urlhttps://sapcapex.mendixcloud.com

SAP CapEx Approval App

Driven by the heightened competition in the distribution chain, thinning margins, faster inventory turnovers and increased customer expectations are commonplace now. To prosper in this ultra-competing environment, organisations need to improve the velocity at which the business operates without compromising the quality of service.

We would like to demonstrate the capability of Mendix platform in using its workflow capabilities to bring efficiency in the Capital Expenditure approval process.

To summarise, the app supports processes that include:

  • the entry and submission of a Request for Approval of Capital Expenditure;
  • a three-stage Approval system with approved requests automatically routed to the next stage;
  • a configurable rules engine for automated decision making during the approvals process;
  • configuration of the rules engine by the administrator as an online function.

How to Setup?

The application is available as a demonstration environment and as a starter app. You can find the demonstration environment at https://sapcapex.mendixcloud.com.

To create your own version, the SAP CapEx application is available through the Create New App flow on the Marketplace. The model is built using Mendix 9 and we shall endeavour to ensure that it is on a recent version of the Mendix platform.

Feel free to customise this application to suit your needs. The following steps will help you provision the app.

  1. Find the app on the Create New App flow;
  2. Edit the app in Studio or Studio Pro;
  3. When first run the app will setup sample data to assist with familiarisation.

Roles

The following roles are used with in the app:

Administrator The Administrator has an overview of the information in the system and can modify the configuration.

Approver An Approver has an Inbox where CapEx Requests are received and where the Approver can Accept or Reject the Request, or refer the Request back to the originator. There is a single Approver role and the control of which Approvers have access to a Request at a Stage in the process is controlled through the Group setup and Rules (configured by the Administrator).

Requester A Requester can create a new Request for Capital Expenditure to be entered into the system.

Approval Process

When a Requester has entered and submitted a request for approval it enters the Mendix Workflow. The core operation of the app is in the CapEx module, including the ApprovalWorkflow.

The Request passes through a Three-Stage Approval process (with the second stage split into two sub-stages). At each Stage the following happens:

  1. The Rules are consulted and applied as necessary to the current Request. The outcome of applying the rules can:
    • Automatically approve the Request;
    • Set the Request to skip the current Stage and move onto the next Stage;
    • Leave the Request set for Manual Approval;
    • Set the Group of Approvers who may Approve this Stage to a specific Group;
    • Set the Request Priority.
  2. If Manual Approval of this Stage is still required then the Group of Approvers has this Request added to their Inbox.
  3. One of the Approvers can claim the Request and assign it to themselves.
  4. Once assigned the Approver can inspect the Request and, when decided, can do one of the following:
    • Approve the Request;
    • Refuse the Request;
    • Return the Request to the Requester.
  5. The Approver can add comments and add new documents to the Request but cannot change the original Request.
  6. If the Request is Returned to the originator then it will appear in the Requester’s Inbox, where the Requester can modify the Request and then re-submit it.
  7. If the Request is re-submitted then the Approval process starts over from the beginning (but the workflow Audit will be retained).
  8. Stage 2 of the process requires the Approval of two Approvers. The list of Approvers in the Group for Stage 2A and Stage 2B will be the same except that user that performs the Stage2A Approval will not be included on the list for Stage 2B approval.

Administrator Menu

The Administrator’s menu gives access to the following:

  1. Performance Dashboard which gives stats regarding performance of the Approval Processes.
  2. Configuration of Users, Positions, Groups and Departments.
  3. Definition of Rules.
  4. Configuration of Currencies, Countries, Locations, Asset Categories, Capital Accounts and Major Benefits.

Rules

Rules are maintained using the Rules option on the Administrator’s menu.

  • Multiple Rules may be defined for each Stage.
  • Each Rule has a Stage set and will only be evaluated when a Request moves to that Stage in the process.
  • Each Rule also has an Order and this defines the order in which the Rules are evaluated in the Stage.

Each Rule:

  1. May be disabled (which means that the Rule will be ignored when Rules are being evaluated).
  2. Has a textual description for information only.
  3. May be set to stop the processing of further Rules set for the Stage if this Rule is triggered.
  4. Has one or more Conditions set that determine if the Rule is triggered.
  5. Can be set to be triggered if one of its Conditions is met (logical ‘Or’), or all of its Conditions are met (logical ‘And’).
  6. Defines a single Action to be taken when the Rule is triggered, which will modify the Request or the processing of the Request through the Approval.

Each Condition on a Rule:

  1. Has an Evaluation Order which specifies the order in which the Conditions are processed by the Rule.
  2. Specifies the Attribute on the Request which is to be evaluated and which it is compared to for the Condition to be successfully matched.
  3. May specify that the result be reversed by using the Not indicator.

These are the Rules which are set as part of the default demonstration configuration. The rules each apply to a different stage of the Approval Process (Stage 1, Stage 2 or Stage 3).

  • The first rule will put a high priority on any Request that has a Due Date within 30 days of the Request being submitted.
  • The second rule will automatically approve any Request which has a value under $250 dollars.
  • The final three rules direct the Stage 2 Approvals to particular Groups of users, depending upon the Requester’s department and the Requester’s country.

It should be appreciated that, if required, a very sophisticated set of Rules could be set up to personalise the processing of the Rules Engine. However, it may also be required to extend the attributes supported by the Rules Engine.

There is an additional fixed rule that means that a Approver cannot approve a Request that they Requested themselves (except for the Stage 3 Approval – this is so that the Procurement Head can raise a Request and then Approve it themselves – which is necessary if there is only one Procurement Head).

Demo Data

The data will be configured automatically when you execute the app for the first time. However, if you want to clean the data that you may have added (new requests or changes to the configured records), then you should:

  1. Shut down the app in Studio Pro
  2. Using Windows Explorer, navigate to the project folder of your app
  3. Delete the ‘deployment’ folder
  4. Restart the app in Studio Pro

Or you can use the Reset Application tile on the Administrator’s home page. This will delete all Requests in the database, and reset all the reference data and rules and also set up the standard users again – resetting their groups/positions/passwords and such. Non-standard users that you have added will be left in place though if they refer to non-standard reference data then you may need to set them up again.

Explaining the Model

This model has been built to be easily extendable and contains a few core functions that needs to be covered on a CapEx approval app:

CapEx Module

This module is used to store and process the main data used in processing a CapEx request. The main Entity if the Request itself which is the hub of the approval system.

CapExUsers Module

This module holds the Entities, forms and code for setting up, maintaining and using the Users, Groups and Departments/Positions.

CapExReferences Module

This module holds the Entities, forms and code for setting up, maintaining and using the Countries, Currencies and Locations used in the app.

CapExRules Module

This module holds the Entities, forms and code for setting up, maintaining and using the Rules used by Rules Engine part of the app.

MockData Module

This contains the instructions to create the data used in the default demonstration set up. It is run automatically on application startup if no existing data is found in the app. If you wish the app to build a different set of objects when it starts, you can make the changes here. By default, the app will not change anything when it starts up.

Users

As part of the default demonstration data setup by the MockData module, the following users are created:

Full name Login Department ID Groups Roles Admin administrator Administrator Arne Saknussemm arne.saknussemm FINANCE Procurement Heads Requester,Approver Asif Iqbal asif.iqbal WIDGET All Managers Requester,Approver George Best george.best HR US Regulatory VPs,All VPs Requester,Approver Henri Lepont henri.lepont HR US Regulatory VPs,All VPs Requester,Approver Irene Mawhinney irene.mawhinney IT All Managers Requester,Approver John Hobson john.hobson IT Requester Muhammed Babar muhammed.babar WIDGET US Procurement VPs,All VPs Requester,Approver Nancy Drew nancy.drew WIDGET Non US VPs,All VPs Requester,Approver Pinal Patel pinal.patel WIDGET Requester Robyn Fenty robyn.fenty IT Non US VPs,All VPs Requester,Approver Wendy Ng wendy.ng HR Requester Wilhelm Schübbe wilhelm.schubbe HR Non US VPs,All VPs. Requester,Approver Zac Goodhead zac.goodhead IT US Procurement VPs,All VPs Requester,Approver

These users should allow adequate coverage to process Requests from different Requesters through the stages of the Approval process, but additional users can be created as required, and allocated to different Groups and Departments.

When using this app locally, the passwords for users are created by Mendix Studio Pro. For ease of use it is suggested that you use the Demonstration login widget which appears on the right-hand side of the display, for switching between different users.

When used in the cloud demo the users all have the same password: ABCabc123$$$.

Releases

Version: 1.0.0
Framework Version: 9.5.0
Release Notes: First Release