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
5 replies
Subscribers
9 subscribers
Views
3914 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Completing a list of taskids using loop
redae
over 8 years ago
Hi,
Inside saveInto of my sail form - Is it possible to call a!completeTask within an apply loop ?
apply( a!completeTask , listOfTasksIds , {}, {}, {})
I have the following error when I try to :
An error occurred while executing a save: java.lang.IllegalStateException: Non-Save Reactions should be unwrapped individually and not processed as a list
Cheers
OriginalPostID-258540
Discussion posts and replies are publicly visible
Parents
0
Raviteja Varma Jampana
A Score Level 2
over 8 years ago
We can evaluate Smart Service Functions on success/failure of Smart Service Functions. So building an expression or recursive rule with proper exit conditions which result a structure like this would work.
a!completeTask(
taskId: taskId[1],
onSuccess: {
.../*recursive*/a!completeTask(
taskId: taskId[2],
onSuccess: {/*So On*/}
)
}
)
However this is not advisable as it is going to take more time and recursion may cause chaos sometimes. As others suggested best solution will be start an asynchronous process which takes multiple task Ids as input and cancel them all.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Raviteja Varma Jampana
A Score Level 2
over 8 years ago
We can evaluate Smart Service Functions on success/failure of Smart Service Functions. So building an expression or recursive rule with proper exit conditions which result a structure like this would work.
a!completeTask(
taskId: taskId[1],
onSuccess: {
.../*recursive*/a!completeTask(
taskId: taskId[2],
onSuccess: {/*So On*/}
)
}
)
However this is not advisable as it is going to take more time and recursion may cause chaos sometimes. As others suggested best solution will be start an asynchronous process which takes multiple task Ids as input and cancel them all.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data