Package org.jbpm.bpmn2.xml

Examples of org.jbpm.bpmn2.xml.ServiceTaskHandler


    @SuppressWarnings("unchecked")
  public void start(BundleContext bc) throws Exception {
        System.out.println( "registering jBPM BPMN2 process services" );
        this.bpmn2ProcessReg = bc.registerService( new String[]{ BPMN2ProcessProvider.class.getName(), Service.class.getName()},
                                                   new BPMN2ProcessProviderImpl(),
                                                   new Hashtable() );

        System.out.println( "jBPM BPMN2 process services registered" );
    }
View Full Code Here


          throw new IllegalArgumentException(directory + " is not a directory");
        }
        ProcessBuilderFactory.setProcessBuilderFactoryService(new ProcessBuilderFactoryServiceImpl());
        ProcessMarshallerFactory.setProcessMarshallerFactoryService(new ProcessMarshallerFactoryServiceImpl());
        ProcessRuntimeFactory.setProcessRuntimeFactoryService(new ProcessRuntimeFactoryServiceImpl());
        BPMN2ProcessFactory.setBPMN2ProcessProvider(new BPMN2ProcessProviderImpl());
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        for (File subfile: file.listFiles(new FilenameFilter() {
            public boolean accept(File dir, String name) {
              return name.endsWith(".bpmn") || name.endsWith("bpmn2");
            }})) {
View Full Code Here

  private static KnowledgeBase readKnowledgeBase() throws Exception {
    ProcessBuilderFactory.setProcessBuilderFactoryService(new ProcessBuilderFactoryServiceImpl());
    ProcessMarshallerFactory.setProcessMarshallerFactoryService(new ProcessMarshallerFactoryServiceImpl());
    ProcessRuntimeFactory.setProcessRuntimeFactoryService(new ProcessRuntimeFactoryServiceImpl());
    BPMN2ProcessFactory.setBPMN2ProcessProvider(new BPMN2ProcessProviderImpl());
    KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
    kbuilder.add(ResourceFactory.newClassPathResource("JavaInvoker.bpmn"), ResourceType.BPMN2);
    return kbuilder.newKnowledgeBase();
  }
View Full Code Here

  private static KnowledgeBase readKnowledgeBase() throws Exception {
    ProcessBuilderFactory.setProcessBuilderFactoryService(new ProcessBuilderFactoryServiceImpl());
    ProcessMarshallerFactory.setProcessMarshallerFactoryService(new ProcessMarshallerFactoryServiceImpl());
    ProcessRuntimeFactory.setProcessRuntimeFactoryService(new ProcessRuntimeFactoryServiceImpl());
    BPMN2ProcessFactory.setBPMN2ProcessProvider(new BPMN2ProcessProviderImpl());
    KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
    kbuilder.add(ResourceFactory.newClassPathResource("JavaHandler.bpmn"), ResourceType.BPMN2);
    return kbuilder.newKnowledgeBase();
  }
View Full Code Here

          throw new IllegalArgumentException(directory + " is not a directory");
        }
        ProcessBuilderFactory.setProcessBuilderFactoryService(new ProcessBuilderFactoryServiceImpl());
        ProcessMarshallerFactory.setProcessMarshallerFactoryService(new ProcessMarshallerFactoryServiceImpl());
        ProcessRuntimeFactory.setProcessRuntimeFactoryService(new ProcessRuntimeFactoryServiceImpl());
        BPMN2ProcessFactory.setBPMN2ProcessProvider(new BPMN2ProcessProviderImpl());
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        for (File subfile: file.listFiles(new FilenameFilter() {
            public boolean accept(File dir, String name) {
              return name.endsWith(".bpmn") || name.endsWith("bpmn2");
            }})) {
View Full Code Here

    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        ProcessInstance processInstance = ksession.startProcess("Evaluation");
        Definitions def = (Definitions) processInstance.getProcess().getMetaData().get("Definitions");
        assertNotNull(def.getAssociations());
        assertTrue(def.getAssociations().size() == 1);
        Association assoc = def.getAssociations().get(0);
        assertEquals("_1234", assoc.getId());
        assertEquals("_1", assoc.getSourceRef());
        assertEquals("_2", assoc.getTargetRef());
    }
View Full Code Here

 
  public Object start(final String uri, final String localName,
      final Attributes attrs, final ExtensibleXmlParser parser)
      throws SAXException {
    parser.startElementBuilder(localName, attrs);
    Association association = new Association();
    association.setId(attrs.getValue("id"));
    association.setSourceRef(attrs.getValue("sourceRef"));
    association.setTargetRef(attrs.getValue("targetRef"));
   
    Process parent = (Process) parser.getParent();
    Definitions definitions = (Definitions)
      parent.getMetaData().get("Definitions");
   
View Full Code Here

 
  public Object start(final String uri, final String localName,
      final Attributes attrs, final ExtensibleXmlParser parser)
      throws SAXException {
    parser.startElementBuilder(localName, attrs);
    DataStore store = new DataStore();
    store.setId(attrs.getValue("id"));
    store.setName(attrs.getValue("name"));
    final String itemSubjectRef = attrs.getValue("itemSubjectRef");
    store.setItemSubjectRef(itemSubjectRef);
    Map<String, ItemDefinition> itemDefinitions = (Map<String, ItemDefinition>)
      ((ProcessBuildData) parser.getData()).getMetaData("ItemDefinitions");
    // retrieve type from item definition
    //FIXME we bypass namespace resolving here. That's not a good idea
    // when we start having several documents, with imports.
    String localItemSubjectRef = itemSubjectRef.substring(
        itemSubjectRef.indexOf(":") +1);
    DataType dataType = new ObjectDataType();
    if (itemDefinitions != null) {
      ItemDefinition itemDefinition = itemDefinitions.get(localItemSubjectRef);
      if (itemDefinition != null) {
        dataType = new ObjectDataType(itemDefinition.getStructureRef());
      }
    }
    store.setType(dataType);
   
    Definitions parent = (Definitions) parser.getParent();
    List<DataStore> dataStores = parent.getDataStores();
    if (dataStores == null) {
      dataStores = new ArrayList<DataStore>();
View Full Code Here

    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
        ProcessInstance processInstance = ksession.startProcess("Evaluation");
        Definitions def = (Definitions) processInstance.getProcess().getMetaData().get("Definitions");
        assertNotNull(def.getDataStores());
        assertTrue(def.getDataStores().size() == 1);
        DataStore dataStore = def.getDataStores().get(0);
        assertEquals("employee", dataStore.getId());
        assertEquals("employeeStore", dataStore.getName());
        assertEquals(String.class.getCanonicalName(), ((ObjectDataType) dataStore.getType()).getClassName());
    }
View Full Code Here

  public Object start(final String uri, final String localName,
                  final Attributes attrs, final ExtensibleXmlParser parser)
      throws SAXException {
    parser.startElementBuilder(localName, attrs);
    return new Definitions();
  }
View Full Code Here

TOP

Related Classes of org.jbpm.bpmn2.xml.ServiceTaskHandler

Copyright © 2018 www.massapicom. 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.