Examples of Bpmn2Resource


Examples of org.eclipse.bpmn2.util.Bpmn2Resource

        try {
            parser.nextToken(); // open the object
            ResourceSet rSet = new ResourceSetImpl();
            rSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("bpmn2",
                    new JBPMBpmn2ResourceFactoryImpl());
            Bpmn2Resource bpmn2 = (Bpmn2Resource) rSet.createResource(URI.createURI("virtual.bpmn2"));
            rSet.getResources().add(bpmn2);
            _currentResource = bpmn2;

            if(preProcessingData == null || preProcessingData.length() < 1) {
                preProcessingData = "ReadOnlyService";
View Full Code Here

Examples of org.eclipse.bpmn2.util.Bpmn2Resource

   * 测试方法 不可用
   * @param defintion
   */
  public void save(Definitions defintion){
    ResourceSet resourceSet = getResourceSet();
    Bpmn2Resource resource = (Bpmn2Resource) resourceSet.getResource(URI.createFileURI("d:\\node_template.bpmn"), true);
    DocumentRoot documentRoot = (DocumentRoot) resource.getContents().get(0);
    documentRoot.setDefinitions(defintion);
    try {
      resource.save(null);
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of org.eclipse.bpmn2.util.Bpmn2Resource

   * @param definitions
   * @param uri
   */
  public void save(Definitions definitions,URI uri){
    ResourceSet resourceSet = getResourceSet();
    Bpmn2Resource resource = (Bpmn2Resource) resourceSet.getResource(uri, true);
    DocumentRoot documentRoot = (DocumentRoot) resource.getContents().get(0);
    documentRoot.setDefinitions(definitions);
    try {
      resource.save(null);
    } catch (IOException e) {
      e.printStackTrace();
      throw new FixFlowException(ExceptionCode.EXCEPTION_DEFAULT,e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.