Examples of signalEvent()


Examples of org.drools.runtime.process.WorkflowProcessInstance.signalEvent()

    } catch (InterruptedException e) {
    }
        assertEquals(4, list.size());
        assertTrue(list.contains("Timer1a"));
        assertTrue(list.contains("Timer2a"));
        processInstance.signalEvent("signal", "End");
        nodeInstances = processInstance.getNodeInstances();
        assertEquals(0, nodeInstances.size());
        assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
        assertEquals(4, list.size());
        try {
View Full Code Here

Examples of org.drools.workflow.instance.node.EventNodeInstance.signalEvent()

      for (Node node : getWorkflowProcess().getNodes()) {
        if (node instanceof EventNodeInterface) {
          if (((EventNodeInterface) node).acceptsEvent(type, event)) {
            if (node instanceof EventNode) {
              EventNodeInstance eventNodeInstance = (EventNodeInstance) getNodeInstance(node);
              eventNodeInstance.signalEvent(type, event);
            } else {
              List<NodeInstance> nodeInstances = getNodeInstances(node
                  .getId());
              if (nodeInstances != null && !nodeInstances.isEmpty()) {
                for (NodeInstance nodeInstance : nodeInstances) {
View Full Code Here

Examples of org.jbpm.process.instance.ProcessInstance.signalEvent()

        Map<String, Object> params = new HashMap<String, Object>();
        params.put("collection", collection);
        ProcessInstance processInstance = ( ProcessInstance )
            workingMemory.startProcess("org.drools.ForEach", params);
        assertEquals(ProcessInstance.STATE_ACTIVE, processInstance.getState());
        processInstance.signalEvent("MyEvent", null);
        assertEquals(ProcessInstance.STATE_COMPLETED, processInstance.getState());
        assertEquals(3, myList.size());
    }
   
}
View Full Code Here

Examples of org.jbpm.workflow.instance.node.EventNodeInstance.signalEvent()

      for (Node node : getWorkflowProcess().getNodes()) {
        if (node instanceof EventNodeInterface) {
          if (((EventNodeInterface) node).acceptsEvent(type, event)) {
            if (node instanceof EventNode && ((EventNode) node).getFrom() == null) {
              EventNodeInstance eventNodeInstance = (EventNodeInstance) getNodeInstance(node);
              eventNodeInstance.signalEvent(type, event);
            } else {
              List<NodeInstance> nodeInstances = getNodeInstances(node
                  .getId());
              if (nodeInstances != null && !nodeInstances.isEmpty()) {
                for (NodeInstance nodeInstance : nodeInstances) {
View Full Code Here

Examples of org.kie.api.runtime.KieSession.signalEvent()

    public Void execute(Context context) {
        KieSession ksession = ((KnowledgeCommandContext) context).getKieSession();
       
        if (processInstanceId == -1) {
            ksession.signalEvent(eventType, event);
        } else {
            ProcessInstance processInstance = ksession.getProcessInstance(processInstanceId);
            if (processInstance != null) {
                processInstance.signalEvent(eventType, event);
            }
View Full Code Here

Examples of org.kie.api.runtime.process.ProcessInstance.signalEvent()

            workItem.setResults(results);
            ProcessInstance processInstance = kruntime.getProcessInstance(workItem.getProcessInstanceId());
            workItem.setState(WorkItem.COMPLETED);
            // process instance may have finished already
            if (processInstance != null) {
                processInstance.signalEvent("workItemCompleted", workItem);
            }
            context.remove(workItemInfo);
            if (workItems != null) {
                this.workItems.remove(workItem.getId());
            }
View Full Code Here

Examples of org.kie.internal.runtime.StatefulKnowledgeSession.signalEvent()

       
        ksession = InfinispanKnowledgeService.loadStatefulKnowledgeSession( id, kbase, null, env );
        processInstance = ksession.getProcessInstance( processInstance.getId() );
        assertNotNull( processInstance );

        ksession.signalEvent("MyEvent1", null, processInstance.getId());

        ksession = InfinispanKnowledgeService.loadStatefulKnowledgeSession( id, kbase, null, env );
        processInstance = ksession.getProcessInstance( processInstance.getId() );
        assertNotNull( processInstance );
View Full Code Here

Examples of org.kie.runtime.KieSession.signalEvent()

    public Object execute(Context context) {
        KieSession ksession = ((KnowledgeCommandContext) context).getKieSession();
       
        if (processInstanceId == -1) {
            ksession.signalEvent(eventType, event);
        } else {
            ProcessInstance processInstance = ksession.getProcessInstance(processInstanceId);
            if (processInstance != null) {
                processInstance.signalEvent(eventType, event);
            }
View Full Code Here

Examples of org.kie.runtime.StatefulKnowledgeSession.signalEvent()

    public Object execute(Context context) {
        StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
       
        if (processInstanceId == -1) {
            ksession.signalEvent(eventType, event);
        } else {
            ProcessInstance processInstance = ksession.getProcessInstance(processInstanceId);
            if (processInstance != null) {
                processInstance.signalEvent(eventType, event);
            }
View Full Code Here

Examples of org.kie.runtime.process.ProcessInstance.signalEvent()

        if (processInstanceId == -1) {
            ksession.signalEvent(eventType, event);
        } else {
            ProcessInstance processInstance = ksession.getProcessInstance(processInstanceId);
            if (processInstance != null) {
                processInstance.signalEvent(eventType, event);
            }
        }
        return null;
    }
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.