Replies: 10 comments 15 replies
-
Thank you for your great contribution, this looks very good. I am working on a new API still under development, can release soon that will help you alot below is an example of calls:
Your feedback on the above example is highly appreciated BTW, in your call of |
Beta Was this translation helpful? Give feedback.
-
thanks reply, i mean so far any reference of upload bpmn file? Is it I put the file in defination folder it will auto generate new model, or i need to read file content then run I saw there is svg property too, I shall update manually in model collection? thanks |
Beta Was this translation helpful? Give feedback.
-
auto generate uses the async saveModel(name, source,svg) |
Beta Was this translation helpful? Give feedback.
-
Can you please share a sample project for nestJs, OpenAPI and swagger |
Beta Was this translation helpful? Give feedback.
-
Will do, also will write setup documentation for you |
Beta Was this translation helpful? Give feedback.
-
you may refer minimal example here: |
Beta Was this translation helpful? Give feedback.
-
since you will integrate with nestjs at next release, i think it is better i wait your latest release, Im worry it will have huge impact. By the way, I have more complex working example with:
if you need help in nestjs kindly let me know, we can create discord channel for this project, good for public discussion. since this project community not only 1-2 person now |
Beta Was this translation helpful? Give feedback.
-
As you see from sample code above, the new API requires users identification, there two types of Requests: User Initiated CallsNextJs need to pass the let api = new APIClient(server, { userId: 'user1', userGroups:['Owner','Others'], tenantId: tenant });
ap.engine.start(....);
System Initiated Calls
api = new APIClient(server, APIUser.SystemUser());
api.engine.invoke(...);
Alternatively: api.setUser({ userId: 'user1', userGroups:['Owner','Others'], tenantId: tenant }); |
Beta Was this translation helpful? Give feedback.
-
For (4), i think we have to further polish the ideal: Assume below is the getPendingWorkflow : async getPendingWorkflows(appuser: UserContext,) {
const tmp:any[] = await this.bpmnServer.dataStore.findItems({
'items.status':'wait',
})
} According observation of this project, I notice there is multiple stages of process user task:
[2. search task by specific user]
const pendingItems = await this.bpmnServer.getPendingUserTasks(props) [3. invoke specific user task]
response = await server.engine.invoke({id: response.id , "items.elementId": 'task_Buy' },{},'user1'); [4. end of user task]
|
Beta Was this translation helpful? Give feedback.
-
Not sure but let me try this:
As for findItems in next release: let pending = await bpmnAPI.data.findItems({ "items.status": 'wait', "items.type": 'bpmn:UserTask' }, user); We can easily add another method instead: let pending = await bpmnAPI.data.getPendingTasks({}, user); will return all pending tasks that the user is AUTHORIZED TO SEE let pending = await bpmnAPI.data.getPendingTasks({'items.assignee':user.userName},user); or you can use filter for the items to check |
Beta Was this translation helpful? Give feedback.
-
So far I'd tested integrate with nestjs and using openapi. it work smoothly, below is example of controller, service class, and swagger-ui result, it work as expected!
I'm curious so far any documentation of upload bpmn file? I don't know the process of upload file until the engine support the new definition.
Beta Was this translation helpful? Give feedback.
All reactions