Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue.js+element+vue-element-extends+beego+flow test #17

Open
3xxx opened this issue Feb 21, 2019 · 3 comments
Open

vue.js+element+vue-element-extends+beego+flow test #17

3xxx opened this issue Feb 21, 2019 · 3 comments

Comments

@3xxx
Copy link
Owner

3xxx commented Feb 21, 2019

I use "vue.js element vue-element-extends beego and flow" to make a very simple flow-ui(interface), which is still in the preliminary stage.
demo
Snap3

  1. doctype

snap4

  1. docstate

snap5

  1. docaction

snap6

4.transition

snap7

5.workflow

snap8

6.node

snap9

7.accesscontext

snap10

8.user

snap11

9.group

snap12

10.usergroup

snap13

11.role

snap14

12.permission

snap15

13.goup_role

snap16

  1. documentlist

snap17

  1. documentdetails

snap18

@3xxx
Copy link
Owner Author

3xxx commented Feb 21, 2019

// Document Type : docType1
// Document States : [
// docState1,
// docState2,
// docState3,
// docState4 // for example
// ]
// Document Actions : [
// docAction12,
// docAction23,
// docAction34 // for the above document states
// ]
// Document Type State Transitions : [
// docState1 --docAction12--> docState2,
// docState2 --docAction23--> docState3,
// docState3 --docAction34--> docState4,
// ]
// Access Contexts : [
// accCtx1, accCtx2 // for example
// ]
// Workflow : {
// Name : wFlow1,
// Initial State : docState1
// }
// Nodes : [
// node1: {
// Document Type : docType1,
// Workflow : wFlow1,
// Node Type : NodeTypeBegin, // note this
// From State : docState1,
// Access Context : accCtx1,
// },
// node2: {
// Document Type : docType1,
// Workflow : wFlow1,
// Node Type : NodeTypeLinear, // note this
// From State : docState2,
// Access Context : accCtx2, // a different context
// },
// node3: {
// Document Type : docType1,
// Workflow : wFlow1,
// Node Type : NodeTypeEnd, // note this
// From State : docState3,
// Access Context : accCtx1,
// },
// ]

// With the above setup, you can dispatch document events to the workflow appropriately.
// With each event, the workflow moves along, as defined.

首先建立以上基础数据。然后新建一个document,页面上列出documents列表,用户点击详情,展示这个document的可能actions,这些可能的actions是根据document的属性(比如当前状态state,doctype,ID等)查询transition数据表得出来的。然后用table的下拉列表展示出来这些actions,用户选择action和接受人,再填写一些评论,可以apply提交出去了,后台根据提交的一些参数,生成event,然后赋给workflow,成功即修改了这个document的状态了。

// * When you create new documents, their events need not be created at the same time.
// Events should be created and applied in response to user actions (or system events).
// * Whether you list all possible actions in a list of documents is up to you.
// In my opinion, the possible actions - for a given user - on a given document,
// are best made available in the detailed view of that document (not in a document list view).
// * Yes, when the user clicks on an action button, we can create the corresponding event instance,
// and apply it to the document's workflow.
// * With a DocEventID, you can fetch the corresponding event instance using DocEvents.Get

// 当您创建新文档时,它们的事件不需要同时创建。事件应该创建并应用于响应用户操作(或系统事件)。
// *是否在文档列表中列出所有可能的操作由您决定。
// 我认为,对于给定用户在给定文档上的可能操作,最好在该文档的详细视图中提供(而不是在文档列表视图中)。
// *是的,当用户单击操作按钮时,我们可以创建相应的事件实例,并将其应用于文档的工作流。
// *使用“DocEventID”,您可以使用“DocEvents.Get”获取相应的事件实例。

@js-ojus
Copy link

js-ojus commented Feb 21, 2019

@3xxx

A quick reminder: in your screenshots above, (10), (12) and (13) are m:n relationships. In fact, in (12), the relationship is k:m:n between Role, DocType and DocAction.

You could possibly re-think the UI to take advantage of the above. For instance, you could provide a multi-selection for the right-hand side entities. E.g. In (12), once you select a Role and DocType, you can let the user select multiple DocActions to assign.

@3xxx
Copy link
Owner Author

3xxx commented Feb 22, 2019

@js-ojus
Thank you very much for your attention.

I can understand what you reminded me. For the convenience of demonstration, I fixed some parameters.

I will improve slowly, like you said so, under the premise that the user selected a few parameters, then display the query results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants