Skip to main content
September 9, 2022
Question

Process Model Id

  • September 9, 2022
  • 15 replies
  • 1 view

Hi All,

Is there anyway to start a process model by using Process Model Id or Process UUID?

    15 replies

    September 9, 2022

    From where you want to start the process? From site, Email, Action ?

    September 9, 2022

    I need to start a process by Start process smart service.

    September 9, 2022

    in this smart service you have to provide consant of process model to start the process model.

    harshitb6843
    September 9, 2022

    You can use this plugin

    getprocessmodeldetailsbyuuid()

    September 9, 2022

    By this plugin will get process model details by UUID but I need to start process.

    harshitb6843
    September 9, 2022

    You can use a constant then. Type - Process Model

    stewart.burchell
    September 9, 2022

    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.

    stewart.burchell
    September 9, 2022

    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.