Hi All,
Is there anyway to start a process model by using Process Model Id or Process UUID?
Discussion posts and replies are publicly visible
From where you want to start the process? From site, Email, Action ?
You can use this plugin
getprocessmodeldetailsbyuuid()
I need to start a process by Start process smart service.
By this plugin will get process model details by UUID but I need to start process.
in this smart service you have to provide consant of process model to start the process model.
You can use a constant then. Type - Process Model
Not with the UUID but, yes, with the Id.
If you look at what the actual value is in a constant that references a process model you'll see that it is the Process Model Id. You can do this like this:
fn!tointeger(cons!XXX_MY_PROCESS_MODEL)
and if you look at a!startProcess() and a!startProcessLink() you'll see you'd normally reference the target process model using a constant. So this will tell you that you can just pass the integer value of the process model id instead.
If you want to design something dynamic (which is what it sounds like you might be exploring) note that the process model id may not be the same for the same process model in different environments. However the process model UUID is the same. So you could, say, have some logic that returns the UUID of the process you want to call, and then derive the process id from that UUID and then you can be sure it'll work in all of your environments (you could use fn!getprocessmodeldetailsbyuuid() to do this, using the UUID, and then extracting the Id from the details returned. There may be a more elegant way that I'm not aware of to do this.
Thanks for your Harshit,
My requirement is getting details of process model like Process model Id, UUID and Process Model Name, will fetch those details and start a process by UUID or Id. Database table is generic type we can get multiple process model details.
As a side note - I've seen systems designed where what gets executed next is dynamic (fetched form a database table based upon some rules) and whilst incredibly clever they can be very hard to debug when things don't behave as expected.
Thanks for the Info Stewart,
Could you please help me out what can constant hold as datatype? and I need to pass dynamic values to the constant which refers to the process model.