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
a!startProcess() only needs the process model ID, and it doesn't need to be type cast. The additional hurdle is that the process model ID is environment-specific (as already mentioned by Chanakya) - so if you're writing anything to the DB, it should be the UUID, and then you can use either the Process Model Details plugin or the Content Tools plugin to get the process model ID per the UUID.
Hi Mike,
Thanks for the response. I used a decision table for mapping process model with the application name, as it is equally configurable and faster when compared to retrieving from database.