Hi Guys, I have in my application two kinds of users that belongs to the sa

Hi Guys,
I have in my application two kinds of users that belongs to the same GROUP(OU-ABC):
1. Actived users (VISIBLE)
2. Deactived Users (NOT VISIBLE)

The problem is that i have a rule that assign tasks to users in the aplication using the internal Id created by default when a user is created in appian plataform. But the application is assigning tasks also to DEACTIVED USERS, is this behaviour correct ???

OriginalPostID-199817

OriginalPostID-199817

  Discussion posts and replies are publicly visible

Parents
  • Hi ederm,

    Adding to what was suggested by @siddharthg837 above, you should perform a check on the assignee before the task assignment.

    However, I have made some tweaks in the above code snippet.

    if(
    rule!Utils_CheckIsNull(
    ri!user
    ),
    null,
    if(
    isusernametaken(
    ri!user
    ),
              if(
              isuseractive(ri!user),
              "User is active",
               "User has been deactivated"
               ),
    "Invalid User"
    )
    )

    Using only isusernametaken() won't tell you if the user is an active user or deactivated user. Its because this function only tells if a user has ever been created in the system with the given username. It will even throw "true" for a deactivated user.

    There has to be an extra check after that using fn!isuseractive() which will tell if a user has been deactivated or not.
Reply
  • Hi ederm,

    Adding to what was suggested by @siddharthg837 above, you should perform a check on the assignee before the task assignment.

    However, I have made some tweaks in the above code snippet.

    if(
    rule!Utils_CheckIsNull(
    ri!user
    ),
    null,
    if(
    isusernametaken(
    ri!user
    ),
              if(
              isuseractive(ri!user),
              "User is active",
               "User has been deactivated"
               ),
    "Invalid User"
    )
    )

    Using only isusernametaken() won't tell you if the user is an active user or deactivated user. Its because this function only tells if a user has ever been created in the system with the given username. It will even throw "true" for a deactivated user.

    There has to be an extra check after that using fn!isuseractive() which will tell if a user has been deactivated or not.
Children
No Data