Process Model Id

Certified Associate Developer

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

Parents
  • 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.

  • 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.

Reply Children
No Data