Bug 467455 - Technical Validation
Summary: Technical Validation
Status: ASSIGNED
Alias: None
Product: BPMN2Modeler
Classification: SOA
Component: Core (show other bugs)
Version: 1.2.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: future   Edit
Assignee: Ralph Soika CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-17 03:45 EDT by Ralph Soika CLA
Modified: 2015-11-22 04:32 EST (History)
1 user (show)

See Also:


Attachments
missing timer definition (23.05 KB, image/png)
2015-11-22 04:31 EST, Ralph Soika CLA
no flags Details
execution flag (35.78 KB, image/png)
2015-11-22 04:32 EST, Ralph Soika CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Soika CLA 2015-05-17 03:45:07 EDT
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?
Comment 1 Robert Brodt CLA 2015-05-18 08:55:12 EDT
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?
Comment 2 Ralph Soika CLA 2015-06-16 17:08:07 EDT
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.
Comment 3 Robert Brodt CLA 2015-06-16 18:21:08 EDT
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.
Comment 4 Ralph Soika CLA 2015-06-17 17:15:17 EDT
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.
Comment 5 Ralph Soika CLA 2015-11-22 04:30:45 EST
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
Comment 6 Ralph Soika CLA 2015-11-22 04:31:37 EST
Created attachment 258201 [details]
missing timer definition
Comment 7 Ralph Soika CLA 2015-11-22 04:32:01 EST
Created attachment 258202 [details]
execution flag