How to queries all the assignments from the repository?

纵饮孤独 提交于 2019-12-13 07:24:28

问题


My environment:

Alfresco Share v5.2.d (r134641-b15, Aikau 1.0.101.3, Spring Surf 5.2.d, Spring WebScripts 6.13, Freemarker 2.3.20-alfresco-patched, Rhino 1.7R4-alfresco-patched, Yui 2.9.0-alfresco-20141223)

Alfresco Community v5.2.0 (r134428-b13) schema 10005

When I start the workflow, I can assign executors - the list of users who will participate in the business process. Somehow I need to get a list of all those users.

There is an excellent guide, which shows how to use Lucene to get a list of whitepapers.

To interact with repository through REST I'm also use the Web Script Framework MVC.

But how can I get the list of assignments?..

I'm interested in how to look like the query in this case:

...
var assignments = search.luceneSearch("what should be here?");
...

回答1:


If you want to know who is assigned to a specific running Workflow instance, then I don't think you can easily do that via the search service. Instead, you want to be using the Alfresco WorkflowService to get that.

Most likely you'll want to grab the WorkflowInstance for the specific running workflow, grab the tasks, and check from the properties on that.

If you look at WorkflowPermissionInterceptor from the Alfresco source tree, you'll see pretty much the logic you want, covering both individual assignees and group assignments.



来源:https://stackoverflow.com/questions/42745913/how-to-queries-all-the-assignments-from-the-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!