Community
Participate
Working Groups
We currently have the issue, that in case when you add a "Message Event Definition" into an "Intermediate Event" you got the following validation error: - Intermediate Throw Event Intermediate Throw Event 2 has no Message definition To solve this validation error, it is necessary to edit the Message definition and parameters. From my point of view this kind of validation may be relevant for some runtime extensions or BPM engines. But it is not per default an validation error in a non-technical BPMN 2.0 model. What I would suggest is to add a new BPMN option 'Technical Validation' to allow the user to disable this kind of validations in a model. This is similar to the existing option 'Allow multiple incomming/outgoing connection on Activities'. What do you think about this additional option to control the validation behavior?
I think what you're suggesting should already be covered with the "Is Executable" Process flag. Can you check the spec and see if it says anything about Message definitions being required for non-executable processes?
From the spec: ----------------------------------------------- http://www.omg.org/spec/BPMN/2.0/PDF chapter 10 Process -> isExecutable: boolean [0..1] An executable Process is a private Process that has been modeled for the purpose of being executed according to the semantics of Chapter 14 (see page 426). Of course, during the development cycle of the Process, there will be stages where the Process does not have enough detail to be “executable.” A non-executable Process is a private Process that has been modeled for the purpose of documenting Process behavior at a modeler-defined level of detail. Thus, information needed for execution, such as formal condition expressions are typically not included in a non-executable Process ----------------------------------------------- According to this description I don't think that validation of event types is necessary - or expected - for a non-executable Process. In this context I would suggest that the EventDefinitionValidator skips the validation in case the process is flagged as 'non-executeable' Please give me feedback if you agree with this understanding.
You're probably right, and I'm sure there are lots of other things that need not be validated for non-executable processes, since these are primarily for documentation purposes I think.
Hi Bob, can you please take a look at the following extensions: The first includes two convenience methods for the ModelUtil class: /** * Returns the process instance for a EObject * * @param object * @return Process - or null if not found */ public static Process getProcess(EObject object) { if (object instanceof Process) return (Process) object; EObject container = object.eContainer(); if (container == null) return null; /* * Here we extract the parent element from the selection container which * can be a process or a collaboration selection. */ if (container instanceof Participant) { return ((Participant) container).getProcessRef(); } if (container instanceof Process) { return (Process) container; } return null; } /** * returns true if the process for a given EObject has the isExecuteable * flag * * @param object * @return true if process is executable */ public static boolean isExecutable(EObject object) { Process process = getProcess(object); if (process != null) { return process.isIsExecutable(); } return false; } And the second one is an example how I would like to extend the EventDefinitionValidator.validat() method: @Override public IStatus validate(EventDefinition ed) { Event event = (Event) ed.eContainer(); if (!ModelUtil.isExecutable(event)) { // skip validation return getResult(); } .... } On my own test szenarios this works very well, but I'm not sure whether this solution corresponds to your concept of validation.
Hi Bob, I attached two screens where you can see a validation error of a 'missing timer definition' in a formal correct model. The flag 'executable' in the process properties is not selected. I think this is a good example
Created attachment 258201 [details] missing timer definition
Created attachment 258202 [details] execution flag