How to get role tasks of the current user in API

d_farouk
edited June 3, 2020 in AppWorks #1
Hello,
Is there a way to get role tasks of the current user in api ? and how ?
given user id.

Comments

  • What are you trying to accomplish? Take a look at "Defining lists on a tasks child entity" in the AppWorks Platform 20.2 Low-Code Design Guide for information around this.
  • That pretty works for me .. Thank you,
    I was trying to filter and retrieve role's tasks
  • d_farouk
    edited June 6, 2020 #4
    What are you trying to accomplish? Take a look at "Defining lists on a tasks child entity" in the AppWorks Platform 20.2 Low-Code Design Guide for information around this.
    I run into small problem when defining a list for the Tasks entity, I'd like to hide this list for certain roles, so i added security building block to the Tasks entity. I gave one role the permissions to claim and complete tasks. Now this role can now claim/complete all the lifecycle tasks even if he's not the assignee role, how to fix.

    Thanks,
  • Disable the Complete Task, Claim Task, Delegate, etc. actions for all roles in the Security building block. That permission should be granted by the assignment in the Activity itself.
  • But this removes the task actions from the action bar, I found another workaround, to add security condition on these actions:
    item.Task.TaskTarget in targetRoles()

    Thanks,