Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

BPMN2-Modeler/DeveloperTutorials/ToolPalettes

Extending the Tool Palette

The BPMN2 Plugin provides extension points to customize the workbench UI. One of these extension points is called 'modelEnablement'. You can use this extension point to customize the collapsible Tool Palette on the right side of the workbench window.

The extension point defines so called 'Profiles' describing which elements are enabled or disabled. For example you can define a tool palette profile called 'Full' showing all elements provided by the BPMN2 Plugin:

<modelEnablement
   	        runtimeId="org.imixs.workflow.bpmn.runtime"
		id="org.imixs.workflow.bpmn.profile.Full"
		profile="Full"
		description="All BPMN2 elements and attributes">
	<enable object="all"/>
</modelEnablement>

With the tag '<enable object="all"/>' you activate all elements. In opposite you can also define a Profile which disables all elements per default. Than you can add explicit only those elements which should be shown when the user selects that profile:

<modelEnablement
	runtimeId="org.imixs.workflow.bpmn.runtime"
		id="org.imixs.workflow.bpmn.profile.workflow"
		profile="Simple"
		description="Imixs-Workflow Process Modeling">
	<disable object="all"/>
	<enable object="Collaboration"/>
	<enable object="Process"/>
	<enable object="Correlation"/>
	<enable object="CorrelationProperty"/>
	<enable object="CorrelationPropertyBinding"/>
	<enable object="CorrelationPropertyRetrievalExpression"/>
	<enable object="CorrelationSubsciption"/>
	<enable object="Process"/>
	<enable object="Participant" feature="name"/>
	<enable object="Participant" feature="processRef"/>
	<enable object="Lane" feature="name"/>
	<enable object="SequenceFlow" feature="name"/>
	<enable object="MessageFlow" feature="name"/>
	<enable object="ExclusiveGateway" feature="name"/>
	<enable object="ParallelGateway" feature="name"/>
	<enable object="Task" feature="name"/>
	<enable object="UserTask" feature="name"/>
	<enable object="ServiceTask" feature="name"/>
</modelEnablement>

This profile example disables all elements per default and adds explicit those elements which belong to the profile called 'simple'.

It is also possible to inherit form one profile. The the following example:

<modelEnablement
		runtimeId="org.imixs.workflow.bpmn.runtime"
		id="org.imixs.workflow.bpmn.profile.analytic"
		ref="org.imixs.workflow.bpmn.runtime:Simple"
		profile="Analytic"
		description="Analytic Process Modeling Conformance">
	<enable object="SubProcess" feature="name"/>
	<enable object="CallActivity" feature="name"/>
	<enable object="CallActivity" feature="calledElementRef"/>
	<enable object="CallableElement"/>
	<enable object="DataObject" feature="name"/>
	<enable object="CallActivity" feature="name"/>
	<enable object="DataStore" feature="name"/>
	<enable object="DataStoreReference" feature="name"/>
	<enable object="DataStoreReference" feature="dataStoreRef"/>
	<enable object="Category"/>
	<enable object="CategoryValue"/>
	<enable object="BoundaryEvent"/>
	<!-- disable some elements.... -->
	<disable object="ServiceTask" feature="name"/>
</modelEnablement>

The profile 'Analytic' defines a reference to the profile 'simple' and extends this profile with additional elements.

<modelEnablement
		runtimeId="org.imixs.workflow.bpmn.runtime"
		id="org.imixs.workflow.bpmn.profile.analytic"
		ref="org.imixs.workflow.bpmn.runtime:Simple"
		profile="Analytic"
		description="Analytic Process Modeling Conformance">
....

Be careful with the attribute "ref". It defines the runtime extension by its ID and adds the name of the profile not the id!

With the tag '<disable>' a profile can also hide specific elements. So you have the flexibility to customize the UI to your modelling needs.

If you define profiles these profiles will be shown in the top of the toolbar and can be selected by the user. The profile did not influence the bpmn model. It only reduces or extends the elements shown in the toolbar.

Back to the top