Examples of findActivity()


Examples of org.activiti.engine.impl.pvm.process.ProcessDefinitionImpl.findActivity()

  protected void executeParse(BpmnParse bpmnParse, UserTask userTask) {
    super.executeParse(bpmnParse, userTask);

    ScopeImpl scope = bpmnParse.getCurrentScope();
    ProcessDefinitionImpl processDefinition = scope.getProcessDefinition();
    ActivityImpl activity = processDefinition.findActivity(userTask.getId());

    SimulatorParserUtils.setSimulationBehavior(scope, userTask);

    UserTaskActivityBehavior userTaskActivity = (UserTaskActivityBehavior) activity.getActivityBehavior();
    userTaskActivity.getTaskDefinition().addTaskListener(eventName, taskListener);
View Full Code Here

Examples of org.activiti.engine.impl.pvm.process.ProcessDefinitionImpl.findActivity()

  static void setSimulationBehavior(ScopeImpl scope, BaseElement baseElement) {

    String behaviorClassName = getBehaviorClassName(baseElement);
    if (behaviorClassName != null) {
      ProcessDefinitionImpl processDefinition = scope.getProcessDefinition();
      ActivityImpl activity = processDefinition.findActivity(baseElement.getId());

      LOG.debug("Scripting task [" + activity.getId() + "] setting behavior to [" + behaviorClassName + "]");
      try {
        @SuppressWarnings("unchecked")
        Class<AbstractSimulationActivityBehavior> behaviorClass = (Class<AbstractSimulationActivityBehavior>) Class.forName(behaviorClassName);
View Full Code Here

Examples of org.activiti.engine.impl.pvm.process.ScopeImpl.findActivity()

  protected void executeParse(BpmnParse bpmnParse, CompensateEventDefinition eventDefinition) {
   
    ScopeImpl scope = bpmnParse.getCurrentScope();
    if(StringUtils.isNotEmpty(eventDefinition.getActivityRef())) {
      if(scope.findActivity(eventDefinition.getActivityRef()) == null) {
        logger.warn("Invalid attribute value for 'activityRef': no activity with id '" + eventDefinition.getActivityRef() +
            "' in current scope " + scope.getId());
      }
    }
   
View Full Code Here

Examples of org.activiti.engine.impl.pvm.process.ScopeImpl.findActivity()

  protected void executeParse(BpmnParse bpmnParse, SequenceFlow sequenceFlow) {
   
    ScopeImpl scope = bpmnParse.getCurrentScope();

    ActivityImpl sourceActivity = scope.findActivity(sequenceFlow.getSourceRef());
    ActivityImpl destinationActivity = scope.findActivity(sequenceFlow.getTargetRef());

    TransitionImpl transition = sourceActivity.createOutgoingTransition(sequenceFlow.getId());
    bpmnParse.getSequenceFlows().put(sequenceFlow.getId(), transition);
    transition.setProperty("name", sequenceFlow.getName());
View Full Code Here

Examples of org.activiti.engine.impl.pvm.process.ScopeImpl.findActivity()

  protected void executeParse(BpmnParse bpmnParse, SequenceFlow sequenceFlow) {
   
    ScopeImpl scope = bpmnParse.getCurrentScope();

    ActivityImpl sourceActivity = scope.findActivity(sequenceFlow.getSourceRef());
    ActivityImpl destinationActivity = scope.findActivity(sequenceFlow.getTargetRef());

    TransitionImpl transition = sourceActivity.createOutgoingTransition(sequenceFlow.getId());
    bpmnParse.getSequenceFlows().put(sequenceFlow.getId(), transition);
    transition.setProperty("name", sequenceFlow.getName());
    transition.setProperty("documentation", sequenceFlow.getDocumentation());
View Full Code Here

Examples of org.activiti.engine.impl.pvm.process.ScopeImpl.findActivity()

    } else {
     
      ScopeImpl scope = bpmnParse.getCurrentScope();
      String eventBasedGatewayId = getPrecedingEventBasedGateway(bpmnParse, event);
      if (eventBasedGatewayId  != null) {
        ActivityImpl gatewayActivity = scope.findActivity(eventBasedGatewayId);
        nestedActivity = createActivityOnScope(bpmnParse, event, BpmnXMLConstants.ELEMENT_EVENT_CATCH, gatewayActivity);
      } else {
        nestedActivity = createActivityOnScope(bpmnParse, event, BpmnXMLConstants.ELEMENT_EVENT_CATCH, scope);
      }
     
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition.findActivity()

      .createActivity("A")
        .behavior(new MilestoneActivityBehavior())
      .endActivity()
      .buildCaseDefinition();

    CmmnActivity activity = caseDefinition.findActivity("A");

    // a pseudo sentry
    CmmnSentryDeclaration sentryDeclaration = new CmmnSentryDeclaration("X");
    caseDefinition.findActivity("Case1").addSentry(sentryDeclaration);
    activity.addEntryCriteria(sentryDeclaration);
View Full Code Here

Examples of org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition.findActivity()

    CmmnActivity activity = caseDefinition.findActivity("A");

    // a pseudo sentry
    CmmnSentryDeclaration sentryDeclaration = new CmmnSentryDeclaration("X");
    caseDefinition.findActivity("Case1").addSentry(sentryDeclaration);
    activity.addEntryCriteria(sentryDeclaration);

    CmmnOnPartDeclaration onPartDeclaration = new CmmnOnPartDeclaration();
    onPartDeclaration.setSource(new CmmnActivity("B", caseDefinition));
    onPartDeclaration.setStandardEvent("complete");
View Full Code Here

Examples of org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity.findActivity()

      }
    });

    // Test that the process definition has been deployed
    assertNotNull(processDefinitionEntity);
    ActivityImpl activity = processDefinitionEntity.findActivity("ExclusiveGateway_1");
    assertNotNull(activity);

    // Test that the conditions has been resolved
    for (PvmTransition transition : activity.getOutgoingTransitions()) {
      if (transition.getDestination().getId().equals("Task_2")) {
View Full Code Here

Examples of org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity.findActivity()

    new MessageEventReceivedCmd(messageName, correlationResult.getExecutionEntity().getId(), processVariables).execute(commandContext);
  }

  protected void instantiateProcess(CommandContext commandContext, MessageCorrelationResult correlationResult) {
    ProcessDefinitionEntity processDefinitionEntity = correlationResult.getProcessDefinitionEntity();
    ActivityImpl messageStartEvent = processDefinitionEntity.findActivity(correlationResult.getStartEventActivityId());
    ExecutionEntity processInstance = processDefinitionEntity.createProcessInstance(businessKey, messageStartEvent);
    processInstance.start(processVariables);
  }

}
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.