I want to use the function numprocessesforprocessmodelforstatus(id, status, includeSubProcessData), but I don't understand how to get the ID of the process model I want to reference. The documentation doesn't give an example that incorporates fetching the ID of a model, the example just says "numprocessesforprocessmodelforstatus(processModelId,"completed")" but doesn't explain how to get the id. The documentation has been giving me a headache since day one. If I look up "process model id" I get zero results in the documentation search.
numprocessesforprocessmodelforstatus(processModelId,"completed")
Discussion posts and replies are publicly visible
I do realise I can reference the current process model with "pm!id" but I want to reference a different one.
Hmmm. I see now. If I go into the process model properties it says on the first page "Process Model ID".This is not very convenient. Is this the only place to find it?The documentation should at least tell me to look here.
Hi aj2000, You can create a process report of process model type and then you can add a column of process model id. Now you can get the process model id's of every process present in the instance. With the help of a!queryProcessAnalytics() function, you can get the id of the required process model using query filter.
This sounds useful, but I don't quite understand how to create a report of a process model type, can you explain the first couple of steps?
The Process Model ID appears front-and-center on the properties dialog when you're editing that process model. That is, if you just need the ID for your own purposes. Note that the ID for a certain model will change between environments.
If you're talking about something you're going to actually use within your system, the standard practice for this is to create a Constant of type Process Model. When referenced by rules like you quote here, the rule will be fed the ID - and it will work correctly when deployed between different environments, since the constant itself is a direct reference to the process model.