summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-08-21 09:37:47 (EDT)
committer Stephan Born2012-09-10 08:46:30 (EDT)
commit5a7e4cfdb16d9df45dd50ce92c976578b9f1ebd6 (patch)
tree6ad27ecc5bfbba80c7522715e5c8bf7543965c16
parentf3b1eda40bbc7c853328513f033e954d5f5fc9ca (diff)
downloadorg.eclipse.stardust.ide-5a7e4cfdb16d9df45dd50ce92c976578b9f1ebd6.zip
org.eclipse.stardust.ide-5a7e4cfdb16d9df45dd50ce92c976578b9f1ebd6.tar.gz
org.eclipse.stardust.ide-5a7e4cfdb16d9df45dd50ce92c976578b9f1ebd6.tar.bz2
Jira-ID: CRNT-25763
Transient Process Instance Support - Modeler functionality: Tagging a process definition git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@58587 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ProcessDefinitionGeneralPropertyPage.java47
1 files changed, 46 insertions, 1 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ProcessDefinitionGeneralPropertyPage.java b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ProcessDefinitionGeneralPropertyPage.java
index 234c3ad..d0f9a8e 100644
--- a/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ProcessDefinitionGeneralPropertyPage.java
+++ b/modeling/org.eclipse.stardust.modeling.core/src/org/eclipse/stardust/modeling/core/properties/ProcessDefinitionGeneralPropertyPage.java
@@ -10,14 +10,21 @@
*******************************************************************************/
package org.eclipse.stardust.modeling.core.properties;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+
import org.eclipse.stardust.common.StringUtils;
+import org.eclipse.stardust.model.xpdl.carnot.AttributeType;
+import org.eclipse.stardust.model.xpdl.carnot.IExtensibleElement;
import org.eclipse.stardust.model.xpdl.carnot.IModelElement;
import org.eclipse.stardust.model.xpdl.carnot.IModelElementNodeSymbol;
import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
+import org.eclipse.stardust.model.xpdl.carnot.util.AttributeUtil;
import org.eclipse.stardust.modeling.common.ui.jface.utils.FormBuilder;
import org.eclipse.stardust.modeling.common.ui.jface.utils.LabeledText;
import org.eclipse.stardust.modeling.core.Diagram_Messages;
-import org.eclipse.swt.widgets.Composite;
public class ProcessDefinitionGeneralPropertyPage extends IdentifiablePropertyPage
{
@@ -25,11 +32,25 @@ public class ProcessDefinitionGeneralPropertyPage extends IdentifiablePropertyPa
private LabeledText priorityText;
+ private Button transientCheckBox;
+
+ private boolean isTransient = false;
+
public void loadFieldsFromElement(IModelElementNodeSymbol symbol, IModelElement element)
{
super.loadFieldsFromElement(symbol, element);
ProcessDefinitionType pd = (ProcessDefinitionType) element;
priorityText.getText().setText(Integer.toString(pd.getDefaultPriority()));
+
+ AttributeType transientAttribute = AttributeUtil.getAttribute(
+ (IExtensibleElement) getModelElement(),
+ "carnot:engine:transientProcessExecutionSupport");
+
+ if (transientAttribute != null)
+ {
+ isTransient = AttributeUtil.getBooleanValue(transientAttribute);
+ }
+ transientCheckBox.setSelection(isTransient);
}
public void loadElementFromFields(IModelElementNodeSymbol symbol, IModelElement element)
@@ -58,5 +79,29 @@ public class ProcessDefinitionGeneralPropertyPage extends IdentifiablePropertyPa
{
priorityText = FormBuilder.createLabeledText(composite,
Diagram_Messages.LBL_TXT_DEFAULT_PRIORITY);
+
+ transientCheckBox = FormBuilder.createCheckBox(composite, "Transient", 2);
+ transientCheckBox.addSelectionListener(new SelectionAdapter()
+ {
+
+ public void widgetSelected(SelectionEvent e)
+ {
+
+ AttributeUtil.setBooleanAttribute((IExtensibleElement) modelElement,
+ "carnot:engine:transientProcessExecutionSupport", true);
+ isTransient = !isTransient;
+ if (isTransient)
+ {
+ AttributeUtil.setBooleanAttribute((IExtensibleElement) modelElement,
+ "carnot:engine:transientProcessExecutionSupport", true);
+ }
+ else
+ {
+ AttributeUtil.setBooleanAttribute((IExtensibleElement) modelElement,
+ "carnot:engine:transientProcessExecutionSupport", false);
+ }
+ }
+ });
+
}
}