What is the difference between start process and sub process?

hi,

What is the difference between start process and sub process?

Thanks In Advance.

  Discussion posts and replies are publicly visible

  • Major difference, start process invokes the target process on a separate engine of Appian to Balance the load, hence we can't give guarantee, whenever we use start process, will immediately trigger the target process, whereas sub process gives you assurance of starting the child process immediately once after the flow hits this node.

  • 0
    Certified Lead Developer
    in reply to Shanmukha

    Hi Shanmukha,

    I'm experimenting with this as I was preparing some response for this same thread. :-D In Subprocess I construct a CDT and write into Database. I also make use of BVF Framework (App Market Link for this framework). Irrespective of whats happening in the sub process i assume starting a processes should be independent.

    Thanks,

    Arjun.

  • 0
    Certified Lead Developer

    One of the other key things that appears to be missing from this discussion is that start process does not allow you to return any of the pv's from the process that got started to the process that started it, or the form that started it.  You can't configure a start process to return the output of that process.  If you want data from it, it has to be a subprocess.

  • 0
    A Score Level 1
    in reply to arjunv489

    Hi Arjun,

    What is your sub process exactly contains. If something that can be easily achieved with sub process in the parent process model then why would you choose to call the same sub process with Start Process smart service? Just get an full idea and need to see the resources which are taking the considerations in the run time. 

    Thanks,

    Shanmukha

  • 0
    Certified Lead Developer

    I have observed something strange and would like to share and check if its happening for others as well.

    1. I have used a Start Process smart service from another parent process with close to 15 parameters passed. I currently see this coming up in Health Check Report  as a high peak average node in the process

    2. I have a similar parent process where the same process is called as a sub process, this time as a asynchronous sub process. The parameters and value remain the same. The volume of processes are similar. However this process doesn't seem to have a high peak average.

    Any Idea of why this could have possibly happened?

    Many Thanks,

    Arjun.

  • Start process is an action or step the system/user takes to start a new process and kick it off while a sub process is a process kicked off from another process that is a child of that original process.
  • 0
    Certified Lead Developer
    in reply to Aswini

    You can use start process in 2 ways:

    1. In process model using start process smart service, where you have have to select process model and it's respective parameters for its input.

    2. In interface or Web API using a!startProcess() function. It's a smart service function. You can use it under saveInto

    Hope I answered your question.

  • How we can use this start process smart service in interface and process model?
  • 0
    Certified Lead Developer
    Hi as per my understanding there are few major differences between start process and sub process as listed below:

    1. Using sub process, we can invoke a child process either synchronous or asynchronous as per our business requirement, whereas using start process, it always starts the target process asynchronous.

    2. Because of above behaviour, if you have multiple tasks configured in various processes or their child processes, and you want to have chaining between the tasks, you need to go for sub process (synchronous with activity chain), where as if there is no need of having chaining in between these tasks then, we can go for start process.

    3. An another use case: let's assume you have 2 tasks and the moment you submit task1, task2 should be visible due to chain, but before that we want some common operations to be perform (which is configured in a common process model), you need to go for sub process with synchronous approach, but if no dependency, they you can go for either sub process (asynchronous) or start process (recommend)

    4. Using sub process, adds readability to understand, which process has been invoked while debugging whereas in case of start process we need to search for target process using its UUID (if the process UUID gets change based on provided input).

    5. If we want to switch from one process to another along with its respective parameters, based on provided input, then it's preferable to go for start process instead of sub process

    5. If you want to invoke a process from an Interface or Web API in such case you have only one option i.e. startProcess

    6. And the most major difference, start process invokes the target process on a separate engine of Appian to Balance the load, hence we can't give guarantee, whenever we use start process, will immediately trigger the target process, whereas sub process gives you assurance of starting the child process immediately once after the flow hits this node.

    Hope this will help you in understanding various and major differences between start process and sub process