当前位置: 首页>>代码示例>>Java>>正文


Java SequenceFlow.setSourceRef方法代码示例

本文整理汇总了Java中org.activiti.bpmn.model.SequenceFlow.setSourceRef方法的典型用法代码示例。如果您正苦于以下问题:Java SequenceFlow.setSourceRef方法的具体用法?Java SequenceFlow.setSourceRef怎么用?Java SequenceFlow.setSourceRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.activiti.bpmn.model.SequenceFlow的用法示例。


在下文中一共展示了SequenceFlow.setSourceRef方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testStartEventWithExecutionListener

import org.activiti.bpmn.model.SequenceFlow; //导入方法依赖的package包/类
public void testStartEventWithExecutionListener() throws Exception {
  BpmnModel bpmnModel = new BpmnModel();
  Process process = new Process();
  process.setId("simpleProcess");
  process.setName("Very simple process");
  bpmnModel.getProcesses().add(process);
  StartEvent startEvent = new StartEvent();
  startEvent.setId("startEvent1");
  TimerEventDefinition timerDef = new TimerEventDefinition();
  timerDef.setTimeDuration("PT5M");
  startEvent.getEventDefinitions().add(timerDef);
  ActivitiListener listener = new ActivitiListener();
  listener.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_EXPRESSION);
  listener.setImplementation("${test}");
  listener.setEvent("end");
  startEvent.getExecutionListeners().add(listener);
  process.addFlowElement(startEvent);
  UserTask task = new UserTask();
  task.setId("reviewTask");
  task.setAssignee("kermit");
  process.addFlowElement(task);
  SequenceFlow flow1 = new SequenceFlow();
  flow1.setId("flow1");
  flow1.setSourceRef("startEvent1");
  flow1.setTargetRef("reviewTask");
  process.addFlowElement(flow1);
  EndEvent endEvent = new EndEvent();
  endEvent.setId("endEvent1");
  process.addFlowElement(endEvent);
  
  byte[] xml = new BpmnXMLConverter().convertToXML(bpmnModel);
  
  new BpmnXMLConverter().validateModel(new InputStreamSource(new ByteArrayInputStream(xml)));
  
  Deployment deployment = repositoryService.createDeployment().name("test").addString("test.bpmn20.xml", new String(xml)).deploy();
  repositoryService.deleteDeployment(deployment.getId());
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:38,代码来源:EventJavaTest.java

示例2: convertXMLToElement

import org.activiti.bpmn.model.SequenceFlow; //导入方法依赖的package包/类
@Override
protected BaseElement convertXMLToElement(XMLStreamReader xtr) throws Exception {
  SequenceFlow sequenceFlow = new SequenceFlow();
  BpmnXMLUtil.addXMLLocation(sequenceFlow, xtr);
  sequenceFlow.setSourceRef(xtr.getAttributeValue(null, ATTRIBUTE_FLOW_SOURCE_REF));
  sequenceFlow.setTargetRef(xtr.getAttributeValue(null, ATTRIBUTE_FLOW_TARGET_REF));
  sequenceFlow.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME));
  
  parseChildElements(getXMLElementName(), sequenceFlow, xtr);
  
  return sequenceFlow;
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:13,代码来源:SequenceFlowXMLConverter.java

示例3: createSequenceFlow

import org.activiti.bpmn.model.SequenceFlow; //导入方法依赖的package包/类
protected SequenceFlow createSequenceFlow(String from, String to) {
    SequenceFlow flow = new SequenceFlow();
    flow.setSourceRef(from);
    flow.setTargetRef(to);
    return flow;
}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:7,代码来源:DynamicProcess.java

示例4: createSequenceFlow

import org.activiti.bpmn.model.SequenceFlow; //导入方法依赖的package包/类
protected SequenceFlow createSequenceFlow(String from, String to) {
	SequenceFlow flow = new SequenceFlow();
	flow.setSourceRef(from);
	flow.setTargetRef(to);
	return flow;
}
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:7,代码来源:ProcessBuilderTest.java


注:本文中的org.activiti.bpmn.model.SequenceFlow.setSourceRef方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。