Hi all,
for a testapplication i need to create users. My application is just for a universitytask. Since i´m new to camunda developement there could be a better way to solve my problem. Feel free to show me other ways but i´m very restricted altering the process. The following is my approach.
Process:
The Process starts through an incoming request(form). An ServiceTask now matches the request with service providers that provide the certain service and returns a LinkedList of posible providers as a variable. The next Service Task starts Process Instances of another Process called “Apply-Process”. Each Process Instance is delegated to a certain service Provider using the LinkedList*.
*I don´t think it´s possible to delegate a Process instance to a User. But it should be possible to start the process -> get the ProcessInstance -> call the taskservice -> get a certain task -> forward it to a certrain user
Problem:
As i said, this process is a Demo and it should run on any device that starts it. I will reinject data(for example service provider data into a database) everytime the service is started as a hard reset.
- To do it consistently i also want to create the users every time i start the engine.
- I need to bind a task in another ProcessInstance not knowning its ID to a User that has to be created while running the Process.
Approach: Use IdentityService.newUser("serviceProvider##")
& save to create users.
Use IdentityService.newGroup("serviceProviders")
to create group.
Use IdentityService.createMembership("serviceProvider##", "serviceProviders")
to append user to the group
Use processEngine()
, ProcessInstance
and taskService
to glue a user to a task
is this right? is it enough?
Thanks for help.