ActivitiListener
- 目录
- 概述
- 需求:
- 设计思路
- 实现思路分析
- 1.ActivitiListener
- 2.Activity
- 3.Gateway
- 5.FieldExtension
- IOSpecification
- 参考资料和推荐阅读
Survive by day and develop by night.
talk for import biz , show your perfect code,full busy,skip hardness,make a better result,wait for change,challenge Survive.
happy for hardess to solve denpendies.
目录

概述
ActivitiListener的是一个非常常见的需求。
需求:
设计思路
实现思路分析
1.ActivitiListener
protected String event;protected String implementationType;protected String implementation;protected List<FieldExtension> fieldExtensions = new ArrayList<FieldExtension>();protected String onTransaction;protected String customPropertiesResolverImplementationType;protected String customPropertiesResolverImplementation;
2.Activity

public abstract class Activity extends FlowNode {protected String defaultFlow;protected boolean forCompensation;protected MultiInstanceLoopCharacteristics loopCharacteristics;protected IOSpecification ioSpecification;protected List<DataAssociation> dataInputAssociations = new ArrayList<DataAssociation>();protected List<DataAssociation> dataOutputAssociations = new ArrayList<DataAssociation>();protected List<BoundaryEvent> boundaryEvents = new ArrayList<BoundaryEvent>();protected String failedJobRetryTimeCycleValue;protected List<MapExceptionEntry> mapExceptions = new ArrayList<MapExceptionEntry>();public String getFailedJobRetryTimeCycleValue() {return failedJobRetryTimeCycleValue;}public void setFailedJobRetryTimeCycleValue(String failedJobRetryTimeCycleValue) {this.failedJobRetryTimeCycleValue = failedJobRetryTimeCycleValue;}
3.Gateway
public class ExclusiveGateway extends Gateway {public ExclusiveGateway clone() {ExclusiveGateway clone = new ExclusiveGateway();clone.setValues(this);return clone;}public void setValues(ExclusiveGateway otherElement) {super.setValues(otherElement);}
}
5.FieldExtension
ublic class FieldExtension extends BaseElement {protected String fieldName;protected String stringValue;protected String expression;public FieldExtension() {}public String getFieldName() {return fieldName;}public void setFieldName(String fieldName) {this.fieldName = fieldName;}public String getStringValue() {return stringValue;}public void setStringValue(String stringValue) {this.stringValue = stringValue;}public String getExpression() {return expression;}public void setExpression(String expression) {this.expression = expression;}public FieldExtension clone() {FieldExtension clone = new FieldExtension();clone.setValues(this);return clone;}public void setValues(FieldExtension otherExtension) {setFieldName(otherExtension.getFieldName());setStringValue(otherExtension.getStringValue());setExpression(otherExtension.getExpression());}
}
IOSpecification

public class IOSpecification extends BaseElement {protected List<DataSpec> dataInputs = new ArrayList<DataSpec>();protected List<DataSpec> dataOutputs = new ArrayList<DataSpec>();protected List<String> dataInputRefs = new ArrayList<String>();protected List<String> dataOutputRefs = new ArrayList<String>();public List<DataSpec> getDataInputs() {return dataInputs;}public void setDataInputs(List<DataSpec> dataInputs) {this.dataInputs = dataInputs;}public List<DataSpec> getDataOutputs() {return dataOutputs;}public void setDataOutputs(List<DataSpec> dataOutputs) {this.dataOutputs = dataOutputs;}public List<String> getDataInputRefs() {return dataInputRefs;}public void setDataInputRefs(List<String> dataInputRefs) {this.dataInputRefs = dataInputRefs;}public List<String> getDataOutputRefs() {return dataOutputRefs;}public void setDataOutputRefs(List<String> dataOutputRefs) {this.dataOutputRefs = dataOutputRefs;}public IOSpecification clone() {IOSpecification clone = new IOSpecification();clone.setValues(this);return clone;}public void setValues(IOSpecification otherSpec) {dataInputs = new ArrayList<DataSpec>();if (otherSpec.getDataInputs() != null && !otherSpec.getDataInputs().isEmpty()) {for (DataSpec dataSpec : otherSpec.getDataInputs()) {dataInputs.add(dataSpec.clone());}}dataOutputs = new ArrayList<DataSpec>();if (otherSpec.getDataOutputs() != null && !otherSpec.getDataOutputs().isEmpty()) {for (DataSpec dataSpec : otherSpec.getDataOutputs()) {dataOutputs.add(dataSpec.clone());}}dataInputRefs = new ArrayList<String>(otherSpec.getDataInputRefs());dataOutputRefs = new ArrayList<String>(otherSpec.getDataOutputRefs());}
}
参考资料和推荐阅读
[1].www.activaty.org
欢迎阅读,各位老铁,如果对你有帮助,点个赞加个关注呗!~















