Decision Object output calculated value

I need return the Decision output as a calculated value instead of a static value, is it possible to use variables and expression in Decision output?

E.g.:- based on certain condition I want to return Decision output as 10 % FeeAmount + Surcharge + Tax.

I have to execute these decision as part a another Process Model and use the Decision results in that process model, I can return a process model from decision but process models returned from Decision can only executed asynchronously and I can not use the Decision Process Model results in Parent Process Model.

If this is not possible with Decision Object, what is other alternatives we have with Appian?

I want to build rule engine where it takes inputs and based on certain conditions returns one or more calculated values

  Discussion posts and replies are publicly visible

Parents Reply Children
  • we can come up with few abstractions and statically execute the abstraction based on client type with super set of parameters. 

    when a new client is added we may need to add additional abstraction and update process model to accommodate the new abstraction.

  • It's possible you may be able to design this in such a way as to avoid having to ever make changes to the process model. An Expression rule can take arrays as parameters, and each parameter instance could be a list in its own right. So you could pass in a list that maybe looks something like this:

    {
        {name: "feeAmount", value: 100, type: "seed"},
        {name: "feeAmountPercentage", value: 10, type: "percentage"},
        {name: "surcharge", value: 50, type: "addend"},
        {name: "tax", value: "150", type: "addend"}
      }

    and use the fn!reduce() and write a rule that you use in the reduce that applies each value as instructed e.g. if your rule sees that type is "seed" it simply echoes back that value as the running total, if it sees the type is 'percentage' it applies the percentage to the running total, if it sees the type is 'addend;' it then adds the value to the running total. You'd have to take care to only ever have the "seed" as the first item in your list, and your calculation would be applied in strict sequence order NOT in the purist BODMAS order of evaluation.

  • You could also combine the functionality of decisions and expression rules. For example, you could create a decision that returns the expected fee amount, percentage, surcharge, and tax as an array of outputs. Then, create an expression rule which takes result of the decision and performs the calculation. Then, you get the best of both worlds: the ease of use of the decision and the flexibility of the expression.