Designing Long Running Tasks

There are business processes out there which can take a very long time to complete. Think of claims management in an insurance company. When there is an ongoing law suite, this can take months or even years. But still, there are tasks in this process which need to be assigned, tracked and completed.

Translating this into a process driven application in Appian leads us to an important design decision:

“How do we deal with tasks that take a long time to complete?”

The Challenge

The most simple approach is, to just assign that task.

The first issue is, that you now have an active task in the users task list, which he cannot complete. This is a bad user experience. The user should only see the tasks he can actually work on.

But, there are two more technical issues with this implementation.

Second, this process takes up system memory for no purpose. Not a big problem for a small number of processes, but this will not scale.

Third, we cannot change the logic in that process for any already active instance. This becomes a problem over time when the business department develops new ideas..

The Solution

Some people say: “Why should I bother with Appian tasks! Let’s rebuild this in the database!”

While there are certain scenarios which might require such a radical approach, I advocate for staying with the Appian standard features as long as possible. They are easy to use and proven to work.

In this specific case, I suggest to go a hybrid way.

I, as a user of that application, love to be able to plan my work. What do I do now, what do I do tomorrow, and what needs to wait for some external event. When I open a task and decide that I cannot do anything with it for 3 months, I want to turn it into a follow-up which reminds me of itself in 90 days from now.

Do you know the self organization method Getting-Things-Done?

Great idea, let’s see how that works.

That’s the modification in the process model. The user interface requires some changes as well. Add an option to allow the user to decide about a follow up and the waiting period. Once the user opted for the follow-up, persists all required data to the database and create a follow-up item like this:

  • id
  • createdAt
  • createdBy
  • remindAt
  • caseId
  • processModelId

Next, create a process model which checks this database table for due items every day. This model will then dynamically start the process model identified by the processModelId and pass the data of the follow-up. Then change the main model once again.

You now have a model that reacts a bit differently on whether it is started initially or from a follow-up. That task can then have a normal tight deadline, but allows the user to turn it back into a follow-up as needed.

Display waiting follow-ups on the case record dashboard. And allow the user to trigger this follow-up manually in case that external event happens earlier than expected. This can be done using a record action tied to the follow-up record. Keep in mind to disable that follow-up in this case.

Summary

This is just a description of an implementation pattern. Please adjust the details to your specific requirements.

I implemented it successfully many times. It combines the power of Appian’s task management with the requirement for long running business processes in a perfect way and is easy to implement.

6 thoughts on “Designing Long Running Tasks”

  1. Hi Stefan ,
    This required user has to open the assigned task and then select follow up yes or no . The user has to open each and every task in the queue and then select follow up-yes or no as needed.
    Is this correct?
    Also how this can be achieved via database approach?

    1. Hi Jordan, correct, the user will have to open that task and make a clear decision about how to proceed. The data required to make this work is persisted in the database.

  2. Stefan has always been a great contributor to the Appian community! Cheers, for a simple explanation on a very important topic!!

  3. Great article. In a previous project, we adopted a DB-task based architecture with milestones and activity history persisted in business tables, mainly because the client had strong requirements around auditability, SLA tracking, productivity metrics, and long-term reporting.

    My main concern with a follow-up/user-task approach is what happens years later when business stakeholders ask questions like: “Who completed the most tasks within SLA?”, “Which activities had the highest delays?”, “How many times was a task reassigned?”, or “What was the full lifecycle of a case?” after process instances have been archived.

    In our experience, answering those questions usually requires persisting task metadata and history, such as assignment changes, timestamps, SLA events, completion details, and user actions. Do you persist this information outside the process engine? If so, what does your data model look like? Do you maintain dedicated task-history tables, or do you enrich the business entities themselves with operational metadata?

    We’ve considered a hybrid approach, persisting task history and operational metrics in business tables while still leveraging Appian tasks where they make sense. However, I’m concerned about the additional maintenance complexity, duplication of responsibility between process data and business data, and the challenge of building a complete reporting layer across both sources.

    How would you approach audit, SLA analytics, task metadata management, and long-term operational reporting in this architecture? At what point would you recommend moving toward a more data-centric task model rather than relying primarily on Appian user tasks?

    My concern is that once we start persisting enough task metadata to support enterprise-grade auditability and reporting, we may end up recreating a task-management layer in the database anyway. I’m curious where you draw that line in practice.

    1. Thank you very much for your insights. I think that task operations and task reporting are two different things. Any long-term reporting data should be stored in the database. Clear separation of concerns.

Leave a Reply