public abstract class BaseStepDefinitionConverter<U extends StepDefinition,T> extends Object implements StepDefinitionConverter<U,T>
StepDefinitionConverter
, contains utility-methods.
All StepDefinitionConverter
should extend this class and implement any BPMN 2.0 xml
generation logic in the createProcessArtifact(StepDefinition, WorkflowDefinitionConversion)
method.
The generation of additional artifacts should be done by overriding the #createAdditionalArtifacts(Object)
method adn adding the produced artifacts to the generic map on the WorkflowDefinitionConversion
.Constructor and Description |
---|
BaseStepDefinitionConverter() |
Modifier and Type | Method and Description |
---|---|
protected void |
addFlowElement(WorkflowDefinitionConversion conversion,
FlowElement flowElement)
Adds a flow element to the
Process . |
protected void |
addFlowElement(WorkflowDefinitionConversion conversion,
FlowElement flowElement,
boolean addSequenceFlowToLastActivity) |
protected SequenceFlow |
addSequenceFlow(WorkflowDefinitionConversion conversion,
FlowNode sourceActivity,
FlowNode targetActivity) |
protected SequenceFlow |
addSequenceFlow(WorkflowDefinitionConversion conversion,
String sourceActivityId,
String targetActivityId) |
protected SequenceFlow |
addSequenceFlow(WorkflowDefinitionConversion conversion,
String sourceActivityId,
String targetActivityId,
String condition)
Add a sequence-flow to the current process from source to target.
|
protected List<FormProperty> |
convertProperties(FormDefinition formDefinition)
Converts form properties.
|
T |
convertStepDefinition(StepDefinition stepDefinition,
WorkflowDefinitionConversion conversion)
Convert given
StepDefinition to correct artifacts and adds them to
process, models and forms. |
protected void |
createAdditionalArtifacts(WorkflowDefinitionConversion conversion,
U stepDefinition,
T defaultGeneratedArtifact)
Subclasses should override this method if they want to create additional artifacts
for this specific step.
|
protected abstract T |
createProcessArtifact(U stepDefinition,
WorkflowDefinitionConversion conversion)
Subclasses must implement this method and create the BPMN 2.0 process artifact(s) for the provided step.
|
protected String |
getSequenceFlowPrefix() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHandledClass
public T convertStepDefinition(StepDefinition stepDefinition, WorkflowDefinitionConversion conversion)
StepDefinitionConverter
StepDefinition
to correct artifacts and adds them to
process, models and forms.convertStepDefinition
in interface StepDefinitionConverter<U extends StepDefinition,T>
stepDefinition
- the StepDefinition
conversion
- The conversion which is calling this step converter.protected abstract T createProcessArtifact(U stepDefinition, WorkflowDefinitionConversion conversion)
protected void createAdditionalArtifacts(WorkflowDefinitionConversion conversion, U stepDefinition, T defaultGeneratedArtifact)
protected void addFlowElement(WorkflowDefinitionConversion conversion, FlowElement flowElement)
Process
.
A sequence flow will NOT automatically be addedprotected void addFlowElement(WorkflowDefinitionConversion conversion, FlowElement flowElement, boolean addSequenceFlowToLastActivity)
protected SequenceFlow addSequenceFlow(WorkflowDefinitionConversion conversion, FlowNode sourceActivity, FlowNode targetActivity)
protected SequenceFlow addSequenceFlow(WorkflowDefinitionConversion conversion, String sourceActivityId, String targetActivityId)
protected SequenceFlow addSequenceFlow(WorkflowDefinitionConversion conversion, String sourceActivityId, String targetActivityId, String condition)
conversion
- sourceActivityId
- targetActivityId
- condition
- protected String getSequenceFlowPrefix()
protected List<FormProperty> convertProperties(FormDefinition formDefinition)
Copyright © 2016 Alfresco. All rights reserved.