Examples of Process


Examples of org.drools.eclipse.core.Process

                            String packageName = processInfo.getProcess().getPackageName();
                            Package pkg = ruleSet.getPackage(packageName);
                            if (pkg == null) {
                                pkg = DroolsModelBuilder.addPackage(ruleSet, packageName, 0, 0);
                            }
                            Process process = DroolsModelBuilder.addProcess(pkg, processInfo.getProcess().getId(), file);
                            List droolsElements = (List) resourcesMap.get(file);
                            if (droolsElements == null) {
                                droolsElements = new ArrayList();
                                resourcesMap.put(file, droolsElements);
                            }
View Full Code Here

Examples of org.drools.process.core.Process

        //Merge The Rule Flows
        if ( newPkg.getRuleFlows() != null ) {
            final Map flows = newPkg.getRuleFlows();
            for ( final Iterator iter = flows.values().iterator(); iter.hasNext(); ) {
                final Process flow = (Process) iter.next();
                pkg.addProcess( flow );
            }
        }    
       
//        // this handles re-wiring any dirty Packages, it's done lazily to allow incremental
View Full Code Here

Examples of org.drools.ruleflow.common.core.Process

        }
    }

    public ProcessInstance startProcess(final String processId) {
        final Process process = ((InternalRuleBase) getRuleBase()).getProcess( processId );
        if ( process == null ) {
            throw new IllegalArgumentException( "Unknown process ID: " + processId );
        }
        if ( process instanceof RuleFlowProcess ) {
            final RuleFlowProcessInstance processInstance = new RuleFlowProcessInstanceImpl();
            processInstance.setWorkingMemory( this );
            processInstance.setProcess( process );
            processInstance.setId( ++processCounter );
            processInstance.start();

            getRuleFlowEventSupport().fireRuleFlowProcessStarted( processInstance,
                                                                  this );

            return processInstance;
        } else {
            throw new IllegalArgumentException( "Unknown process type: " + process.getClass() );
        }
    }
View Full Code Here

Examples of org.eclipse.bpel.model.Process

      bpelPackage = BPELPackage.eINSTANCE;

      this.bpelResource = resource;

      bpelNamespacePrefixManager = new NamespacePrefixManager(resource);
      Process process = resource.getProcess();
      wsdlNamespacePrefixManager = new WsdlImportsManager(process);
     
      walkExternalReferences();
     
      document = resource2XML(resource);     
View Full Code Here

Examples of org.eclipse.bpmn2.Process

    public void testPoolUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("pool.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        assertTrue(definitions.getRootElements().get(0) instanceof Process);
        Process process = getRootProcess(definitions);
        assertEquals("pool", process.getName());
        assertEquals(ProcessType.PRIVATE, process.getProcessType());
        assertTrue(process.isIsClosed());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.Process

    public void testLaneUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("pool.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        assertTrue(definitions.getRootElements().get(0) instanceof Process);
        Process process = getRootProcess(definitions);
        assertTrue(process.getLaneSets().size() == 1);
        assertTrue(process.getLaneSets().get(0).getLanes().size() == 1);
        Lane l = process.getLaneSets().get(0).getLanes().get(0);
        assertEquals("my first lane", l.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.Process

    @Test
    public void testSequenceFlowUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("sequenceFlow.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        assertTrue(process.getFlowElements().get(0) instanceof Task);
        Task task = (Task) process.getFlowElements().get(0);
        assertEquals("task1", task.getName());
        Task task2 = (Task) process.getFlowElements().get(1);
        assertEquals("task2", task2.getName());
        SequenceFlow flow = (SequenceFlow) process.getFlowElements().get(2);
        assertEquals("seqFlow", flow.getName());
        assertEquals(task, flow.getSourceRef());
        assertEquals(task2, flow.getTargetRef());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.Process

    @Test
    public void testGatewayUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("gateway.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        ExclusiveGateway g = (ExclusiveGateway) process.getFlowElements().get(0);
        assertEquals("xor gateway", g.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.Process

    @Test
    public void testParallelGatewayUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("parallelGateway.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        ParallelGateway g = (ParallelGateway) process.getFlowElements().get(0);
        assertEquals("parallel gateway", g.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.Process

    @Test
    public void testEventBasedGatewayUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("eventBasedGateway.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        EventBasedGateway g = (EventBasedGateway) process.getFlowElements().get(0);
        assertEquals("event-based gateway", g.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
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.