07-10-2018 03:35 AM
Hello,
I've created a form that contains a field of type "People" that enables users to pick another user. Now I'd like to set the picked user as the assignee of the next step, how can I do that ?
I'm using Activiti 6.0
I've run into other threads that mention XML parts of code, but I'm not sure where I should input that.
07-11-2018 08:47 AM
There seems to be a issue with the people field (submitted value is null). However you can use a text field to enter the assignee id that can be used as the assignee of the next task. I've attached an example app here.
07-11-2018 08:47 AM
07-11-2018 09:33 AM
I've come to the same conclusion. I've then replaced it by a drop down and set the variable in the assignee field, and it works just fine
Another thing that doesn't seem to work is the file upload field, it's possible to upload a file, but not to display it in the following forms. Any idea about how to retrieve the url of the file or to let next users access it ?
07-11-2018 10:27 AM
Displaying uploaded file isn't something that was implemented in community version.
07-11-2018 12:59 PM
Thanks for the tip !
I know it's not related to the original topic, but I have a few questions about Acitiviti, do you mind if I ask them here?
Thank you for your help
07-12-2018 06:07 AM
Each one of the above requires a separate topic I'll try to reply here
1) You can use the native query API Activiti User Guide to execute custom queries or write custom mappers if you want Activiti User Guide.
2) You can attach a boundary event Activiti User Guide to a user task that can execute a mail task for example to send a reminder.
3) You'll have to write custom code for that.
I hope these answer your questions.
07-13-2018 09:43 AM
thanks, that answers my questions.
Regarding API, there seems to be a bug or something undocumented.
I create an instance using the function POST /activiti-rest/service/runtime/process-instances
an instance is created and its process-instance-id is returned.
Now, I want to complete the first step of the freshly created instance.
I've found : POST /activiti-rest/service/runtime/tasks/task-id (+ action name in the body) should do the job
and it indeed works fine, provided I know the task-id of the task to complete, however the task-id is not returned when the instance is created,and is nowhere to be found.
I've tried GET /activiti-rest/service/runtime/process-instances/process-instance-id which only contains process related stuff and GET /activiti-rest/service/runtime/process-instances/process-instance-id/tasks which I expected to return the list of tasks but returned 404.
How should I proceed ? Is there maybe a trick to create an instance and complete the task at the same time ?
07-13-2018 10:02 AM
To get tasks you need to use the Tasks Rest endpoints. See https://www.activiti.org/userguide/#_tasks you can filter the results by processInstnaceId.
Please open a new topic if you want to discuss something unrelated to the original post.
07-14-2018 11:23 AM
Sure will !
Just for the record, your solution works; however, it doesn't look like a very elegant way to accomplish it, even though it's the only way.
thanks
Explore our Alfresco products with the links below. Use labels to filter content by product module.