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
4 replies
Subscribers
5 subscribers
Views
1770 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Hi, I'm creating a servlet that's using the following method to get the
nickw
over 9 years ago
Hi, I'm creating a servlet that's using the following method to get the first task ID from an array of task ids, where the task status is NOT accepted. For some reason, every time I activate the servlet, I'm seeing the same task ID being returned by the method. I'm including both the code and the logging info I have below. Does anyone have any idea why this may not be working?
Log:
19:08:05,574 INFO [stdout] (ajp-/0.0.0.0:8009-33) 2015-03-18 19:08:05,574 [ajp-/0.0.0.0:8009-33] ERROR com.snl.appian.servlets.rapidaccept.RapidAccept - Adding User Context to Task Report: nickw
19:08:05,747 INFO [stdout] (ajp-/0.0.0.0:8009-33) 2015-03-18 19:08:05,747 [ajp-/0.0.0.0:8009-33] ERROR com.snl.appian.servlets.rapidaccept.RapidAccept - Finding first unaccepted task with status 1...
19:08:05,752 INFO [stdout] (ajp-/0.0.0.0:8009-33) 2015-03-18 19:08:05,752 [ajp-/0.0.0.0:8009-33] ERROR com.snl.appian.servlets.rapidaccept.RapidAccept - Status {1} for task id:537139...
OriginalPostID-142017
OriginalPostID-142017
Discussion posts and replies are publicly visible
Parents
0
nickw
over 9 years ago
...629
19:08:05,752 INFO [stdout] (ajp-/0.0.0.0:8009-33) 2015-03-18 19:08:05,752 [ajp-/0.0.0.0:8009-33] ERROR com.snl.appian.servlets.rapidaccept.RapidAccept - Attempting to accept task id 537139629for user nickw
19:08:05,754 INFO [stdout] (ajp-/0.0.0.0:8009-33) 2015-03-18 19:08:05,754 [ajp-/0.0.0.0:8009-33] ERROR com.snl.appian.servlets.rapidaccept.RapidAccept - Task ID 537139629 accepted for user nickw
private Long GetFirstUnacceptedTask(ProcessExecutionService pes, Long[] taskIds) throws InvalidActivityException, PrivilegeException
{
debugLog("Finding first unaccepted task with status " + TaskSummary.TASK_STATUS_ACCEPTED + "...");
for (Long ID : taskIds)
{
TaskDetails details = pes.getTaskDetails(ID);
Integer status = details.getStatus();
debugLog("Status {" + status + "} for task id:" + ID);
// Check if the task has been accepted
if (status != TaskSummary.TASK_STATUS_ACCEPTED)
{
// If not, return this task id...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
nickw
over 9 years ago
...629
19:08:05,752 INFO [stdout] (ajp-/0.0.0.0:8009-33) 2015-03-18 19:08:05,752 [ajp-/0.0.0.0:8009-33] ERROR com.snl.appian.servlets.rapidaccept.RapidAccept - Attempting to accept task id 537139629for user nickw
19:08:05,754 INFO [stdout] (ajp-/0.0.0.0:8009-33) 2015-03-18 19:08:05,754 [ajp-/0.0.0.0:8009-33] ERROR com.snl.appian.servlets.rapidaccept.RapidAccept - Task ID 537139629 accepted for user nickw
private Long GetFirstUnacceptedTask(ProcessExecutionService pes, Long[] taskIds) throws InvalidActivityException, PrivilegeException
{
debugLog("Finding first unaccepted task with status " + TaskSummary.TASK_STATUS_ACCEPTED + "...");
for (Long ID : taskIds)
{
TaskDetails details = pes.getTaskDetails(ID);
Integer status = details.getStatus();
debugLog("Status {" + status + "} for task id:" + ID);
// Check if the task has been accepted
if (status != TaskSummary.TASK_STATUS_ACCEPTED)
{
// If not, return this task id...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data