write many times to database

Hi everyone,

I have a question related to write to data store entity many times inside a process model, I am new at Appian and I start to build a process model for a complex issue.

in my application there is a submit form and a  5 reviewers who should accept or reject the submitted form,  the reviewers should be in a specific order.

for example : 

rev1 -> rev2->rev3->rev4-.rev5  as shown below:


each time a reviewer click approve or reject i want to write to data store so that the next reviewer can view the previous reviewer decision and the related info.

is there a best way to use less "Write to data store Entity" in my process model or using so mush to data store affect the process?

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    You could take a single chunk, such as for the first reviewer, save that as a process model, and then call it 4 times.  Another thing you could try, if you are brave and daring, is to put an XOR at the end, one fork which leads to terminate, the other leads to subprocess node.  If it's the last reviewer, terminate process.  Otherwise, asynchronously call the same PM with the next reviewer.  Yes, process models can call themselves as a subprocess.  By doing it asynchronous, the process for the first reviewer, the second reviewer, and the third are already dead and waiting to be archived by the time the fourth reviewer gets the task.  So the amount of process you need lives only as long as needed; hyper efficient.

    The reason you have to be brave and daring is because if you get the escape wrong, these processes can call copies of themselves forever.  They are, however, easy to find and cancel if that should happen in your case.  Have fun!

Reply
  • +1
    Certified Lead Developer

    You could take a single chunk, such as for the first reviewer, save that as a process model, and then call it 4 times.  Another thing you could try, if you are brave and daring, is to put an XOR at the end, one fork which leads to terminate, the other leads to subprocess node.  If it's the last reviewer, terminate process.  Otherwise, asynchronously call the same PM with the next reviewer.  Yes, process models can call themselves as a subprocess.  By doing it asynchronous, the process for the first reviewer, the second reviewer, and the third are already dead and waiting to be archived by the time the fourth reviewer gets the task.  So the amount of process you need lives only as long as needed; hyper efficient.

    The reason you have to be brave and daring is because if you get the escape wrong, these processes can call copies of themselves forever.  They are, however, easy to find and cancel if that should happen in your case.  Have fun!

Children
No Data