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
6 subscribers
Views
4050 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Hi all, I'm having a tricky issue with a Terminate event at a par
Mike Schmitt
Certified Lead Developer
over 8 years ago
Hi all,
I'm having a tricky issue with a Terminate event at a parent process. Basically the set up is this: a parent process simultaneously launches a user task and a subprocess containing timers and stuff. If the user completes their task in a timely fashion, a Terminate node is hit, which is intended to also terminate the subprocess (which is called synchronously if it was a question). Instead we have a situation where the subprocess stays alive for some reason and continues to fire timer events long after the parent process was closed, which is confusing to users.
As an attempted remedy I added a byReference boolean that will signal the subprocess to end - the subprocess then hits a non-terminate end node. But now what's happening is the parent process chains to the Terminate node, and then the subprocess hits its end node too, causing 2 flows to exit to the higher process flow, which just makes a bigger mess. ...
OriginalPostID-222472
OriginalPostID-222472
Discussion posts and replies are publicly visible
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
... The root of the issue still seems to be that the Terminate isn't actually terminating the subprocess for some reason. Has anyone else seen this? I figure I might be just missing something, but I can't figure out what. We're on 16.1.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Matthew Kornfield
Appian Employee
over 8 years ago
Mike, I have seen timers fire after processes are completed, which seems to be the case if you are running the subprocess synchronously. You might want to set a flag right before you terminate the process, and have the timer lead to an XOR. If the flag is satisfied (i.e. the process has already ended), then go to a terminate/ end node. Otherwise execute the normal exception flow. If that does not help, would you be able to show screenshots of the flow?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
The weird part is, the subprocess contains not only a timer node (which would usually fire a few days after the terminate comes in, and always fires in the very early morning), but also a few rule listener nodes, etc. Any time I try to reproduce this issue in our Dev environment, either by naturally running through the parent process flow or by manually kicking off the Terminate node in the parent, the child process terminates correctly; but in Production I keep finding instances where the parent obviously hit the Terminate node but the child process was seemingly unaffected.
I'll look into screenshots - it may need to be stripped down a bit first though.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
normanc
over 8 years ago
We've seen the same problem with syncronous sub processes not terminating. The fix was to remove activity chaining into the terminate nodes (at both levels).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Schmitt
Certified Lead Developer
over 8 years ago
Thanks. In my case it sorta has to chain, so basically I added an extra attended task as a "confirmation" to pause for an extra moment while the subprocess closes so that there aren't two end nodes firing nearly simultaneously which for all I can tell is what was happening.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel