简体   繁体   English

使用PHP和MySQL的基于步骤的批准系统

[英]Step based approval system using PHP and MySQL

I'm creating a system, that creates an object that needs confirmation through various levels of corporate management, in other words, a form, that must be accepted by many boss'es. 我正在创建一个系统,该系统创建一个需要通过公司各级管理进行确认的对象,换言之,一种必须由许多老板接受的形式。

The thing is, that they are of varying priority, and must not (for the sake of their time) see that there is a form waiting their accept. 事实是,他们的优先级各不相同,并且(为了他们的时间)一定不要看到有一种形式等待他们的接受。 The number is finite, and each of them has a role. 这个数字是有限的,每个都有一个作用。 The accepting is done through a link, that is provided to them via an email, that is sent when the previous accept has been made. 接受是通过一个链接完成的,该链接是通过电子邮件提供给他们的,该链接是在上一次接受时发送的。 If it is not accepted, the line ends there. 如果不接受,则该行到此结束。

Now what I'm asking here is: 现在我要问的是:

How to implement such a step-based system? 如何实现这种基于步骤的系统?

I'm asking just for general pointers, like create these kinds of database tables, and this kind of script. 我只是在问通用指针,例如创建此类数据库表和此类脚本。

Thanks! 谢谢!


EDIT 编辑

I'll rephrase my question: 我再改一下我的问题:

How to create a step based system using PHP and MySQL? 如何使用PHP和MySQL创建基于步骤的系统?

Consider the part above the edit background info. 考虑编辑背景信息上方的部分。 But the main question is this one. 但是主要的问题是这个。

This is called " workflow " or " Business Process Management " (BPM). 这称为“ 工作流 ”或“ 业务流程管理 ”(BPM)。 It is a very large topic, and I suggest you Google these two terms. 这是一个非常大的主题,我建议您使用Google这两个术语。 There are several OSS workflow engines available, and a whole sub-industry built around this. 有几种可用的OSS工作流引擎,并且围绕此构建了整个子行业。

EDIT: Google "php workflow" and you'll get a number of hits that will point you in the right direction. 编辑:谷歌“ php工作流”,您将获得许多命中,它将为您指明正确的方向。 Do not reinvent the wheel, use one of the existing frameworks. 不要重新发明轮子,使用现有框架之一。 If you're just starting you'll find that doing this right is a much bigger task than it seems at first. 如果您只是开始,就会发现正确地完成这项工作比起初看起来要艰巨得多。

The answer to this question: 这个问题的答案:

Since the system is simple, with static amount of steps, I have defined a list, or a numbered array, if you will, with steps, and I simply check if the previous step is done, if the next step is required. 由于系统很简单,具有固定的步骤数,因此,我已经定义了一个列表或一个带编号的数组(如果可以),并带有步骤,并且仅检查上一步是否已完成,是否需要下一步。 If yes, do it. 如果是,请执行此操作。 Repeat. 重复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM