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
6 replies
Subscribers
6 subscribers
Views
2022 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
We are encountering an issue on getting the task availa ble of certaing group. I
rishub356
over 10 years ago
We are encountering an issue on getting the task availa ble of certaing group. In one user group, the members of that group have an action to get the next available task available for that group , clicking on that action, we make a query check the next unassigned task, assigne that to that user & then update DB but now the issue, tha is tasking place is when two users click on the same time. The same task is being fecthed b y both users. One user overwrite the other user in Appian but in DB, it is te foirst tat is tsill updated. So now, when user to whome , it is assigned in DB, see s that task in his name in DB, he/she tries to access it but as in Appian, the task is assigned to another user, they gets an error that requested task is not available. Can anyone suggest a solution for this please?
OriginalPostID-147706
OriginalPostID-147706
Discussion posts and replies are publicly visible
0
sikhivahans
over 10 years ago
@rishub356 Could you please throw some more light into the problem description by answering the following questions?
1. Are you using SAIL interface?
2. How are you making the query to check the next unassigned task?
3. How are you assigning the next task?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rishub356
over 10 years ago
We are using Action for that. We are using query actibeve tasks. We assigne thiat task to te person & update DB. This is a race condition issue.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 10 years ago
@rishub356 One more question please - Is the query made from database?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 10 years ago
Here goes one of the possible ways to overcome race condition if you are making a query on database:
To the best of my knowledge, if you do as follows, the race condition can be eliminated:
Instead of depending on database for checking the task status, depend on any one of the following options in order to check the status of the task:
1. getportalreportdatasubset (plugin)
2. queryProcessAnalytics function (OOTB)
3. Execute portal report OOTB smart service (OOTB)
Opting for any one of the options will get you the most recent data. For example, let's assume that a task is assigned to user. At the same time when some other user tries to get the same task and if you query the status of the task using process analytics data, within fraction of seconds you can get the updated data. (Where as in case of DB, you could observe some lag time between capturing the status, updating the same in database and querying the status in parallel in case of other users, which thereby leads to race condition.) Perform the database updates still if desired, but I would like to suggest to depend on process analytics for calculating the task availability.
Please do let me know if you have any follow up questions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rishub356
over 10 years ago
Thanks Sikhivahans. I am going for this approach today & will keep you updated on this thread.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 10 years ago
Great!! Any question is welcome.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel