Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Subprocess / Call activity process defined in a separate file
Subprocess / Call activity process defined in a separate file [message #1281588] Tue, 01 April 2014 00:19 Go to next message
Matt Hampton is currently offline Matt Hampton
Messages: 3
Registered: April 2014
Junior Member
Is it possible with the BPMN2 modeler to refer to a process from a Call Activity that is defined in a different bpmn20.xml file? This would be helpful for us in factoring our workflow designs nicely.

Thanks!
Re: Subprocess / Call activity process defined in a separate file [message #1281873 is a reply to message #1281588] Tue, 01 April 2014 09:42 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 589
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Matt,

You need to import the external bpmn2 file first before it can be referenced in a Call Activity.

However, see also the following bugzillas:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=383849
https://bugs.eclipse.org/bugs/show_bug.cgi?id=423321
https://bugs.eclipse.org/bugs/show_bug.cgi?id=413072

I hope to have these fixed before the 1.1.0 final in June.

Cheers,
Bob
Re: Subprocess / Call activity process defined in a separate file [message #1375721 is a reply to message #1281873] Fri, 23 May 2014 01:27 Go to previous messageGo to next message
Matt Hampton is currently offline Matt Hampton
Messages: 3
Registered: April 2014
Junior Member
Hi Bob,

Thanks so much for the answer ... It was very helpful - and I now understand better how BPMN workflows reference other workflows.

If you have time for another question - more related to the BPMN 2.0 model, actually - I would really appreciate your insight.

I've built a small python-based BPMN execution engine that can handle a subset of BPMN 2.0, which we've been using in our application for a while with a reasonable degree of success.

However our approach to call activities is somewhat dynamic:
1. We want users of our application to be able to customise the workflow to a certain extent
2. A rational extension point for us is at the point of a CallActivity (i.e. we provide a base implementation of a sub-workflow - and they can provide a replacement for just that piece - without having to change the containing workflow design).
3. This means that the resolution of the called activity is a bit more dynamic - happening at run time instead of when the containing workflow is designed.

So far, I've done this by just using a logical name for the calledActivity in place of a real ID - and without an actual import - which obviously means that the containing workflow design is not really valid BPMN. My workflow engine then does the resolution at runtime based on the name.

I've done a bit of spec reading - perhaps not in sufficient detail - but I was wondering if you know of a 'valid' way of doing something like this in BPMN-2.0?

Thanks so much,

Matt


Re: Subprocess / Call activity process defined in a separate file [message #1383988 is a reply to message #1375721] Tue, 27 May 2014 13:11 Go to previous message
Robert Brodt is currently offline Robert Brodt
Messages: 589
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hey Matt,

Unfortunately, the BPMN 2.0 spec doesn't allow you to use proxies for the called element reference - this has to be a resolvable element, specifically a CallableElement.

You could, however, define an extension attribute and property tab using your own plugin. As of version 1.1.0 you can also define these extensions in an XML file in a folder named ".bpmn2config" in the project that contains your *.bpmn2 files. The extensions would look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<runtime id="org.eclipse.bpmn2.modeler.runtime.none">
	<modelExtension
		id="org.foo.callactivity.extension"
		uri="http://org.foo/extensions"
		name="My CallActivity Extension"
		type="CallActivity">
		<property name="proxy" type="EString" label="Called Activity"/>
	</modelExtension>

	<propertyTab
		id="org.foo.callActivity.tab"
		replaceTab="org.eclipse.bpmn2.modeler.callActivity.tab"
		class="default"
		features="proxy isForCompensation loopCharacteristics properties resources"
		type="org.eclipse.bpmn2.CallActivity"
		label="Proxy">
	</propertyTab>
</runtime>


This would add an attribute to the CallActivity, named "proxy" which would be rendered as a simple text field in the Property Sheet. The serialized XML would look like this:

    <bpmn2:callActivity id="CallActivity_1" extensions:proxy="CalledActivity" name="Call Activity 1"/>


The editor would automatically generated the NS prefix definition xmlns:extensions="http://org.foo/extensions" which is defined in the <modelExtension> extension point element (above).

Let me know if you have questions.

Cheers,
Bob
Previous Topic:How can I create a new Process type?
Next Topic:Import for Call Activity with Relative Path
Goto Forum:
  


Current Time: Wed Aug 20 02:49:36 EDT 2014

Powered by FUDForum. Page generated in 0.01640 seconds