Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Open-BPMN-Meta Model #823

Open
13 tasks done
rsoika opened this issue Apr 25, 2023 · 2 comments
Open
13 tasks done

Introduce Open-BPMN-Meta Model #823

rsoika opened this issue Apr 25, 2023 · 2 comments

Comments

@rsoika
Copy link
Member

rsoika commented Apr 25, 2023

The current model implementation is using a sax parser and a ModelHandler. This implementation is not stable. In complex model situations duplicate event ids can occur. This is not detected by the org.imixs.workflow.bpmn.BPMNModelHandler.

In the following example, both the escalate event and the case2 event have the ID 100

image

As a result the following junit test will fail (task 2200 should have 5 events! but results in 3!!!)

	@Test
	public void testComplex0()
			throws ParseException, ParserConfigurationException, SAXException, IOException, ModelException {
		InputStream inputStream = getClass().getResourceAsStream("/bpmn/conditional_complex_event0.bpmn");
		BPMNModel model = null;
		try {
			model = BPMNParser.parseModel(inputStream, "UTF-8");
			ItemCollection task2000 = model.getTask(2000);
			ItemCollection task2200 = model.getTask(2200);

			List<ItemCollection> events2000 = model.findAllEventsByTask(2000);
			Assert.assertEquals(3,events2000.size());

			List<ItemCollection> events2200 = model.findAllEventsByTask(2200);
			Assert.assertEquals(5,events2200.size());

			// NOTE:
			// The following check is not resolvelable because in the demo model 
			// task 2200 contains a duplicate eventID which is not detected by the Parser!!
			// Check event 2200.100 pointing to 2100
			ItemCollection event =model.getEvent(2200,100);
			Assert.assertEquals(2100, event.getItemValueInteger("numnextprocessid"));

			event =model.getEvent(2200,100);
			Assert.assertEquals(2100, event.getItemValueInteger("numnextprocessid"));
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
			Assert.fail();
		} catch (ModelException e) {
			e.printStackTrace();
			Assert.fail();
		}
		Assert.assertNotNull(model);
	}

See the corresponding attached BPMN model in complex-model0.txt

Solution

To resolve this issue we should get rid of the org.imixs.workflow.bpmn.BPMNModelHandler and replace it with the Open-BPMN Meta model library.

The new implementation should follow a complete new approach:

  • Replace the org.imixs.workflow.Model directly with org.openbpmn.bpmn.BPMNModel
  • Implement an Util class that can handle the methods getTask and getEvent based on a OpenBPMN Model
  • Move the method findVersionsByRegEx from the engine directly into the ModelManager core class
  • Remove the method findNextTask from the WorkflowKernel - use a OpenBPMN method instead
  • Remove the classes BPMNModelHandler, BPMNParser and BPMNModel form the package org.imixs.workflow.bpmn
  • Remove BPMNRuleEngine (deprecated)

As a result, the new model implementation based on the Open-BPMN meta model should detect the issue with the two identical IDs in the example model.

New Methods to be implemented

  • bpmnModel.findAllEventsByTask(taskID);
  • bpmnModel.getTask(taskID)
  • bpmnModel.getEvent(eventID)
  • bpmnModel.findPlugins /getPlugin

Consequences

The WorkflowKernel need to be refactored

  • It should not implement findNextTask
  • It should not implement loadEvent
  • Instead of updateEventList it should ask hasNextEvent

It looks like this methods should become part of the ModelManger

@rsoika
Copy link
Member Author

rsoika commented Apr 25, 2023

rsoika added a commit that referenced this issue Apr 25, 2023
@rsoika rsoika added this to the 6.1.0 milestone Aug 3, 2024
rsoika added a commit that referenced this issue Aug 5, 2024
rsoika added a commit that referenced this issue Aug 6, 2024
Issue #823
rsoika added a commit that referenced this issue Aug 6, 2024
Issue #823
rsoika added a commit that referenced this issue Aug 6, 2024
rsoika added a commit that referenced this issue Aug 6, 2024
rsoika added a commit that referenced this issue Aug 6, 2024
rsoika added a commit that referenced this issue Aug 9, 2024
rsoika added a commit that referenced this issue Aug 10, 2024
rsoika added a commit that referenced this issue Aug 10, 2024
rsoika added a commit that referenced this issue Aug 11, 2024
rsoika added a commit that referenced this issue Aug 11, 2024
rsoika added a commit that referenced this issue Aug 11, 2024
rsoika added a commit that referenced this issue Aug 13, 2024
rsoika added a commit that referenced this issue Aug 14, 2024
rsoika added a commit that referenced this issue Aug 15, 2024
rsoika added a commit that referenced this issue Aug 16, 2024
rsoika added a commit that referenced this issue Aug 17, 2024
rsoika added a commit that referenced this issue Aug 17, 2024
rsoika added a commit that referenced this issue Aug 17, 2024
rsoika added a commit that referenced this issue Aug 19, 2024
rsoika added a commit that referenced this issue Aug 20, 2024
Issue #823
rsoika added a commit that referenced this issue Aug 20, 2024
Issue #823
rsoika added a commit that referenced this issue Aug 21, 2024
rsoika added a commit that referenced this issue Aug 22, 2024
rsoika added a commit that referenced this issue Aug 22, 2024
@rsoika
Copy link
Member Author

rsoika commented Aug 22, 2024

Verify the case process workitem with $modelversion = "" and $workflowGroup="Some Groupname"

rsoika added a commit that referenced this issue Aug 22, 2024
rsoika added a commit that referenced this issue Aug 27, 2024
rsoika added a commit that referenced this issue Aug 27, 2024
rsoika added a commit that referenced this issue Aug 28, 2024
rsoika added a commit that referenced this issue Aug 28, 2024
rsoika added a commit that referenced this issue Aug 29, 2024
rsoika added a commit that referenced this issue Aug 30, 2024
rsoika added a commit that referenced this issue Aug 30, 2024
rsoika added a commit that referenced this issue Aug 30, 2024
Issue #823
rsoika added a commit that referenced this issue Aug 30, 2024
rsoika added a commit that referenced this issue Aug 31, 2024
rsoika added a commit that referenced this issue Aug 31, 2024
rsoika added a commit that referenced this issue Aug 31, 2024
rsoika added a commit that referenced this issue Aug 31, 2024
rsoika added a commit that referenced this issue Aug 31, 2024
rsoika added a commit that referenced this issue Sep 1, 2024
Issue #823
rsoika added a commit that referenced this issue Sep 1, 2024
rsoika added a commit that referenced this issue Sep 1, 2024
rsoika added a commit that referenced this issue Sep 1, 2024
rsoika added a commit that referenced this issue Sep 2, 2024
rsoika added a commit that referenced this issue Sep 2, 2024
rsoika added a commit that referenced this issue Sep 2, 2024
rsoika added a commit that referenced this issue Sep 2, 2024
rsoika added a commit that referenced this issue Sep 4, 2024
rsoika added a commit that referenced this issue Sep 4, 2024
rsoika added a commit that referenced this issue Sep 6, 2024
rsoika added a commit that referenced this issue Sep 7, 2024
rsoika added a commit that referenced this issue Sep 8, 2024
rsoika added a commit that referenced this issue Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant