Examples of signal()


Examples of java.util.concurrent.locks.Condition.signal()

    // call with lock held!
    private Runnable takeTask() {
        final Condition removeCondition = this.removeCondition;
        Runnable task = queue.poll();
        if (task != null) {
            removeCondition.signal();
            return task;
        } else {
            final Condition enqueueCondition = this.enqueueCondition;
            final long start = System.currentTimeMillis();
            boolean intr = Thread.interrupted();
View Full Code Here

Examples of java.util.concurrent.locks.Condition.signal()

        long start = System.currentTimeMillis();
        Runnable doNothing = new Runnable() {
            public void run() {
                runLock.lock();
                try {
                    runCondition.signal();
                } finally {
                    runLock.unlock();
                }
            }
        };
View Full Code Here

Examples of org.activiti.engine.RuntimeService.signal()

    Mocks.register("mule", muleService);
   
    // Start process instance
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("open-account-mule");
   
    runtimeService.signal(processInstance.getId());
   
    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("approved", true);
   
    Task task = taskService.createTaskQuery().singleResult();
View Full Code Here

Examples of org.activiti.engine.impl.persistence.entity.ExecutionEntity.signal()

                .deleteTask(taskEntity, comment, false);

        if (taskEntity.getExecutionId() != null) {
            ExecutionEntity execution = taskEntity.getExecution();
            execution.removeTask(taskEntity);
            execution.signal(null, null);
        }

        return null;
    }
}
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmExecution.signal()

    expectedEvents.add("start on Activity(wait)");

    assertEquals("expected "+expectedEvents+", but was \n"+eventCollector+"\n", expectedEvents, eventCollector.events);

    PvmExecution execution = processInstance.findExecution("wait");
    execution.signal(null, null);
   
    expectedEvents.add("end on Activity(wait)");
    expectedEvents.add("end on Activity(innerscope)");
    expectedEvents.add("end on Activity(outerscope)");
View Full Code Here

Examples of org.activiti.engine.impl.pvm.PvmProcessInstance.signal()

      }
    }
   
    assertTrue(eventScopeFound);
   
    processInstance.signal(null, null);

    assertTrue(processInstance.isEnded());
        
  }
 
View Full Code Here

Examples of org.activiti.engine.impl.pvm.delegate.SignallableActivityBehavior.signal()

  public void signal(String signalName, Object signalData) {
    ensureActivityInitialized();
    SignallableActivityBehavior activityBehavior = (SignallableActivityBehavior) activity.getActivityBehavior();
    try {
      activityBehavior.signal(this, signalName, signalData);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new PvmException("couldn't process signal '"+signalName+"' on activity '"+activity.getId()+"': "+e.getMessage(), e);
    }
View Full Code Here

Examples of org.activiti.engine.impl.pvm.runtime.InterpretableExecution.signal()

        Object isForCompensation = execution.getActivity().getProperty(BpmnParse.PROPERTYNAME_IS_FOR_COMPENSATION);
        if(isForCompensation != null && (Boolean) isForCompensation) {
         
          InterpretableExecution parentExecution = (InterpretableExecution) execution.getParent();
          ((InterpretableExecution)execution).remove();
          parentExecution.signal("compensationDone", null);           
         
        } else {
         
          if (log.isDebugEnabled()) {
            log.debug("No outgoing sequence flow found for {}. Ending execution.", execution.getActivity().getId());
View Full Code Here

Examples of org.apache.giraph.zk.BspEvent.signal()

    /**
     * Single threaded case
     */
    public void testEvent() {
        BspEvent event = new PredicateLock();
        event.signal();
        boolean gotPredicate = event.waitMsecs(-1);
        assertTrue(gotPredicate == true);
        event.reset();
        gotPredicate = event.waitMsecs(0);
        assertTrue(gotPredicate == false);
View Full Code Here

Examples of org.apache.giraph.zk.PredicateLock.signal()

    /**
     * Single threaded case
     */
    public void testEvent() {
        BspEvent event = new PredicateLock();
        event.signal();
        boolean gotPredicate = event.waitMsecs(-1);
        assertTrue(gotPredicate == true);
        event.reset();
        gotPredicate = event.waitMsecs(0);
        assertTrue(gotPredicate == false);
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.