@freelog/freelog-cg-collection 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,77 @@
1
1
  {
2
2
  "audienceSection": {
3
- "conditions": [],
3
+ "conditions": [
4
+ {
5
+ "paramValue": "echoSubject",
6
+ "paramValueObj": {
7
+ "expType": "variableChain",
8
+ "varType": "normal",
9
+ "content": "echoSubject"
10
+ },
11
+ "content": "echoSubject=echoSubject",
12
+ "paramName": "echoSubject"
13
+ }
14
+ ],
4
15
  "audiences": [
5
- "NODE"
16
+ "USER"
6
17
  ]
7
18
  },
8
19
  "varDeclarationList": [
9
20
  {
10
- "type": "varGlobal",
11
- "content": "lockupDays=10",
12
- "varName": "lockupDays",
13
- "varValue": "10",
21
+ "type": "varMacro",
22
+ "content": "echoSubject<-Entity.Echo.<连载小说的会员>",
23
+ "varName": "echoSubject",
24
+ "varValue": "Entity.Echo.<连载小说的会员>",
25
+ "varValueObj": {
26
+ "expType": "entity",
27
+ "entityType": "Echo",
28
+ "entityName": "连载小说的会员"
29
+ },
30
+ "varValueType": "entity"
31
+ },
32
+ {
33
+ "type": "varMacro",
34
+ "content": "unitPrice<-1",
35
+ "varName": "unitPrice",
36
+ "varValue": "1",
14
37
  "varValueObj": {
15
38
  "expType": "number",
16
- "value": "10"
39
+ "value": "1"
17
40
  },
18
41
  "varValueType": "number"
42
+ },
43
+ {
44
+ "type": "varGlobal",
45
+ "content": "setUnlocked=[]",
46
+ "varName": "setUnlocked",
47
+ "varValue": "[]",
48
+ "varValueObj": {
49
+ "expType": "expCondition",
50
+ "paramList": []
51
+ },
52
+ "varValueType": "array"
53
+ },
54
+ {
55
+ "type": "varGlobal",
56
+ "content": "setTemp=[]",
57
+ "varName": "setTemp",
58
+ "varValue": "[]",
59
+ "varValueObj": {
60
+ "expType": "expCondition",
61
+ "paramList": []
62
+ },
63
+ "varValueType": "array"
64
+ },
65
+ {
66
+ "type": "varGlobal",
67
+ "content": "setFree=[]",
68
+ "varName": "setFree",
69
+ "varValue": "[]",
70
+ "varValueObj": {
71
+ "expType": "expCondition",
72
+ "paramList": []
73
+ },
74
+ "varValueType": "array"
19
75
  }
20
76
  ],
21
77
  "stateMachine": [
@@ -24,443 +80,766 @@
24
80
  "assignments": [
25
81
  {
26
82
  "type": "varInitial",
27
- "content": "letstartTime=Time.Now()",
28
- "varName": "startTime",
29
- "varValue": "Time.Now()",
30
- "varValueObj": {
31
- "funcName": "Now",
32
- "paramList": [],
33
- "expType": "functionCall",
34
- "varChain": "Time"
35
- },
36
- "varValueType": "string"
37
- }
38
- ],
39
- "events": [
40
- {
41
- "type": "normal",
42
- "content": "Event.Void()->Auth[startTime=startTime]",
43
- "eventName": "Void",
44
- "eventParamList": [],
45
- "toState": "Auth",
46
- "actions": [],
47
- "stateContextArgs": [
48
- {
49
- "paramName": "startTime",
50
- "paramValue": "startTime",
51
- "paramValueObj": {
52
- "expType": "variableChain",
53
- "varType": "normal",
54
- "content": "startTime"
55
- },
56
- "content": "startTime=startTime"
57
- }
58
- ]
59
- }
60
- ],
61
- "stateContextArgs": []
62
- },
63
- {
64
- "stateName": "Auth",
65
- "assignments": [
66
- {
67
- "type": "varInitial",
68
- "content": "letlimitTime=Time.NextMonth(contextArgs.startTime)",
69
- "varName": "limitTime",
70
- "varValue": "Time.NextMonth(contextArgs.startTime)",
83
+ "content": "letlabels=Query.EchoService.Labels(subject=echoSubject,licensee=contract.licensee)",
84
+ "varName": "labels",
85
+ "varValue": "Query.EchoService.Labels(subject=echoSubject,licensee=contract.licensee)",
71
86
  "varValueObj": {
72
- "funcName": "NextMonth",
87
+ "funcName": "Labels",
73
88
  "paramList": [
74
89
  {
75
- "paramValue": "contextArgs.startTime",
90
+ "paramValue": "echoSubject",
76
91
  "paramValueObj": {
77
92
  "expType": "variableChain",
78
93
  "varType": "normal",
79
- "content": "contextArgs.startTime"
94
+ "content": "echoSubject"
80
95
  },
81
- "content": "contextArgs.startTime"
96
+ "content": "subject=echoSubject",
97
+ "paramName": "subject"
98
+ },
99
+ {
100
+ "paramValue": "contract.licensee",
101
+ "paramValueObj": {
102
+ "expType": "variableChain",
103
+ "varType": "normal",
104
+ "content": "contract.licensee"
105
+ },
106
+ "content": "licensee=contract.licensee",
107
+ "paramName": "licensee"
82
108
  }
83
109
  ],
84
110
  "expType": "functionCall",
85
- "varChain": "Time"
111
+ "varChain": "Query.EchoService"
86
112
  },
87
- "varValueType": "string"
113
+ "varValueType": "array"
88
114
  }
89
115
  ],
90
116
  "events": [
91
117
  {
92
118
  "type": "normal",
93
- "content": "Event.Time.Schedule(dateTime=limitTime)->S1[startTime=contextArgs.startTime,limitTime=limitTime]",
94
- "eventName": "Schedule",
119
+ "content": "Event.Void(\"vip1\"inlabels)->AUTH_MEMBER",
120
+ "eventName": "Void",
95
121
  "eventParamList": [
96
122
  {
97
- "paramValue": "limitTime",
123
+ "paramValue": "\"vip1\"inlabels",
98
124
  "paramValueObj": {
99
- "expType": "variableChain",
100
- "varType": "normal",
101
- "content": "limitTime"
125
+ "expType": "expBooleanOpCollection",
126
+ "var1": {
127
+ "expType": "string",
128
+ "value": "vip1"
129
+ },
130
+ "var2": {
131
+ "expType": "variableChain",
132
+ "varType": "normal",
133
+ "content": "labels"
134
+ },
135
+ "op": "in"
102
136
  },
103
- "content": "dateTime=limitTime",
104
- "paramName": "dateTime"
137
+ "content": "\"vip1\"inlabels"
105
138
  }
106
139
  ],
107
- "toState": "S1",
108
- "actions": [],
109
- "eventPath": "Time",
110
- "stateContextArgs": [
111
- {
112
- "paramName": "startTime",
113
- "paramValue": "contextArgs.startTime",
114
- "paramValueObj": {
115
- "expType": "variableChain",
116
- "varType": "normal",
117
- "content": "contextArgs.startTime"
118
- },
119
- "content": "startTime=contextArgs.startTime"
120
- },
140
+ "toState": "AUTH_MEMBER",
141
+ "actions": []
142
+ },
143
+ {
144
+ "type": "normal",
145
+ "content": "Event.Void(not(\"vip1\"inlabels))->AUTH_VIP1",
146
+ "eventName": "Void",
147
+ "eventParamList": [
121
148
  {
122
- "paramName": "limitTime",
123
- "paramValue": "limitTime",
149
+ "paramValue": "not(\"vip1\"inlabels)",
124
150
  "paramValueObj": {
125
- "expType": "variableChain",
126
- "varType": "normal",
127
- "content": "limitTime"
151
+ "expType": "expBooleanOpLogic",
152
+ "var1": {
153
+ "expType": "expBooleanParen",
154
+ "var1": {
155
+ "expType": "expBooleanOpCollection",
156
+ "var1": {
157
+ "expType": "string",
158
+ "value": "vip1"
159
+ },
160
+ "var2": {
161
+ "expType": "variableChain",
162
+ "varType": "normal",
163
+ "content": "labels"
164
+ },
165
+ "op": "in"
166
+ }
167
+ },
168
+ "op": "not"
128
169
  },
129
- "content": "limitTime=limitTime"
170
+ "content": "not(\"vip1\"inlabels)"
130
171
  }
131
- ]
172
+ ],
173
+ "toState": "AUTH_VIP1",
174
+ "actions": []
132
175
  }
133
176
  ],
134
177
  "serviceStateSection": {
135
- "serviceStateCollection": [
136
- "active"
137
- ]
178
+ "serviceState": "None"
138
179
  },
139
- "stateContextArgs": [
140
- "startTime"
141
- ]
180
+ "stateContextArgs": []
142
181
  },
143
182
  {
144
- "stateName": "S1",
145
- "assignments": [
183
+ "stateName": "AUTH_MEMBER",
184
+ "assignments": [],
185
+ "events": [
146
186
  {
147
- "type": "varInitial",
148
- "content": "letcount=Query.ResourceService.CountOfUpdates({\"subject\":policy.subject,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime})",
149
- "varName": "count",
150
- "varValue": "Query.ResourceService.CountOfUpdates({\"subject\":policy.subject,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime})",
151
- "varValueObj": {
152
- "funcName": "CountOfUpdates",
153
- "paramList": [
154
- {
155
- "paramValue": "{\"subject\":policy.subject,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime}",
156
- "paramValueObj": {
157
- "expType": "expArgsGroup",
158
- "paramList": [
159
- {
160
- "paramName": "subject",
161
- "paramValue": "policy.subject",
162
- "paramValueObj": {
163
- "expType": "variableChain",
164
- "varType": "normal",
165
- "content": "policy.subject"
166
- }
167
- },
168
- {
169
- "paramName": "startTime",
170
- "paramValue": "contextArgs.startTime",
171
- "paramValueObj": {
172
- "expType": "variableChain",
173
- "varType": "normal",
174
- "content": "contextArgs.startTime"
175
- }
176
- },
177
- {
178
- "paramName": "limitTime",
179
- "paramValue": "contextArgs.limitTime",
180
- "paramValueObj": {
181
- "expType": "variableChain",
182
- "varType": "normal",
183
- "content": "contextArgs.limitTime"
184
- }
185
- }
186
- ]
187
- },
188
- "content": "{\"subject\":policy.subject,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime}"
187
+ "type": "normal",
188
+ "content": "Event.Transaction.Pay(amount=unitPrice,elemsNum=1)->AUTH_MEMBER{fun.addElements(setUnlocked,contract.licenseeSelectedElems,false)}",
189
+ "eventName": "Pay",
190
+ "eventParamList": [
191
+ {
192
+ "paramValue": "unitPrice",
193
+ "paramValueObj": {
194
+ "expType": "variableChain",
195
+ "varType": "normal",
196
+ "content": "unitPrice"
197
+ },
198
+ "content": "amount=unitPrice",
199
+ "paramName": "amount"
200
+ },
201
+ {
202
+ "paramValue": "1",
203
+ "paramValueObj": {
204
+ "expType": "number",
205
+ "value": "1"
206
+ },
207
+ "content": "elemsNum=1",
208
+ "paramName": "elemsNum"
209
+ }
210
+ ],
211
+ "toState": "AUTH_MEMBER",
212
+ "actions": [
213
+ {
214
+ "type": "functionCall",
215
+ "content": "fun.addElements(setUnlocked,contract.licenseeSelectedElems,false)",
216
+ "actionObj": {
217
+ "funcName": "addElements",
218
+ "paramList": [
219
+ {
220
+ "paramValue": "setUnlocked",
221
+ "paramValueObj": {
222
+ "expType": "variableChain",
223
+ "varType": "normal",
224
+ "content": "setUnlocked"
225
+ },
226
+ "content": "setUnlocked"
227
+ },
228
+ {
229
+ "paramValue": "contract.licenseeSelectedElems",
230
+ "paramValueObj": {
231
+ "expType": "variableChain",
232
+ "varType": "normal",
233
+ "content": "contract.licenseeSelectedElems"
234
+ },
235
+ "content": "contract.licenseeSelectedElems"
236
+ },
237
+ {
238
+ "paramValue": "false",
239
+ "paramValueObj": {
240
+ "expType": "boolean",
241
+ "value": "false"
242
+ },
243
+ "content": "false"
244
+ }
245
+ ],
246
+ "expType": "functionCall",
247
+ "varChain": "fun"
189
248
  }
190
- ],
191
- "expType": "functionCall",
192
- "varChain": "Query.ResourceService"
193
- },
194
- "varValueType": "number"
195
- }
196
- ],
197
- "events": [
249
+ }
250
+ ],
251
+ "eventPath": "Transaction"
252
+ },
198
253
  {
199
254
  "type": "normal",
200
- "content": "Event.Void(countless20)->S2[startTime=contextArgs.startTime,limitTime=contextArgs.limitTime]",
201
- "eventName": "Void",
255
+ "content": "Event.Transaction.Pay(amount=unitPrice*10*0.8,elemsNum=10)->AUTH_MEMBER{fun.addElements(setUnlocked,contract.licenseeSelectedElems,false)}",
256
+ "eventName": "Pay",
202
257
  "eventParamList": [
203
258
  {
204
- "paramValue": "countless20",
259
+ "paramValue": "unitPrice*10*0.8",
205
260
  "paramValueObj": {
206
- "expType": "expBooleanOpCompare",
261
+ "expType": "expOp",
207
262
  "var1": {
208
- "expType": "variableChain",
209
- "varType": "normal",
210
- "content": "count"
263
+ "expType": "expOp",
264
+ "var1": {
265
+ "expType": "variableChain",
266
+ "varType": "normal",
267
+ "content": "unitPrice"
268
+ },
269
+ "var2": {
270
+ "expType": "number",
271
+ "value": "10"
272
+ },
273
+ "op": "*"
211
274
  },
212
275
  "var2": {
213
276
  "expType": "number",
214
- "value": "20"
277
+ "value": "0.8"
215
278
  },
216
- "op": "less"
279
+ "op": "*"
217
280
  },
218
- "content": "countless20"
281
+ "content": "amount=unitPrice*10*0.8",
282
+ "paramName": "amount"
283
+ },
284
+ {
285
+ "paramValue": "10",
286
+ "paramValueObj": {
287
+ "expType": "number",
288
+ "value": "10"
289
+ },
290
+ "content": "elemsNum=10",
291
+ "paramName": "elemsNum"
219
292
  }
220
293
  ],
221
- "toState": "S2",
222
- "actions": [],
223
- "stateContextArgs": [
294
+ "toState": "AUTH_MEMBER",
295
+ "actions": [
224
296
  {
225
- "paramName": "startTime",
226
- "paramValue": "contextArgs.startTime",
297
+ "type": "functionCall",
298
+ "content": "fun.addElements(setUnlocked,contract.licenseeSelectedElems,false)",
299
+ "actionObj": {
300
+ "funcName": "addElements",
301
+ "paramList": [
302
+ {
303
+ "paramValue": "setUnlocked",
304
+ "paramValueObj": {
305
+ "expType": "variableChain",
306
+ "varType": "normal",
307
+ "content": "setUnlocked"
308
+ },
309
+ "content": "setUnlocked"
310
+ },
311
+ {
312
+ "paramValue": "contract.licenseeSelectedElems",
313
+ "paramValueObj": {
314
+ "expType": "variableChain",
315
+ "varType": "normal",
316
+ "content": "contract.licenseeSelectedElems"
317
+ },
318
+ "content": "contract.licenseeSelectedElems"
319
+ },
320
+ {
321
+ "paramValue": "false",
322
+ "paramValueObj": {
323
+ "expType": "boolean",
324
+ "value": "false"
325
+ },
326
+ "content": "false"
327
+ }
328
+ ],
329
+ "expType": "functionCall",
330
+ "varChain": "fun"
331
+ }
332
+ }
333
+ ],
334
+ "eventPath": "Transaction"
335
+ },
336
+ {
337
+ "type": "normal",
338
+ "content": "Event.Custom.AcceptEvent({\"title\":\"MembershipChange\",\"subject\":echoSubject,\"label\":\"vip1\"})->AUTH_VIP1",
339
+ "eventName": "AcceptEvent",
340
+ "eventParamList": [
341
+ {
342
+ "paramValue": "{\"title\":\"MembershipChange\",\"subject\":echoSubject,\"label\":\"vip1\"}",
227
343
  "paramValueObj": {
228
- "expType": "variableChain",
229
- "varType": "normal",
230
- "content": "contextArgs.startTime"
344
+ "expType": "expArgsGroup",
345
+ "paramList": [
346
+ {
347
+ "paramName": "title",
348
+ "paramValue": "\"MembershipChange\"",
349
+ "paramValueObj": {
350
+ "expType": "string",
351
+ "value": "MembershipChange"
352
+ }
353
+ },
354
+ {
355
+ "paramName": "subject",
356
+ "paramValue": "echoSubject",
357
+ "paramValueObj": {
358
+ "expType": "variableChain",
359
+ "varType": "normal",
360
+ "content": "echoSubject"
361
+ }
362
+ },
363
+ {
364
+ "paramName": "label",
365
+ "paramValue": "\"vip1\"",
366
+ "paramValueObj": {
367
+ "expType": "string",
368
+ "value": "vip1"
369
+ }
370
+ }
371
+ ]
231
372
  },
232
- "content": "startTime=contextArgs.startTime"
233
- },
373
+ "content": "{\"title\":\"MembershipChange\",\"subject\":echoSubject,\"label\":\"vip1\"}"
374
+ }
375
+ ],
376
+ "toState": "AUTH_VIP1",
377
+ "actions": [],
378
+ "eventPath": "Custom"
379
+ },
380
+ {
381
+ "type": "normal",
382
+ "content": "Event.Custom.WatchAD(elemsNum=1)->AUTH_MEMBER{fun.addElements(setTemp,contract.licenseeSelectedElems,false)}",
383
+ "eventName": "WatchAD",
384
+ "eventParamList": [
234
385
  {
235
- "paramName": "limitTime",
236
- "paramValue": "contextArgs.limitTime",
386
+ "paramValue": "1",
237
387
  "paramValueObj": {
238
- "expType": "variableChain",
239
- "varType": "normal",
240
- "content": "contextArgs.limitTime"
388
+ "expType": "number",
389
+ "value": "1"
241
390
  },
242
- "content": "limitTime=contextArgs.limitTime"
391
+ "content": "elemsNum=1",
392
+ "paramName": "elemsNum"
243
393
  }
244
- ]
394
+ ],
395
+ "toState": "AUTH_MEMBER",
396
+ "actions": [
397
+ {
398
+ "type": "functionCall",
399
+ "content": "fun.addElements(setTemp,contract.licenseeSelectedElems,false)",
400
+ "actionObj": {
401
+ "funcName": "addElements",
402
+ "paramList": [
403
+ {
404
+ "paramValue": "setTemp",
405
+ "paramValueObj": {
406
+ "expType": "variableChain",
407
+ "varType": "normal",
408
+ "content": "setTemp"
409
+ },
410
+ "content": "setTemp"
411
+ },
412
+ {
413
+ "paramValue": "contract.licenseeSelectedElems",
414
+ "paramValueObj": {
415
+ "expType": "variableChain",
416
+ "varType": "normal",
417
+ "content": "contract.licenseeSelectedElems"
418
+ },
419
+ "content": "contract.licenseeSelectedElems"
420
+ },
421
+ {
422
+ "paramValue": "false",
423
+ "paramValueObj": {
424
+ "expType": "boolean",
425
+ "value": "false"
426
+ },
427
+ "content": "false"
428
+ }
429
+ ],
430
+ "expType": "functionCall",
431
+ "varChain": "fun"
432
+ }
433
+ }
434
+ ],
435
+ "eventPath": "Custom"
245
436
  },
246
437
  {
247
438
  "type": "normal",
248
- "content": "Event.Void(countgreaterOrEqual20)->S3",
249
- "eventName": "Void",
439
+ "content": "Event.Time.Schedule(Time.AddTime(Time.GetTime(Time.Now(),\"day\"),1,\"day\"))->AUTH_MEMBER{fun.clearElems(setTemp)}",
440
+ "eventName": "Schedule",
250
441
  "eventParamList": [
251
442
  {
252
- "paramValue": "countgreaterOrEqual20",
443
+ "paramValue": "Time.AddTime(Time.GetTime(Time.Now(),\"day\"),1,\"day\")",
253
444
  "paramValueObj": {
254
- "expType": "expBooleanOpCompare",
255
- "var1": {
256
- "expType": "variableChain",
257
- "varType": "normal",
258
- "content": "count"
259
- },
260
- "var2": {
261
- "expType": "number",
262
- "value": "20"
263
- },
264
- "op": "greaterOrEqual"
445
+ "funcName": "AddTime",
446
+ "paramList": [
447
+ {
448
+ "paramValue": "Time.GetTime(Time.Now(),\"day\")",
449
+ "paramValueObj": {
450
+ "funcName": "GetTime",
451
+ "paramList": [
452
+ {
453
+ "paramValue": "Time.Now()",
454
+ "paramValueObj": {
455
+ "funcName": "Now",
456
+ "paramList": [],
457
+ "expType": "functionCall",
458
+ "varChain": "Time"
459
+ },
460
+ "content": "Time.Now()"
461
+ },
462
+ {
463
+ "paramValue": "\"day\"",
464
+ "paramValueObj": {
465
+ "expType": "string",
466
+ "value": "day"
467
+ },
468
+ "content": "\"day\""
469
+ }
470
+ ],
471
+ "expType": "functionCall",
472
+ "varChain": "Time"
473
+ },
474
+ "content": "Time.GetTime(Time.Now(),\"day\")"
475
+ },
476
+ {
477
+ "paramValue": "1",
478
+ "paramValueObj": {
479
+ "expType": "number",
480
+ "value": "1"
481
+ },
482
+ "content": "1"
483
+ },
484
+ {
485
+ "paramValue": "\"day\"",
486
+ "paramValueObj": {
487
+ "expType": "string",
488
+ "value": "day"
489
+ },
490
+ "content": "\"day\""
491
+ }
492
+ ],
493
+ "expType": "functionCall",
494
+ "varChain": "Time"
265
495
  },
266
- "content": "countgreaterOrEqual20"
496
+ "content": "Time.AddTime(Time.GetTime(Time.Now(),\"day\"),1,\"day\")"
267
497
  }
268
498
  ],
269
- "toState": "S3",
270
- "actions": []
499
+ "toState": "AUTH_MEMBER",
500
+ "actions": [
501
+ {
502
+ "type": "functionCall",
503
+ "content": "fun.clearElems(setTemp)",
504
+ "actionObj": {
505
+ "funcName": "clearElems",
506
+ "paramList": [
507
+ {
508
+ "paramValue": "setTemp",
509
+ "paramValueObj": {
510
+ "expType": "variableChain",
511
+ "varType": "normal",
512
+ "content": "setTemp"
513
+ },
514
+ "content": "setTemp"
515
+ }
516
+ ],
517
+ "expType": "functionCall",
518
+ "varChain": "fun"
519
+ }
520
+ }
521
+ ],
522
+ "eventPath": "Time"
271
523
  }
272
524
  ],
273
525
  "serviceStateSection": {
526
+ "serviceState": "Partial",
274
527
  "serviceStateCollection": [
275
- "active"
528
+ "setUnlocked",
529
+ "setTemp"
276
530
  ]
277
531
  },
278
- "stateContextArgs": [
279
- "startTime",
280
- "limitTime"
281
- ]
532
+ "stateContextArgs": []
282
533
  },
283
534
  {
284
- "stateName": "S2",
285
- "assignments": [
535
+ "stateName": "AUTH_VIP1",
536
+ "assignments": [],
537
+ "events": [
286
538
  {
287
- "type": "varInitial",
288
- "content": "letsumAmounts=Query.TransatcionService.AmountsSum({\"subject\":xxx,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime})",
289
- "varName": "sumAmounts",
290
- "varValue": "Query.TransatcionService.AmountsSum({\"subject\":xxx,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime})",
291
- "varValueObj": {
292
- "funcName": "AmountsSum",
293
- "paramList": [
294
- {
295
- "paramValue": "{\"subject\":xxx,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime}",
296
- "paramValueObj": {
297
- "expType": "expArgsGroup",
298
- "paramList": [
299
- {
300
- "paramName": "subject",
301
- "paramValue": "xxx",
302
- "paramValueObj": {
303
- "expType": "variableChain",
304
- "varType": "normal",
305
- "content": "xxx"
306
- }
307
- },
308
- {
309
- "paramName": "startTime",
310
- "paramValue": "contextArgs.startTime",
311
- "paramValueObj": {
312
- "expType": "variableChain",
313
- "varType": "normal",
314
- "content": "contextArgs.startTime"
315
- }
316
- },
317
- {
318
- "paramName": "limitTime",
319
- "paramValue": "contextArgs.limitTime",
320
- "paramValueObj": {
321
- "expType": "variableChain",
322
- "varType": "normal",
323
- "content": "contextArgs.limitTime"
324
- }
325
- }
326
- ]
539
+ "type": "normal",
540
+ "content": "Event.Transaction.Pay(amount=unitPrice*0.75,elemsNum=1)->AUTH_VIP1{fun.addElements(setUnlocked,contract.licenseeSelectedElems,false)}",
541
+ "eventName": "Pay",
542
+ "eventParamList": [
543
+ {
544
+ "paramValue": "unitPrice*0.75",
545
+ "paramValueObj": {
546
+ "expType": "expOp",
547
+ "var1": {
548
+ "expType": "variableChain",
549
+ "varType": "normal",
550
+ "content": "unitPrice"
551
+ },
552
+ "var2": {
553
+ "expType": "number",
554
+ "value": "0.75"
327
555
  },
328
- "content": "{\"subject\":xxx,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime}"
556
+ "op": "*"
557
+ },
558
+ "content": "amount=unitPrice*0.75",
559
+ "paramName": "amount"
560
+ },
561
+ {
562
+ "paramValue": "1",
563
+ "paramValueObj": {
564
+ "expType": "number",
565
+ "value": "1"
566
+ },
567
+ "content": "elemsNum=1",
568
+ "paramName": "elemsNum"
569
+ }
570
+ ],
571
+ "toState": "AUTH_VIP1",
572
+ "actions": [
573
+ {
574
+ "type": "functionCall",
575
+ "content": "fun.addElements(setUnlocked,contract.licenseeSelectedElems,false)",
576
+ "actionObj": {
577
+ "funcName": "addElements",
578
+ "paramList": [
579
+ {
580
+ "paramValue": "setUnlocked",
581
+ "paramValueObj": {
582
+ "expType": "variableChain",
583
+ "varType": "normal",
584
+ "content": "setUnlocked"
585
+ },
586
+ "content": "setUnlocked"
587
+ },
588
+ {
589
+ "paramValue": "contract.licenseeSelectedElems",
590
+ "paramValueObj": {
591
+ "expType": "variableChain",
592
+ "varType": "normal",
593
+ "content": "contract.licenseeSelectedElems"
594
+ },
595
+ "content": "contract.licenseeSelectedElems"
596
+ },
597
+ {
598
+ "paramValue": "false",
599
+ "paramValueObj": {
600
+ "expType": "boolean",
601
+ "value": "false"
602
+ },
603
+ "content": "false"
604
+ }
605
+ ],
606
+ "expType": "functionCall",
607
+ "varChain": "fun"
329
608
  }
330
- ],
331
- "expType": "functionCall",
332
- "varChain": "Query.TransatcionService"
333
- },
334
- "varValueType": "any"
609
+ }
610
+ ],
611
+ "eventPath": "Transaction"
335
612
  },
336
613
  {
337
- "type": "varInitial",
338
- "content": "letdebt=1000+Kit.Min(5000,(sumAmounts-1000)*0.05)",
339
- "varName": "debt",
340
- "varValue": "1000+Kit.Min(5000,(sumAmounts-1000)*0.05)",
341
- "varValueObj": {
342
- "expType": "expOp",
343
- "var1": {
344
- "expType": "number",
345
- "value": "1000"
346
- },
347
- "var2": {
348
- "funcName": "Min",
349
- "paramList": [
350
- {
351
- "paramValue": "5000",
352
- "paramValueObj": {
614
+ "type": "normal",
615
+ "content": "Event.Transaction.Pay(amount=unitPrice*10*0.6,elemsNum=10)->AUTH_VIP1{fun.addElements(setUnlocked,contract.licenseeSelectedElems,false)}",
616
+ "eventName": "Pay",
617
+ "eventParamList": [
618
+ {
619
+ "paramValue": "unitPrice*10*0.6",
620
+ "paramValueObj": {
621
+ "expType": "expOp",
622
+ "var1": {
623
+ "expType": "expOp",
624
+ "var1": {
625
+ "expType": "variableChain",
626
+ "varType": "normal",
627
+ "content": "unitPrice"
628
+ },
629
+ "var2": {
353
630
  "expType": "number",
354
- "value": "5000"
631
+ "value": "10"
355
632
  },
356
- "content": "5000"
633
+ "op": "*"
357
634
  },
358
- {
359
- "paramValue": "(sumAmounts-1000)*0.05",
360
- "paramValueObj": {
361
- "expType": "expOp",
362
- "var1": {
363
- "expType": "expParen",
364
- "var1": {
365
- "expType": "expOp",
366
- "var1": {
367
- "expType": "variableChain",
368
- "varType": "normal",
369
- "content": "sumAmounts"
370
- },
371
- "var2": {
372
- "expType": "number",
373
- "value": "1000"
374
- },
375
- "op": "-"
376
- }
635
+ "var2": {
636
+ "expType": "number",
637
+ "value": "0.6"
638
+ },
639
+ "op": "*"
640
+ },
641
+ "content": "amount=unitPrice*10*0.6",
642
+ "paramName": "amount"
643
+ },
644
+ {
645
+ "paramValue": "10",
646
+ "paramValueObj": {
647
+ "expType": "number",
648
+ "value": "10"
649
+ },
650
+ "content": "elemsNum=10",
651
+ "paramName": "elemsNum"
652
+ }
653
+ ],
654
+ "toState": "AUTH_VIP1",
655
+ "actions": [
656
+ {
657
+ "type": "functionCall",
658
+ "content": "fun.addElements(setUnlocked,contract.licenseeSelectedElems,false)",
659
+ "actionObj": {
660
+ "funcName": "addElements",
661
+ "paramList": [
662
+ {
663
+ "paramValue": "setUnlocked",
664
+ "paramValueObj": {
665
+ "expType": "variableChain",
666
+ "varType": "normal",
667
+ "content": "setUnlocked"
377
668
  },
378
- "var2": {
379
- "expType": "number",
380
- "value": "0.05"
669
+ "content": "setUnlocked"
670
+ },
671
+ {
672
+ "paramValue": "contract.licenseeSelectedElems",
673
+ "paramValueObj": {
674
+ "expType": "variableChain",
675
+ "varType": "normal",
676
+ "content": "contract.licenseeSelectedElems"
381
677
  },
382
- "op": "*"
678
+ "content": "contract.licenseeSelectedElems"
383
679
  },
384
- "content": "(sumAmounts-1000)*0.05"
385
- }
386
- ],
387
- "expType": "functionCall",
388
- "varChain": "Kit"
389
- },
390
- "op": "+"
391
- },
392
- "varValueType": "number"
393
- }
394
- ],
395
- "events": [
680
+ {
681
+ "paramValue": "false",
682
+ "paramValueObj": {
683
+ "expType": "boolean",
684
+ "value": "false"
685
+ },
686
+ "content": "false"
687
+ }
688
+ ],
689
+ "expType": "functionCall",
690
+ "varChain": "fun"
691
+ }
692
+ }
693
+ ],
694
+ "eventPath": "Transaction"
695
+ },
696
+ {
697
+ "type": "normal",
698
+ "content": "Event.Custom.AcceptEvent({\"title\":\"MembershipChange\",\"subject\":echoSubject,\"label\":\"member\"})->AUTH_MEMBER",
699
+ "eventName": "AcceptEvent",
700
+ "eventParamList": [
701
+ {
702
+ "paramValue": "{\"title\":\"MembershipChange\",\"subject\":echoSubject,\"label\":\"member\"}",
703
+ "paramValueObj": {
704
+ "expType": "expArgsGroup",
705
+ "paramList": [
706
+ {
707
+ "paramName": "title",
708
+ "paramValue": "\"MembershipChange\"",
709
+ "paramValueObj": {
710
+ "expType": "string",
711
+ "value": "MembershipChange"
712
+ }
713
+ },
714
+ {
715
+ "paramName": "subject",
716
+ "paramValue": "echoSubject",
717
+ "paramValueObj": {
718
+ "expType": "variableChain",
719
+ "varType": "normal",
720
+ "content": "echoSubject"
721
+ }
722
+ },
723
+ {
724
+ "paramName": "label",
725
+ "paramValue": "\"member\"",
726
+ "paramValueObj": {
727
+ "expType": "string",
728
+ "value": "member"
729
+ }
730
+ }
731
+ ]
732
+ },
733
+ "content": "{\"title\":\"MembershipChange\",\"subject\":echoSubject,\"label\":\"member\"}"
734
+ }
735
+ ],
736
+ "toState": "AUTH_MEMBER",
737
+ "actions": [],
738
+ "eventPath": "Custom"
739
+ },
396
740
  {
397
741
  "type": "normal",
398
- "content": "Event.Transaction.Pay(amount=debt,elemsNum=0)->Auth[startTime=contextArgs.limitTime]",
399
- "eventName": "Pay",
742
+ "content": "Event.Custom.WatchAD(elemsNum=1)->AUTH_VIP1{fun.addElements(setTemp,contract.licenseeSelectedElems,false)}",
743
+ "eventName": "WatchAD",
400
744
  "eventParamList": [
401
745
  {
402
- "paramValue": "debt",
403
- "paramValueObj": {
404
- "expType": "variableChain",
405
- "varType": "normal",
406
- "content": "debt"
407
- },
408
- "content": "amount=debt",
409
- "paramName": "amount"
410
- },
411
- {
412
- "paramValue": "0",
746
+ "paramValue": "1",
413
747
  "paramValueObj": {
414
748
  "expType": "number",
415
- "value": "0"
749
+ "value": "1"
416
750
  },
417
- "content": "elemsNum=0",
751
+ "content": "elemsNum=1",
418
752
  "paramName": "elemsNum"
419
753
  }
420
754
  ],
421
- "toState": "Auth",
422
- "actions": [],
423
- "eventPath": "Transaction",
424
- "stateContextArgs": [
755
+ "toState": "AUTH_VIP1",
756
+ "actions": [
425
757
  {
426
- "paramName": "startTime",
427
- "paramValue": "contextArgs.limitTime",
428
- "paramValueObj": {
429
- "expType": "variableChain",
430
- "varType": "normal",
431
- "content": "contextArgs.limitTime"
432
- },
433
- "content": "startTime=contextArgs.limitTime"
758
+ "type": "functionCall",
759
+ "content": "fun.addElements(setTemp,contract.licenseeSelectedElems,false)",
760
+ "actionObj": {
761
+ "funcName": "addElements",
762
+ "paramList": [
763
+ {
764
+ "paramValue": "setTemp",
765
+ "paramValueObj": {
766
+ "expType": "variableChain",
767
+ "varType": "normal",
768
+ "content": "setTemp"
769
+ },
770
+ "content": "setTemp"
771
+ },
772
+ {
773
+ "paramValue": "contract.licenseeSelectedElems",
774
+ "paramValueObj": {
775
+ "expType": "variableChain",
776
+ "varType": "normal",
777
+ "content": "contract.licenseeSelectedElems"
778
+ },
779
+ "content": "contract.licenseeSelectedElems"
780
+ },
781
+ {
782
+ "paramValue": "false",
783
+ "paramValueObj": {
784
+ "expType": "boolean",
785
+ "value": "false"
786
+ },
787
+ "content": "false"
788
+ }
789
+ ],
790
+ "expType": "functionCall",
791
+ "varChain": "fun"
792
+ }
434
793
  }
435
- ]
794
+ ],
795
+ "eventPath": "Custom"
436
796
  },
437
797
  {
438
798
  "type": "normal",
439
- "content": "Event.Time.Schedule(dateTime=Time.AddTime(contextArgs.limitTime,lockupDays,\"day\"))->Lockup[limitTime=contextArgs.limitTime,debt=debt]",
799
+ "content": "Event.Time.Schedule(Time.AddTime(Time.GetTime(Time.Now(),\"day\"),1,\"day\"))->AUTH_VIP1{fun.clearElems(setTemp)}",
440
800
  "eventName": "Schedule",
441
801
  "eventParamList": [
442
802
  {
443
- "paramValue": "Time.AddTime(contextArgs.limitTime,lockupDays,\"day\")",
803
+ "paramValue": "Time.AddTime(Time.GetTime(Time.Now(),\"day\"),1,\"day\")",
444
804
  "paramValueObj": {
445
805
  "funcName": "AddTime",
446
806
  "paramList": [
447
807
  {
448
- "paramValue": "contextArgs.limitTime",
808
+ "paramValue": "Time.GetTime(Time.Now(),\"day\")",
449
809
  "paramValueObj": {
450
- "expType": "variableChain",
451
- "varType": "normal",
452
- "content": "contextArgs.limitTime"
810
+ "funcName": "GetTime",
811
+ "paramList": [
812
+ {
813
+ "paramValue": "Time.Now()",
814
+ "paramValueObj": {
815
+ "funcName": "Now",
816
+ "paramList": [],
817
+ "expType": "functionCall",
818
+ "varChain": "Time"
819
+ },
820
+ "content": "Time.Now()"
821
+ },
822
+ {
823
+ "paramValue": "\"day\"",
824
+ "paramValueObj": {
825
+ "expType": "string",
826
+ "value": "day"
827
+ },
828
+ "content": "\"day\""
829
+ }
830
+ ],
831
+ "expType": "functionCall",
832
+ "varChain": "Time"
453
833
  },
454
- "content": "contextArgs.limitTime"
834
+ "content": "Time.GetTime(Time.Now(),\"day\")"
455
835
  },
456
836
  {
457
- "paramValue": "lockupDays",
837
+ "paramValue": "1",
458
838
  "paramValueObj": {
459
- "expType": "variableChain",
460
- "varType": "normal",
461
- "content": "lockupDays"
839
+ "expType": "number",
840
+ "value": "1"
462
841
  },
463
- "content": "lockupDays"
842
+ "content": "1"
464
843
  },
465
844
  {
466
845
  "paramValue": "\"day\"",
@@ -474,389 +853,195 @@
474
853
  "expType": "functionCall",
475
854
  "varChain": "Time"
476
855
  },
477
- "content": "dateTime=Time.AddTime(contextArgs.limitTime,lockupDays,\"day\")",
478
- "paramName": "dateTime"
856
+ "content": "Time.AddTime(Time.GetTime(Time.Now(),\"day\"),1,\"day\")"
479
857
  }
480
858
  ],
481
- "toState": "Lockup",
482
- "actions": [],
483
- "eventPath": "Time",
484
- "stateContextArgs": [
485
- {
486
- "paramName": "limitTime",
487
- "paramValue": "contextArgs.limitTime",
488
- "paramValueObj": {
489
- "expType": "variableChain",
490
- "varType": "normal",
491
- "content": "contextArgs.limitTime"
492
- },
493
- "content": "limitTime=contextArgs.limitTime"
494
- },
859
+ "toState": "AUTH_VIP1",
860
+ "actions": [
495
861
  {
496
- "paramName": "debt",
497
- "paramValue": "debt",
498
- "paramValueObj": {
499
- "expType": "variableChain",
500
- "varType": "normal",
501
- "content": "debt"
502
- },
503
- "content": "debt=debt"
504
- }
505
- ]
506
- }
507
- ],
508
- "serviceStateSection": {
509
- "serviceStateCollection": [
510
- "active"
511
- ]
512
- },
513
- "stateContextArgs": [
514
- "startTime",
515
- "limitTime"
516
- ]
517
- },
518
- {
519
- "stateName": "S3",
520
- "assignments": [
521
- {
522
- "type": "varInitial",
523
- "content": "letsumAmounts=Query.TransatcionService.AmountsSum({\"subject\":xxx,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime})",
524
- "varName": "sumAmounts",
525
- "varValue": "Query.TransatcionService.AmountsSum({\"subject\":xxx,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime})",
526
- "varValueObj": {
527
- "funcName": "AmountsSum",
528
- "paramList": [
529
- {
530
- "paramValue": "{\"subject\":xxx,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime}",
531
- "paramValueObj": {
532
- "expType": "expArgsGroup",
533
- "paramList": [
534
- {
535
- "paramName": "subject",
536
- "paramValue": "xxx",
537
- "paramValueObj": {
538
- "expType": "variableChain",
539
- "varType": "normal",
540
- "content": "xxx"
541
- }
542
- },
543
- {
544
- "paramName": "startTime",
545
- "paramValue": "contextArgs.startTime",
546
- "paramValueObj": {
547
- "expType": "variableChain",
548
- "varType": "normal",
549
- "content": "contextArgs.startTime"
550
- }
551
- },
552
- {
553
- "paramName": "limitTime",
554
- "paramValue": "contextArgs.limitTime",
555
- "paramValueObj": {
556
- "expType": "variableChain",
557
- "varType": "normal",
558
- "content": "contextArgs.limitTime"
559
- }
560
- }
561
- ]
562
- },
563
- "content": "{\"subject\":xxx,\"startTime\":contextArgs.startTime,\"limitTime\":contextArgs.limitTime}"
862
+ "type": "functionCall",
863
+ "content": "fun.clearElems(setTemp)",
864
+ "actionObj": {
865
+ "funcName": "clearElems",
866
+ "paramList": [
867
+ {
868
+ "paramValue": "setTemp",
869
+ "paramValueObj": {
870
+ "expType": "variableChain",
871
+ "varType": "normal",
872
+ "content": "setTemp"
873
+ },
874
+ "content": "setTemp"
875
+ }
876
+ ],
877
+ "expType": "functionCall",
878
+ "varChain": "fun"
564
879
  }
565
- ],
566
- "expType": "functionCall",
567
- "varChain": "Query.TransatcionService"
568
- },
569
- "varValueType": "any"
880
+ }
881
+ ],
882
+ "eventPath": "Time"
570
883
  },
571
- {
572
- "type": "varInitial",
573
- "content": "letdebt=3000+Kit.Min(8000,(sumAmounts-3000)*0.08)",
574
- "varName": "debt",
575
- "varValue": "3000+Kit.Min(8000,(sumAmounts-3000)*0.08)",
576
- "varValueObj": {
577
- "expType": "expOp",
578
- "var1": {
579
- "expType": "number",
580
- "value": "3000"
581
- },
582
- "var2": {
583
- "funcName": "Min",
584
- "paramList": [
585
- {
586
- "paramValue": "8000",
587
- "paramValueObj": {
588
- "expType": "number",
589
- "value": "8000"
590
- },
591
- "content": "8000"
592
- },
593
- {
594
- "paramValue": "(sumAmounts-3000)*0.08",
595
- "paramValueObj": {
596
- "expType": "expOp",
597
- "var1": {
598
- "expType": "expParen",
599
- "var1": {
600
- "expType": "expOp",
601
- "var1": {
602
- "expType": "variableChain",
603
- "varType": "normal",
604
- "content": "sumAmounts"
605
- },
606
- "var2": {
607
- "expType": "number",
608
- "value": "3000"
609
- },
610
- "op": "-"
611
- }
612
- },
613
- "var2": {
614
- "expType": "number",
615
- "value": "0.08"
616
- },
617
- "op": "*"
618
- },
619
- "content": "(sumAmounts-3000)*0.08"
620
- }
621
- ],
622
- "expType": "functionCall",
623
- "varChain": "Kit"
624
- },
625
- "op": "+"
626
- },
627
- "varValueType": "number"
628
- }
629
- ],
630
- "events": [
631
884
  {
632
885
  "type": "normal",
633
- "content": "Event.Transaction.Pay(amount=debt,elemsNum=0)->Auth[startTime=contextArgs.limitTime]",
886
+ "content": "Event.Transaction.Pay(amount=0,elemsNum=1)->FREE_UNLOCK_ROUTE[elems:contract.licenseeSelectedElems]",
634
887
  "eventName": "Pay",
635
888
  "eventParamList": [
636
889
  {
637
- "paramValue": "debt",
890
+ "paramValue": "0",
638
891
  "paramValueObj": {
639
- "expType": "variableChain",
640
- "varType": "normal",
641
- "content": "debt"
892
+ "expType": "number",
893
+ "value": "0"
642
894
  },
643
- "content": "amount=debt",
895
+ "content": "amount=0",
644
896
  "paramName": "amount"
645
897
  },
646
898
  {
647
- "paramValue": "0",
899
+ "paramValue": "1",
648
900
  "paramValueObj": {
649
901
  "expType": "number",
650
- "value": "0"
902
+ "value": "1"
651
903
  },
652
- "content": "elemsNum=0",
904
+ "content": "elemsNum=1",
653
905
  "paramName": "elemsNum"
654
906
  }
655
907
  ],
656
- "toState": "Auth",
908
+ "toState": "FREE_UNLOCK_ROUTE",
657
909
  "actions": [],
658
910
  "eventPath": "Transaction",
659
911
  "stateContextArgs": [
660
912
  {
661
- "paramName": "startTime",
662
- "paramValue": "contextArgs.limitTime",
913
+ "paramName": "elems",
914
+ "paramValue": "contract.licenseeSelectedElems",
663
915
  "paramValueObj": {
664
916
  "expType": "variableChain",
665
917
  "varType": "normal",
666
- "content": "contextArgs.limitTime"
918
+ "content": "contract.licenseeSelectedElems"
667
919
  },
668
- "content": "startTime=contextArgs.limitTime"
920
+ "content": "elems:contract.licenseeSelectedElems"
669
921
  }
670
922
  ]
671
923
  },
672
924
  {
673
925
  "type": "normal",
674
- "content": "Event.Time.Schedule(dateTime=Time.AddTime(contextArgs.limitTime,lockupDays,\"day\"))->Lockup[limitTime=contextArgs.limitTime,debt=debt]",
926
+ "content": "Event.Time.Schedule(Time.AddTime(Time.GetTime(Time.Now(),\"month\"),1,\"month\"))->AUTH_VIP1{fun.clearElems(setFree)}",
675
927
  "eventName": "Schedule",
676
928
  "eventParamList": [
677
929
  {
678
- "paramValue": "Time.AddTime(contextArgs.limitTime,lockupDays,\"day\")",
930
+ "paramValue": "Time.AddTime(Time.GetTime(Time.Now(),\"month\"),1,\"month\")",
679
931
  "paramValueObj": {
680
932
  "funcName": "AddTime",
681
933
  "paramList": [
682
934
  {
683
- "paramValue": "contextArgs.limitTime",
935
+ "paramValue": "Time.GetTime(Time.Now(),\"month\")",
684
936
  "paramValueObj": {
685
- "expType": "variableChain",
686
- "varType": "normal",
687
- "content": "contextArgs.limitTime"
937
+ "funcName": "GetTime",
938
+ "paramList": [
939
+ {
940
+ "paramValue": "Time.Now()",
941
+ "paramValueObj": {
942
+ "funcName": "Now",
943
+ "paramList": [],
944
+ "expType": "functionCall",
945
+ "varChain": "Time"
946
+ },
947
+ "content": "Time.Now()"
948
+ },
949
+ {
950
+ "paramValue": "\"month\"",
951
+ "paramValueObj": {
952
+ "expType": "string",
953
+ "value": "month"
954
+ },
955
+ "content": "\"month\""
956
+ }
957
+ ],
958
+ "expType": "functionCall",
959
+ "varChain": "Time"
688
960
  },
689
- "content": "contextArgs.limitTime"
961
+ "content": "Time.GetTime(Time.Now(),\"month\")"
690
962
  },
691
963
  {
692
- "paramValue": "lockupDays",
964
+ "paramValue": "1",
693
965
  "paramValueObj": {
694
- "expType": "variableChain",
695
- "varType": "normal",
696
- "content": "lockupDays"
966
+ "expType": "number",
967
+ "value": "1"
697
968
  },
698
- "content": "lockupDays"
969
+ "content": "1"
699
970
  },
700
971
  {
701
- "paramValue": "\"day\"",
972
+ "paramValue": "\"month\"",
702
973
  "paramValueObj": {
703
974
  "expType": "string",
704
- "value": "day"
975
+ "value": "month"
705
976
  },
706
- "content": "\"day\""
977
+ "content": "\"month\""
707
978
  }
708
979
  ],
709
980
  "expType": "functionCall",
710
981
  "varChain": "Time"
711
982
  },
712
- "content": "dateTime=Time.AddTime(contextArgs.limitTime,lockupDays,\"day\")",
713
- "paramName": "dateTime"
983
+ "content": "Time.AddTime(Time.GetTime(Time.Now(),\"month\"),1,\"month\")"
714
984
  }
715
985
  ],
716
- "toState": "Lockup",
717
- "actions": [],
718
- "eventPath": "Time",
719
- "stateContextArgs": [
720
- {
721
- "paramName": "limitTime",
722
- "paramValue": "contextArgs.limitTime",
723
- "paramValueObj": {
724
- "expType": "variableChain",
725
- "varType": "normal",
726
- "content": "contextArgs.limitTime"
727
- },
728
- "content": "limitTime=contextArgs.limitTime"
729
- },
986
+ "toState": "AUTH_VIP1",
987
+ "actions": [
730
988
  {
731
- "paramName": "debt",
732
- "paramValue": "debt",
733
- "paramValueObj": {
734
- "expType": "variableChain",
735
- "varType": "normal",
736
- "content": "debt"
737
- },
738
- "content": "debt=debt"
989
+ "type": "functionCall",
990
+ "content": "fun.clearElems(setFree)",
991
+ "actionObj": {
992
+ "funcName": "clearElems",
993
+ "paramList": [
994
+ {
995
+ "paramValue": "setFree",
996
+ "paramValueObj": {
997
+ "expType": "variableChain",
998
+ "varType": "normal",
999
+ "content": "setFree"
1000
+ },
1001
+ "content": "setFree"
1002
+ }
1003
+ ],
1004
+ "expType": "functionCall",
1005
+ "varChain": "fun"
1006
+ }
739
1007
  }
740
- ]
1008
+ ],
1009
+ "eventPath": "Time"
741
1010
  }
742
1011
  ],
743
1012
  "serviceStateSection": {
1013
+ "serviceState": "Partial",
744
1014
  "serviceStateCollection": [
745
- "active"
1015
+ "setUnlocked",
1016
+ "setTemp",
1017
+ "setFree"
746
1018
  ]
747
1019
  },
748
- "stateContextArgs": [
749
- "startTime",
750
- "limitTime"
751
- ]
1020
+ "stateContextArgs": []
752
1021
  },
753
1022
  {
754
- "stateName": "Lockup",
1023
+ "stateName": "FREE_UNLOCK_ROUTE",
755
1024
  "assignments": [
756
1025
  {
757
1026
  "type": "varInitial",
758
- "content": "letsumAmounts=Query.TransatcionService.AmountsSum({\"subject\":xxx,\"startTime\":contextArgs.limitTime,\"limitTime\":Time.AddTime(contextArgs.limitTime,lockupDays,\"day\")})",
759
- "varName": "sumAmounts",
760
- "varValue": "Query.TransatcionService.AmountsSum({\"subject\":xxx,\"startTime\":contextArgs.limitTime,\"limitTime\":Time.AddTime(contextArgs.limitTime,lockupDays,\"day\")})",
1027
+ "content": "letfreeUnlockedSize=Kit.Array.Size(setFree)",
1028
+ "varName": "freeUnlockedSize",
1029
+ "varValue": "Kit.Array.Size(setFree)",
761
1030
  "varValueObj": {
762
- "funcName": "AmountsSum",
1031
+ "funcName": "Size",
763
1032
  "paramList": [
764
1033
  {
765
- "paramValue": "{\"subject\":xxx,\"startTime\":contextArgs.limitTime,\"limitTime\":Time.AddTime(contextArgs.limitTime,lockupDays,\"day\")}",
1034
+ "paramValue": "setFree",
766
1035
  "paramValueObj": {
767
- "expType": "expArgsGroup",
768
- "paramList": [
769
- {
770
- "paramName": "subject",
771
- "paramValue": "xxx",
772
- "paramValueObj": {
773
- "expType": "variableChain",
774
- "varType": "normal",
775
- "content": "xxx"
776
- }
777
- },
778
- {
779
- "paramName": "startTime",
780
- "paramValue": "contextArgs.limitTime",
781
- "paramValueObj": {
782
- "expType": "variableChain",
783
- "varType": "normal",
784
- "content": "contextArgs.limitTime"
785
- }
786
- },
787
- {
788
- "paramName": "limitTime",
789
- "paramValue": "Time.AddTime(contextArgs.limitTime,lockupDays,\"day\")",
790
- "paramValueObj": {
791
- "funcName": "AddTime",
792
- "paramList": [
793
- {
794
- "paramValue": "contextArgs.limitTime",
795
- "paramValueObj": {
796
- "expType": "variableChain",
797
- "varType": "normal",
798
- "content": "contextArgs.limitTime"
799
- },
800
- "content": "contextArgs.limitTime"
801
- },
802
- {
803
- "paramValue": "lockupDays",
804
- "paramValueObj": {
805
- "expType": "variableChain",
806
- "varType": "normal",
807
- "content": "lockupDays"
808
- },
809
- "content": "lockupDays"
810
- },
811
- {
812
- "paramValue": "\"day\"",
813
- "paramValueObj": {
814
- "expType": "string",
815
- "value": "day"
816
- },
817
- "content": "\"day\""
818
- }
819
- ],
820
- "expType": "functionCall",
821
- "varChain": "Time"
822
- }
823
- }
824
- ]
1036
+ "expType": "variableChain",
1037
+ "varType": "normal",
1038
+ "content": "setFree"
825
1039
  },
826
- "content": "{\"subject\":xxx,\"startTime\":contextArgs.limitTime,\"limitTime\":Time.AddTime(contextArgs.limitTime,lockupDays,\"day\")}"
1040
+ "content": "setFree"
827
1041
  }
828
1042
  ],
829
1043
  "expType": "functionCall",
830
- "varChain": "Query.TransatcionService"
831
- },
832
- "varValueType": "any"
833
- },
834
- {
835
- "type": "varInitial",
836
- "content": "letdebt=contextArgs.debt+sumAmounts*0.5",
837
- "varName": "debt",
838
- "varValue": "contextArgs.debt+sumAmounts*0.5",
839
- "varValueObj": {
840
- "expType": "expOp",
841
- "var1": {
842
- "expType": "variableChain",
843
- "varType": "normal",
844
- "content": "contextArgs.debt"
845
- },
846
- "var2": {
847
- "expType": "expOp",
848
- "var1": {
849
- "expType": "variableChain",
850
- "varType": "normal",
851
- "content": "sumAmounts"
852
- },
853
- "var2": {
854
- "expType": "number",
855
- "value": "0.5"
856
- },
857
- "op": "*"
858
- },
859
- "op": "+"
1044
+ "varChain": "Kit.Array"
860
1045
  },
861
1046
  "varValueType": "number"
862
1047
  }
@@ -864,50 +1049,100 @@
864
1049
  "events": [
865
1050
  {
866
1051
  "type": "normal",
867
- "content": "Event.Transaction.Pay(amount=debt,elemsNum=0)->Auth[startTime=Time.Now()]",
868
- "eventName": "Pay",
1052
+ "content": "Event.Void(freeUnlockedSize<4)->AUTH_VIP1{fun.addElements(setFree,contextArgs.elems,false)}",
1053
+ "eventName": "Void",
869
1054
  "eventParamList": [
870
1055
  {
871
- "paramValue": "debt",
872
- "paramValueObj": {
873
- "expType": "variableChain",
874
- "varType": "normal",
875
- "content": "debt"
876
- },
877
- "content": "amount=debt",
878
- "paramName": "amount"
879
- },
880
- {
881
- "paramValue": "0",
1056
+ "paramValue": "freeUnlockedSize<4",
882
1057
  "paramValueObj": {
883
- "expType": "number",
884
- "value": "0"
1058
+ "expType": "expBooleanOpCompare",
1059
+ "var1": {
1060
+ "expType": "variableChain",
1061
+ "varType": "normal",
1062
+ "content": "freeUnlockedSize"
1063
+ },
1064
+ "var2": {
1065
+ "expType": "number",
1066
+ "value": "4"
1067
+ },
1068
+ "op": "<"
885
1069
  },
886
- "content": "elemsNum=0",
887
- "paramName": "elemsNum"
1070
+ "content": "freeUnlockedSize<4"
888
1071
  }
889
1072
  ],
890
- "toState": "Auth",
891
- "actions": [],
892
- "eventPath": "Transaction",
893
- "stateContextArgs": [
1073
+ "toState": "AUTH_VIP1",
1074
+ "actions": [
894
1075
  {
895
- "paramName": "startTime",
896
- "paramValue": "Time.Now()",
897
- "paramValueObj": {
898
- "funcName": "Now",
899
- "paramList": [],
1076
+ "type": "functionCall",
1077
+ "content": "fun.addElements(setFree,contextArgs.elems,false)",
1078
+ "actionObj": {
1079
+ "funcName": "addElements",
1080
+ "paramList": [
1081
+ {
1082
+ "paramValue": "setFree",
1083
+ "paramValueObj": {
1084
+ "expType": "variableChain",
1085
+ "varType": "normal",
1086
+ "content": "setFree"
1087
+ },
1088
+ "content": "setFree"
1089
+ },
1090
+ {
1091
+ "paramValue": "contextArgs.elems",
1092
+ "paramValueObj": {
1093
+ "expType": "variableChain",
1094
+ "varType": "normal",
1095
+ "content": "contextArgs.elems"
1096
+ },
1097
+ "content": "contextArgs.elems"
1098
+ },
1099
+ {
1100
+ "paramValue": "false",
1101
+ "paramValueObj": {
1102
+ "expType": "boolean",
1103
+ "value": "false"
1104
+ },
1105
+ "content": "false"
1106
+ }
1107
+ ],
900
1108
  "expType": "functionCall",
901
- "varChain": "Time"
902
- },
903
- "content": "startTime=Time.Now()"
1109
+ "varChain": "fun"
1110
+ }
904
1111
  }
905
1112
  ]
1113
+ },
1114
+ {
1115
+ "type": "normal",
1116
+ "content": "Event.Void(freeUnlockedSize>=4)->AUTH_VIP1",
1117
+ "eventName": "Void",
1118
+ "eventParamList": [
1119
+ {
1120
+ "paramValue": "freeUnlockedSize>=4",
1121
+ "paramValueObj": {
1122
+ "expType": "expBooleanOpCompare",
1123
+ "var1": {
1124
+ "expType": "variableChain",
1125
+ "varType": "normal",
1126
+ "content": "freeUnlockedSize"
1127
+ },
1128
+ "var2": {
1129
+ "expType": "number",
1130
+ "value": "4"
1131
+ },
1132
+ "op": ">="
1133
+ },
1134
+ "content": "freeUnlockedSize>=4"
1135
+ }
1136
+ ],
1137
+ "toState": "AUTH_VIP1",
1138
+ "actions": []
906
1139
  }
907
1140
  ],
1141
+ "serviceStateSection": {
1142
+ "serviceState": "None"
1143
+ },
908
1144
  "stateContextArgs": [
909
- "limitTime",
910
- "debt"
1145
+ "elems"
911
1146
  ]
912
1147
  }
913
1148
  ]