1

I am having trouble with code design for current scenario of process workflow. For example, by default it is set in the app that for some request 'A' direct manager has the authority to 'approve' that but later on, this approval authority has been moved to 'department head'. How can I accommodate these changes without modifying code in future.

I am thinking on lines of creating access templates, assigning them to permission groups and adding users to those groups.

Any help on what might be problems with my proposed approach or better solutions is much needed.

The user requirement might change for authorization even after deployment of system and this change needs to have minimum overhead.

1

You might consider a business process scaffold. Business processes are modelled at the highest levels, although many of them can reach into the tiny details, because ... business. The technology family called "Business Process Modelling" aims to take business processes and turn them into executable processes. diagrams. Check out the area here: Business Process Modeling

The main advantage to such an approach is that all the major BPM scaffolds have process design tools that work with flow charts. These design tools are often sold as tools for business analysts, rather than systems analysts or programmers.

0

Having to change the app because some permission change means that you have these things hard-coded. Those permissions should be stored in a database so changes are made there and not in code.

Here's a couple of answers of how to model roles/permissions:

https://softwareengineering.stackexchange.com/a/206391/61852 https://softwareengineering.stackexchange.com/a/329574/61852

They are oriented to menu items/actions and or permissions on resources but it shouldn't be hard to accomodate them to manage permissions of approvals and the like.

If your requirements are more complex, like a workflow, you might want to searh for a workflow framework for your language.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.