Best way to call process models in changing sequences

I would like to know if the following scenario is possible within Appian, and if so how to accomplish it efficiently:

I would like to establish a set of process models that each perform a certain function. 

I would like to make an interface that my users can use to create a template and order those process models however they like, then save that sequence for later use by themselves and others.

Finally, I would like those users to be able to run that sequence of process models on demand.

Is this possible, and what would be the best way to accomplish it without resorting to crafting a new master process model every time? 

  Discussion posts and replies are publicly visible

  • Whilst the community digest this and think of ways to approach it, what's the actual business use case here? I ask because it maybe that there are alternate approaches to the problem or, possibly, that it'[s not even a problem to solve e.g. it may not actually matter what order the processes are executed in and therefore it's not a problem that needs to be solved. But without the actual context it's hard to appraise. (btw - I can think of some options already but would need further information such as do all/any/none of the process models need to run synchronously for the user to interact with?)

  • Thanks for the quick response! As an example, please consider the simplified process of performing an employee review:

    Department A would like this sequence:

    1. Employee will receive a self-evaluation to complete
    2. A department specialist reviews average salaries for the employee's position and turns in a report
    3. The supervisor turns in an employee evaluation

    Department B would like the same tasks in order 2, 1, 3, Department C would like the same tasks in order 3, 1, 2 and Department D says all three can happen in parallel. Each task is independently completed by a process model - I'm looking for the best way to call them in a sequence (or in parallel) as dictated by the user. 

  • For me the example suggests that order doesn't really matter, but that all 3 need to be completed before the next step (which I presume is the actual Employee Review meeting)

    To answer the actual question: for a relatively trivial example like this you could implement a parent process that takes as input the order that the processes need to be run, and a gateway (XOR) that routes through to the next sub-process depending on a) the order and b) the completion of any previous sub-process. So you'd need something to determine the order, and something to track the current state.

    It might also be feasible to use a Decision Rule that takes a token that represents a process model and returns that model. You can then call the model using the Start Process smart service (it gets a bit hairy when each model has different rule inputs that you need to account for). You'd still need your parent model to know where in the sequence you are AND you need any given called model to tell the parent model that it has completed (tricky when it's called asynchronously, but not impossible - you could use process messaging to implement such a control)

  • To clarify for my understanding, you are suggesting that we could create a master process that will loop through and run sub processes included based on the input from a department (i.e., sequence) and requirements set by the user (i.e., don't start subprocess B until subprocess A has completed, or run A B C in parallel)? Now that you've explained that way I think this might suit us perfectly as each subprocess would have a chance to define and receive its own set of rule inputs.

    What would you suggest for the 'something' mechanism to determine the order and/or track the state? 


  • For both the running order and tracking the state I'd use a CDT as an array:

    • running order - you'd need to capture a token that represents a process (which you can then pass to the Decision Rule to return a handle to the process you want to run). It would also tag the selected process as requiring pre- or post- dependencies on other process models (or not, as required)
    • tracking the state - you'd need to simply track that a process has been started and/or completed, the state of which can be used to control the next process to be started. 

    ...but this is all "back of a beer mat" design...i.e. I haven't formally thought it through end-to-end so it may have gaps.