Package org.activiti.engine.impl.pvm.process

Examples of org.activiti.engine.impl.pvm.process.ActivityImpl


    org.activiti.engine.impl.bpmn.parser.CompensateEventDefinition compensateEventDefinition =
            new org.activiti.engine.impl.bpmn.parser.CompensateEventDefinition();
    compensateEventDefinition.setActivityRef(eventDefinition.getActivityRef());
    compensateEventDefinition.setWaitForCompletion(eventDefinition.isWaitForCompletion());
   
    ActivityImpl activity = bpmnParse.getCurrentActivity();
    if (bpmnParse.getCurrentFlowElement() instanceof ThrowEvent) {
     
      activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateThrowCompensationEventActivityBehavior((ThrowEvent) bpmnParse.getCurrentFlowElement(), compensateEventDefinition));
     
    } else if (bpmnParse.getCurrentFlowElement() instanceof BoundaryEvent) {
    
      BoundaryEvent boundaryEvent = (BoundaryEvent) bpmnParse.getCurrentFlowElement();
      boolean interrupting = boundaryEvent.isCancelActivity();
     
      activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createBoundaryEventActivityBehavior(boundaryEvent, interrupting, activity));
      activity.setProperty("type", "compensationBoundaryCatch");
     
    } else {
     
      // What to do?
     
View Full Code Here


  public Class< ? extends BaseElement> getHandledType() {
    return ParallelGateway.class;
  }
 
  protected void executeParse(BpmnParse bpmnParse, ParallelGateway gateway) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, gateway, BpmnXMLConstants.ELEMENT_GATEWAY_PARALLEL);
   
    activity.setAsync(gateway.isAsynchronous());
    activity.setExclusive(!gateway.isNotExclusive());
   
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createParallelGatewayActivityBehavior(gateway));
  }
View Full Code Here

    return CancelEventDefinition.class;
  }

  protected void executeParse(BpmnParse bpmnParse, CancelEventDefinition cancelEventDefinition) {
    if (bpmnParse.getCurrentFlowElement() instanceof BoundaryEvent) {
      ActivityImpl activity = bpmnParse.getCurrentActivity();
      activity.setProperty("type", "cancelBoundaryCatch");
      activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createCancelBoundaryEventActivityBehavior(cancelEventDefinition));
    }

  }
View Full Code Here

  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

  public Class< ? extends BaseElement> getHandledType() {
    return ExclusiveGateway.class;
  }
 
  protected void executeParse(BpmnParse bpmnParse, ExclusiveGateway gateway) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, gateway, BpmnXMLConstants.ELEMENT_GATEWAY_EXCLUSIVE);
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createExclusiveGatewayActivityBehavior(gateway));
  }
View Full Code Here

  }
 
  protected void executeParse(BpmnParse bpmnParse, IntermediateCatchEvent event) {
   
    BpmnModel bpmnModel = bpmnParse.getBpmnModel();
    ActivityImpl nestedActivity = null;
    EventDefinition eventDefinition = null;
    if (!event.getEventDefinitions().isEmpty()) {
      eventDefinition = event.getEventDefinitions().get(0);
    }
  
    if (eventDefinition == null) {
     
      nestedActivity = createActivityOnCurrentScope(bpmnParse, event, BpmnXMLConstants.ELEMENT_EVENT_CATCH);
     
    } 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

  public Class< ? extends BaseElement> getHandledType() {
    return EventGateway.class;
  }
 
  protected void executeParse(BpmnParse bpmnParse, EventGateway gateway) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, gateway, BpmnXMLConstants.ELEMENT_GATEWAY_EVENT);  
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createEventBasedGatewayActivityBehavior(gateway));
    activity.setScope(true);
  }
View Full Code Here

    if (StringUtils.isEmpty(scriptTask.getScript())) {
      logger.warn("No script provided for scriptTask " + scriptTask.getId());
    }
   
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, scriptTask, BpmnXMLConstants.ELEMENT_TASK_SCRIPT);
   
    activity.setAsync(scriptTask.isAsynchronous());
    activity.setExclusive(!scriptTask.isNotExclusive());

    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createScriptTaskActivityBehavior(scriptTask));
   
  }
View Full Code Here

    return Transaction.class;
  }
 
  protected void executeParse(BpmnParse bpmnParse, Transaction transaction) {
   
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, transaction, BpmnXMLConstants.ELEMENT_TRANSACTION);
   
    activity.setAsync(transaction.isAsynchronous());
    activity.setExclusive(!transaction.isNotExclusive());
   
    activity.setScope(true);
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createTransactionActivityBehavior(transaction));
   

    bpmnParse.setCurrentScope(activity);
   
    bpmnParse.processFlowElements(transaction.getFlowElements());
    processArtifacts(bpmnParse, transaction.getArtifacts(), activity);
   
    bpmnParse.removeCurrentScope();
   
    if (transaction.getIoSpecification() != null) {
      IOSpecification ioSpecification = createIOSpecification(bpmnParse, transaction.getIoSpecification());
      activity.setIoSpecification(ioSpecification);
    }

  }
View Full Code Here

  public Class< ? extends BaseElement> getHandledType() {
    return InclusiveGateway.class;
  }
 
  protected void executeParse(BpmnParse bpmnParse, InclusiveGateway gateway) {
    ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, gateway, BpmnXMLConstants.ELEMENT_GATEWAY_INCLUSIVE);
   
    activity.setAsync(gateway.isAsynchronous());
    activity.setExclusive(!gateway.isNotExclusive());
   
    activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createInclusiveGatewayActivityBehavior(gateway));
  }
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.pvm.process.ActivityImpl

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.