@simitgroup/simpleapp-generator 2.0.3-e-alpha → 2.0.3-g-alpha
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.
- package/ReleaseNote.md +7 -0
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +5 -10
- package/dist/generate.js.map +1 -1
- package/package.json +1 -1
- package/src/generate.ts +5 -11
- package/templates/nest/src/app.service.ts.eta +1 -5
- package/templates/nest/src/simple-app/_core/features/mini-app/mini-app-manager/mini-app-manager-policy.service.ts.eta +2 -2
- package/templates/nest/src/simple-app/_core/features/policy/policy.service.ts.eta +3 -4
- package/templates/nest/src/simple-app/_core/features/user-context/user.context.ts.eta +0 -7
- package/templates/nest/src/simple-app/_core/framework/base/simple-app.service.ts.eta +0 -4
- package/templates/nest/src/simple-app/_core/framework/schemas/simple-app.schema.ts.eta +0 -1
- package/templates/nuxt/composables/date.generate.ts.eta +18 -17
- package/templates/nuxt/composables/getOpenApi.generate.ts.eta +11 -26
- package/templates/nuxt/types/index.ts._eta +0 -1
- package/templates/nuxt/types/schema.ts.eta +12 -11
- package/README copy.md +0 -1283
- package/src/processors/bpmnbuilder.ts +0 -167
- package/templates/nest/src/simple-app/config/license-types/index.ts._eta +0 -1
- package/templates/nuxt/components/header/button/task/HeaderButtonTaskItem.vue.eta +0 -28
- package/templates/nuxt/components/header/button/task/HeaderButtonTaskList.vue._eta +0 -114
- package/templates/nuxt/components/workflow/forms/dynamicfield.vue._eta +0 -92
- package/templates/nuxt/components/workflow/forms/index.ts._eta +0 -17
- package/templates/nuxt/components/workflow/forms/simpleapprove.vue._eta +0 -49
- package/templates/nuxt/composables/workflow.generate.ts.eta +0 -27
- package/templates/nuxt/simpleapp/workflows/bpmn/readme.md._eta +0 -1
- package/templates/nuxt/simpleapp/workflows/forms/index.ts._eta +0 -8
- package/templates/nuxt/simpleapp/workflows/forms/readme.md._eta +0 -1
- package/templates/nuxt/simpleapp/workflows/forms/simpleapprove.jsonschema.ts._eta +0 -14
- package/templates/nuxt/types/workflow.ts.eta +0 -25
- package/templates/project/workflows/bpmn/sayhello.bpmn._eta +0 -42
- package/templates/project/workflows/forms/index.ts._eta +0 -2
- package/templates/project/workflows/forms/simpleapprove.jsonschema.ts._eta +0 -8
- package/templates/workflow/next/listener.ts.eta +0 -79
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by simpleapp generator.
|
|
3
|
-
* --remove-this-line-to-prevent-override--
|
|
4
|
-
* last change 2023-09-23
|
|
5
|
-
* Author: Ks Tan
|
|
6
|
-
*/
|
|
7
|
-
import { Injectable,Logger } from "@nestjs/common";
|
|
8
|
-
import { EventEmitter2, OnEvent } from '@nestjs/event-emitter';
|
|
9
|
-
import { InjectModel } from "@nestjs/mongoose";
|
|
10
|
-
import { Model } from "mongoose";
|
|
11
|
-
import { UserContext } from "../../generate/commons/user.context";
|
|
12
|
-
import { User } from "../../services/user.service";
|
|
13
|
-
import { Permission } from "../../services/perm.service";
|
|
14
|
-
import {SimpleAppListenerService} from './simpleapp.listener'
|
|
15
|
-
import {
|
|
16
|
-
WorkflowSettingApiSchema,
|
|
17
|
-
WorkflowDataApiSchema,
|
|
18
|
-
WorkflowProcess,
|
|
19
|
-
WorkflowTask,
|
|
20
|
-
UserTaskActors,
|
|
21
|
-
UserTaskType,
|
|
22
|
-
ServiceTaskData,
|
|
23
|
-
UserTaskData,
|
|
24
|
-
UserTaskEventType,
|
|
25
|
-
ServiceTaskEventType
|
|
26
|
-
} from '../../generate/workflow/workflow.type';
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
@Injectable()
|
|
30
|
-
export class <%=it.processName%>ListenerService extends SimpleAppListenerService{
|
|
31
|
-
logger = new Logger()
|
|
32
|
-
constructor(){
|
|
33
|
-
super()
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
<%for(let i=0; i<it.elements.length;i++){%>
|
|
37
|
-
<%let e=it.elements[i]%>
|
|
38
|
-
<%let datatype = e.type == "bpmn:UserTask" ? "UserTaskData" : "ServiceTaskData" %>
|
|
39
|
-
|
|
40
|
-
<%if(datatype=='UserTaskData'){%>
|
|
41
|
-
/**
|
|
42
|
-
* Execute while user task <%= e.name%> invoked (triggered by actor to next step)
|
|
43
|
-
* bpmn: <%=it.name%>, elementId: <%= e.id%>, taskName: <%= e.name%>, event: invoke
|
|
44
|
-
* documentation: <%~e.documentation%>
|
|
45
|
-
* @param appuser:UserContext
|
|
46
|
-
* @param props
|
|
47
|
-
*/
|
|
48
|
-
@OnEvent('<%=it.name%>.<%= e.id%>.invoke')
|
|
49
|
-
async <%=`watch_${e.id}_invoke`%>(appuser:UserContext,props:<%=datatype%>){
|
|
50
|
-
console.log("Running listener <%=it.name%>.<%= e.id%>.invoke",props)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Execute while user task <%= e.name%> reach wait stage (pending actor input)
|
|
55
|
-
* bpmn: <%=it.name%>, elementId: <%= e.id%>, taskName: <%= e.name%>, event: wait
|
|
56
|
-
* documentation: <%= e.documentation %>
|
|
57
|
-
* @param appuser:UserContext
|
|
58
|
-
* @param props
|
|
59
|
-
*/
|
|
60
|
-
@OnEvent('<%=it.name%>.<%= e.id%>.wait')
|
|
61
|
-
async <%=`watch_${e.id}_wait`%>(appuser:UserContext,props:<%=datatype%>){
|
|
62
|
-
console.log("Running listener <%=it.name%>.<%= e.id%>.wait",props)
|
|
63
|
-
}
|
|
64
|
-
<%}else if( datatype=='ServiceTaskData'){ %>
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Execute ServiceTask event <%= e.name%> (start)
|
|
68
|
-
* bpmn: <%=it.name%>, elementId: <%= e.id%>, taskName: <%= e.name%>, event: start
|
|
69
|
-
* documentation: <%=e.documentation%>
|
|
70
|
-
* @param appuser:UserContext
|
|
71
|
-
* @param props
|
|
72
|
-
*/
|
|
73
|
-
@OnEvent('<%=it.name%>.<%= e.id%>.start')
|
|
74
|
-
async <%=`watch_${e.id}_start`%>(appuser:UserContext,props:<%=datatype%>){
|
|
75
|
-
console.log("Running listener <%=it.name%>.<%= e.id%>.start",props)
|
|
76
|
-
}
|
|
77
|
-
<%}%>
|
|
78
|
-
<%}%>
|
|
79
|
-
}
|