Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
9 subscribers
Views
2401 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi Guys, I have in my application two kinds of users that belongs to the sa
ederm160
over 9 years ago
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
0
Durgesh
A Score Level 2
over 9 years ago
Active & Deactive users is the core functionality of Appian. User can be deactivated and re-activated in the system. AFAIK deactivated user can not login to the accound, also no task can be assigned.
Are you concerned about this in-built functionality?
Could you elaborate more about the requirement?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ederm160
over 9 years ago
All appian users has an in internal id, and my application mecanism of assigning tasks is based on users internal id. But unfortunatelly Deactivated users are also receiving tasks and i don´t know why!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
siddharthg837
over 9 years ago
This is one of the common scenario wherein the deactivated/invalid users needs to be handled.
How are you managing the users to whom tasks are getting assigned ?
Essentially before the task gets assigned the system should be checking weather th the user is an active/valid user or not. If yes its only then the task gets assigned - else for inactive users your exception workflow gets triggered wherein you do the required business logic as required.
The expression to check the valid users looks something like:
= if(
rule!Utils_CheckIsNull(
ri!user
),
null,
if(
IsUsernameTaken(
ri!user
),
user(
ri!user,
"firstName"
) & " " & user(
ri!user,
"lastName"
),
ri!user
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ederm160
over 9 years ago
siddharthg837 it means that i have manage the assignment of tasks into users by coding. I thought it is done by the plataform itself. Thanks for the help!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shailendras593
over 9 years ago
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.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ederm160
over 9 years ago
Hi shailendras593, i'm very glade and thankful for your answer!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ederm160
over 9 years ago
Hi shailendras593, i very glade and thankful for your answer!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel