Package org.camunda.bpm.engine.impl.persistence.entity

Examples of org.camunda.bpm.engine.impl.persistence.entity.TimerEntity


    return null;
  }

  protected void scheduleSuspensionStateUpdate(CommandContext commandContext) {
    TimerEntity timer = new TimerEntity();

    timer.setDuedate(executionDate);
    timer.setJobHandlerType(getDelayedExecutionJobHandlerType());

    String jobConfiguration = null;

    if (processDefinitionId != null) {
      jobConfiguration = TimerChangeProcessDefinitionSuspensionStateJobHandler
          .createJobHandlerConfigurationByProcessDefinitionId(processDefinitionId, includeProcessInstances);
    } else

    if (processDefinitionKey != null) {
      jobConfiguration = TimerChangeProcessDefinitionSuspensionStateJobHandler
          .createJobHandlerConfigurationByProcessDefinitionKey(processDefinitionKey, includeProcessInstances);
    }

    timer.setJobHandlerConfiguration(jobConfiguration);

    commandContext.getJobManager().schedule(timer);
  }
View Full Code Here


  @SuppressWarnings("unchecked")
  protected void addTimerDeclarations(ProcessDefinitionEntity processDefinition) {
    List<TimerDeclarationImpl> timerDeclarations = (List<TimerDeclarationImpl>) processDefinition.getProperty(BpmnParse.PROPERTYNAME_START_TIMER);
    if (timerDeclarations!=null) {
      for (TimerDeclarationImpl timerDeclaration : timerDeclarations) {
        TimerEntity timer = timerDeclaration.createTimerInstance(null);
        timer.setDeploymentId(processDefinition.getDeploymentId());
      }
    }
  }
View Full Code Here

    if (duedate==null) {
      duedate = businessCalendar.resolveDuedate(dueDateString);
    }

    TimerEntity timer = new TimerEntity(this);
    timer.setDuedate(duedate);
    if (execution != null) {
      timer.setExecution(execution);
    }

    if (type == TimerDeclarationType.CYCLE) {

      // See ACT-1427: A boundary timer with a cancelActivity='true', doesn't need to repeat itself
      if (!isInterruptingTimer) {
        String prepared = prepareRepeat(dueDateString);
        timer.setRepeat(prepared);
      }
    }

    return timer;
  }
View Full Code Here

      return null;
    }
  }

  public TimerEntity createTimer(ExecutionEntity execution) {
    TimerEntity timer = super.createJobInstance(execution);
    Context
    .getCommandContext()
    .getJobManager()
    .schedule(timer);
    return timer;
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.persistence.entity.TimerEntity

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.