Activity Chaining

I've been told that ubiquitous activity chaining is a bad practice, but why is this the case? It seems to me that there are applications where activity chaining is necessary end to end, and indeed I've seen such applications function just fine.

Is it a performance concern, or more a contrast with clean code philosophy?

 

Thanks

  Discussion posts and replies are publicly visible

  • For the most part i'm with you on that - and conscientious activity chaining is 100% necessary for a friendly UX within any given process flow. The main reasoning I've heard for not using ALL activity chaining (like, at least allowing chaining to break for asynchronous side-flows where chaining doesn't directly help), is that chained process flows take the highest priority within the execution engine(s) and therefore potentially have negative performance impact on other users if used too much. I've never directly observed this, though.
  • Certified Lead Developer
    Using activity chaining in excess uses up system resources and memory. You may not notice this in a dev environment, but you should always try to build your processes to be as efficient as possible. Activity chaining should not be used for utility processes that do not have forms the user needs to fill out. It should also never be used after the last User Input task on a process because it is not necessary after that point. If your process has lots of looping or large numbers of nodes in-between forms then maybe consider redesigning your process to use a SAIL wizard instead.
    One common misconception I've heard is that activity chaining makes processes faster; it doesn't. I've used activity chaining all the time on my projects. As long as you use it correctly it shouldn't be a problem.

    The activity chaining section of this link is a good read.
    docs.appian.com/.../Process_Model_Recipes.html
  • It should also never be used after the last User Input task on a process because it is not necessary after that point.

    For what it's worth, I've experienced multiple use cases where this is outright incorrect.  The most obvious/important such use case, off the top of my head, is a Related Action on a record where the related action causes changes to the DB which affect the information shown on the record dashboard in question. 

    Sometimes you might notice that completing such a related action and returning to the record dashboard, you need to refresh the page once or twice before the updated information is displayed.  If activity chaining is used after the user input task (perhaps only as far as the write to data store node(s)), this issue is mitigated quite well. 

    I'm of the opinion that designers should not be made to feel worried or guilty about using activity chaining when it is necessary for the UX - as long as they don't use it in places where it's not necessary like the other examples you've noted.

  • Judicious activity chaining is not a bad practice and virtually every Appian project uses it in some way. Excess activity chaining is a bad practice, as chained nodes will be prioritized needlessly.
  • Certified Associate Developer

    Thanks for the responses everyone!

  • Certified Senior Developer
    in reply to Mike Schmitt

    Why do we need to break activity chaining if process is asynchronous can you please help me to understand that and I have a question why we use long activity chaining so I am not clear when to use it and when not to use or we canbreak it from between or not

  • Certified Lead Developer
    in reply to jignesht0001

    That is simple. Just do NOT use chaining, except you have a specific need for it. The reason is, that any chained node runs with the highest possible priority in the process execution engines. And this leads to performance issues on the platform.

    Just out of my mind, the situations where your need chaining are:

    - Make the UI refresh only after a specific node in the process

    - Make a web API response wait for a specific node in the process

  • Certified Senior Developer
    in reply to Stefan Helzle

    Okay got the idea about it now thank you so much Stefan.

    One more question In my process there is some subprocess and start process which are async so I heard that we should be having activity chaining for async process so I want to know the main reason for it and as the process is continuously having activity chaining till end so can we break activity chaining where process is async or change the flow can you please tell me about this.

    Thanks in Advance

  • Certified Lead Developer
    in reply to jignesht0001

    I cannot say why others recommend to enable chaining for certain situations, without knowing any details.