Платформа 3V/Согласование: различия между версиями
Перейти к навигации
Перейти к поиску
(Новая страница: «Что-то про согласование») |
V.emke (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
− | + | Для удобного создания согласования используйте шаблон метаописания в формате JSON: | |
+ | |||
+ | <syntaxhighlight lang="JSON" line> | ||
+ | { | ||
+ | "template": { | ||
+ | "schema": { | ||
+ | "states": [ | ||
+ | { | ||
+ | "icon": { | ||
+ | "type": "svg", | ||
+ | "data": "<svg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M0 10L1.19249e-07 0L10 1.19249e-07L6 5L10 10L0 10Z' fill='#F08513'/></svg>" | ||
+ | }, | ||
+ | "id": 1, | ||
+ | "dataAvailabilitySettings": null, | ||
+ | "name": "Черновик" | ||
+ | }, | ||
+ | { | ||
+ | "icon": { | ||
+ | "type": "svg", | ||
+ | "data": "<svg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M0 10L1.19249e-07 0L10 1.19249e-07L6 5L10 10L0 10Z' fill='#0066DD'/></svg>" | ||
+ | }, | ||
+ | "id": 2, | ||
+ | "dataAvailabilitySettings": { | ||
+ | "disableEdit": true | ||
+ | }, | ||
+ | "name": "На согласовании" | ||
+ | }, | ||
+ | { | ||
+ | "icon": { | ||
+ | "type": "svg", | ||
+ | "data": "<svg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M0 10L1.19249e-07 0L10 1.19249e-07L6 5L10 10L0 10Z' fill='#05C19F'/></svg>" | ||
+ | }, | ||
+ | "id": 3, | ||
+ | "dataAvailabilitySettings": { | ||
+ | "disableEdit": true | ||
+ | }, | ||
+ | "name": "Согласовано" | ||
+ | }, | ||
+ | { | ||
+ | "icon": { | ||
+ | "type": "svg", | ||
+ | "data": "<svg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M0 10L1.19249e-07 0L10 1.19249e-07L6 5L10 10L0 10Z' fill='#8053DF'/></svg>" | ||
+ | }, | ||
+ | "id": 4, | ||
+ | "dataAvailabilitySettings": null, | ||
+ | "name": "На доработке" | ||
+ | } | ||
+ | ], | ||
+ | "steps": [ | ||
+ | { | ||
+ | "fromStateId": 1, | ||
+ | "toStateId": 2, | ||
+ | "id": 1, | ||
+ | "name": "Отправить на согласование" | ||
+ | }, | ||
+ | { | ||
+ | "fromStateId": 2, | ||
+ | "toStateId": 3, | ||
+ | "id": 2, | ||
+ | "name": "Согласовать" | ||
+ | }, | ||
+ | { | ||
+ | "fromStateId": 2, | ||
+ | "toStateId": 4, | ||
+ | "id": 3, | ||
+ | "name": "Отклонить" | ||
+ | }, | ||
+ | { | ||
+ | "fromStateId": 4, | ||
+ | "toStateId": 2, | ||
+ | "id": 4, | ||
+ | "name": "Вернуть на согласование" | ||
+ | }, | ||
+ | { | ||
+ | "fromStateId": 3, | ||
+ | "toStateId": 1, | ||
+ | "id": 5, | ||
+ | "name": "Вернуть на Черновик" | ||
+ | } | ||
+ | ], | ||
+ | "startStateId": 1 | ||
+ | }, | ||
+ | "permissions": [ | ||
+ | { | ||
+ | "stepId": 1, | ||
+ | "subjectId": "USERS", | ||
+ | "type": "Allow" | ||
+ | }, | ||
+ | { | ||
+ | "stepId": 2, | ||
+ | "subjectId": "APPROVERS", | ||
+ | "type": "Allow" | ||
+ | }, | ||
+ | { | ||
+ | "stepId": 3, | ||
+ | "subjectId": "APPROVERS", | ||
+ | "type": "Allow" | ||
+ | }, | ||
+ | { | ||
+ | "stepId": 4, | ||
+ | "subjectId": "USERS", | ||
+ | "type": "Allow" | ||
+ | }, | ||
+ | { | ||
+ | "stepId": 5, | ||
+ | "subjectId": "APPROVERS", | ||
+ | "type": "Allow" | ||
+ | } | ||
+ | ], | ||
+ | "parameters": { | ||
+ | "definitions": [ | ||
+ | { | ||
+ | "id": 2, | ||
+ | "name": "Сотрудники", | ||
+ | "dictionaryId": 16, | ||
+ | "discriminator": "DictionaryParameterModel" | ||
+ | } | ||
+ | ], | ||
+ | "defaultValues": [ | ||
+ | { | ||
+ | "parameterId": 2, | ||
+ | "value": 2 | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | "notifications": null | ||
+ | }, | ||
+ | "forceWorkflowNotificationTemplate": false | ||
+ | } | ||
+ | </syntaxhighlight> |
Версия 04:20, 18 января 2021
Для удобного создания согласования используйте шаблон метаописания в формате JSON:
1 {
2 "template": {
3 "schema": {
4 "states": [
5 {
6 "icon": {
7 "type": "svg",
8 "data": "<svg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M0 10L1.19249e-07 0L10 1.19249e-07L6 5L10 10L0 10Z' fill='#F08513'/></svg>"
9 },
10 "id": 1,
11 "dataAvailabilitySettings": null,
12 "name": "Черновик"
13 },
14 {
15 "icon": {
16 "type": "svg",
17 "data": "<svg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M0 10L1.19249e-07 0L10 1.19249e-07L6 5L10 10L0 10Z' fill='#0066DD'/></svg>"
18 },
19 "id": 2,
20 "dataAvailabilitySettings": {
21 "disableEdit": true
22 },
23 "name": "На согласовании"
24 },
25 {
26 "icon": {
27 "type": "svg",
28 "data": "<svg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M0 10L1.19249e-07 0L10 1.19249e-07L6 5L10 10L0 10Z' fill='#05C19F'/></svg>"
29 },
30 "id": 3,
31 "dataAvailabilitySettings": {
32 "disableEdit": true
33 },
34 "name": "Согласовано"
35 },
36 {
37 "icon": {
38 "type": "svg",
39 "data": "<svg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M0 10L1.19249e-07 0L10 1.19249e-07L6 5L10 10L0 10Z' fill='#8053DF'/></svg>"
40 },
41 "id": 4,
42 "dataAvailabilitySettings": null,
43 "name": "На доработке"
44 }
45 ],
46 "steps": [
47 {
48 "fromStateId": 1,
49 "toStateId": 2,
50 "id": 1,
51 "name": "Отправить на согласование"
52 },
53 {
54 "fromStateId": 2,
55 "toStateId": 3,
56 "id": 2,
57 "name": "Согласовать"
58 },
59 {
60 "fromStateId": 2,
61 "toStateId": 4,
62 "id": 3,
63 "name": "Отклонить"
64 },
65 {
66 "fromStateId": 4,
67 "toStateId": 2,
68 "id": 4,
69 "name": "Вернуть на согласование"
70 },
71 {
72 "fromStateId": 3,
73 "toStateId": 1,
74 "id": 5,
75 "name": "Вернуть на Черновик"
76 }
77 ],
78 "startStateId": 1
79 },
80 "permissions": [
81 {
82 "stepId": 1,
83 "subjectId": "USERS",
84 "type": "Allow"
85 },
86 {
87 "stepId": 2,
88 "subjectId": "APPROVERS",
89 "type": "Allow"
90 },
91 {
92 "stepId": 3,
93 "subjectId": "APPROVERS",
94 "type": "Allow"
95 },
96 {
97 "stepId": 4,
98 "subjectId": "USERS",
99 "type": "Allow"
100 },
101 {
102 "stepId": 5,
103 "subjectId": "APPROVERS",
104 "type": "Allow"
105 }
106 ],
107 "parameters": {
108 "definitions": [
109 {
110 "id": 2,
111 "name": "Сотрудники",
112 "dictionaryId": 16,
113 "discriminator": "DictionaryParameterModel"
114 }
115 ],
116 "defaultValues": [
117 {
118 "parameterId": 2,
119 "value": 2
120 }
121 ]
122 },
123 "notifications": null
124 },
125 "forceWorkflowNotificationTemplate": false
126 }