Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
How can I cast a value to datatype "Process model"?
I want to dynamically start a process model using
a!startProcess(processModel, processParameters, onSuccess, onError). I know that I can create a constant of type process model and pass it to parameter processModel.
However I would like to make it more dynamic, so that I need not create a constant everytime I want to call a new process model in future. Instead, planning to store the process model ID number in database and type cast it to "process model" and pass it as a parameter to a!startProcess().
I learnt that casting to type "Process Model"is not available in https://docs.appian.com/suite/help/19.3/Casting.html#general-casting, and anything that is not the list cannot be cast or will throw an error. Could anyone please let me know if there is any way we can achieve this.
I also learnt that we can make the design dynamic by using decision tables to map Process models and then use Start Process Smart Service. However, if I want to call a new process in future, I will still need to make changes to the decision table and deploy a new version. So, I am checking for getting the database approach I mentioned and using a!startProcess().
Thanks in advance!
Discussion posts and replies are publicly visible
Just an observation - I've seen this sort of pattern implemented in other languages/platforms and whist it is clever and flexible it can be really hard to debug when it goes wrong. Given that you can't dynamically create a process model at run time (which would be a frightening prospect!) then I'm not sure why living with a static model isn't palatable? You have the option of using a Appian Decision to dynamically return references to Process Models based upon rules (although you can only execute the using the Start Process smart service and therefore asynchronously by default).