• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java BoundaryEventActivityBehavior类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior的典型用法代码示例。如果您正苦于以下问题:Java BoundaryEventActivityBehavior类的具体用法?Java BoundaryEventActivityBehavior怎么用?Java BoundaryEventActivityBehavior使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

BoundaryEventActivityBehavior类属于org.activiti.engine.impl.bpmn.behavior包,在下文中一共展示了BoundaryEventActivityBehavior类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: dispatchActivitiesCanceledIfNeeded

点赞 2

import org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior; //导入依赖的package包/类
protected void dispatchActivitiesCanceledIfNeeded(EventSubscriptionEntity eventSubscription, ExecutionEntity execution, ActivityImpl boundaryEventActivity, CommandContext commandContext) {
    ActivityBehavior boundaryActivityBehavior = boundaryEventActivity.getActivityBehavior();
    if (boundaryActivityBehavior instanceof BoundaryEventActivityBehavior) {
        BoundaryEventActivityBehavior boundaryEventActivityBehavior = (BoundaryEventActivityBehavior) boundaryActivityBehavior;
        if (boundaryEventActivityBehavior.isInterrupting()) {
            dispatchExecutionCancelled(eventSubscription, execution, commandContext);
        }
    }
}
 

开发者ID:flowable,
项目名称:flowable-engine,
代码行数:10,
代码来源:AbstractEventHandler.java

示例2: dispatchActivityTimeoutIfNeeded

点赞 2

import org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior; //导入依赖的package包/类
protected void dispatchActivityTimeoutIfNeeded(Job timerEntity, ExecutionEntity execution, CommandContext commandContext) {

        String nestedActivityId = TimerEventHandler.getActivityIdFromConfiguration(timerEntity.getJobHandlerConfiguration());

        ActivityImpl boundaryEventActivity = execution.getProcessDefinition().findActivity(nestedActivityId);
        ActivityBehavior boundaryActivityBehavior = boundaryEventActivity.getActivityBehavior();
        if (boundaryActivityBehavior instanceof BoundaryEventActivityBehavior) {
            BoundaryEventActivityBehavior boundaryEventActivityBehavior = (BoundaryEventActivityBehavior) boundaryActivityBehavior;
            if (boundaryEventActivityBehavior.isInterrupting()) {
                dispatchExecutionTimeOut(timerEntity, execution, commandContext);
            }
        }
    }
 

开发者ID:flowable,
项目名称:flowable-engine,
代码行数:14,
代码来源:TimerExecuteNestedActivityJobHandler.java

示例3: createBoundaryEventActivityBehavior

点赞 2

import org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior; //导入依赖的package包/类
@Override
public BoundaryEventActivityBehavior createBoundaryEventActivityBehavior(
        BoundaryEvent boundaryEvent, boolean interrupting,
        ActivityImpl activity) {
    return wrappedActivityBehaviorFactory.createBoundaryEventActivityBehavior(boundaryEvent, interrupting, activity);
}
 

开发者ID:flowable,
项目名称:flowable-engine,
代码行数:7,
代码来源:TestActivityBehaviorFactory.java

示例4: createBoundaryEventActivityBehavior

点赞 2

import org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior; //导入依赖的package包/类
@Override
public BoundaryEventActivityBehavior createBoundaryEventActivityBehavior(BoundaryEvent boundaryEvent, boolean interrupting, ActivityImpl activity) {
    return new BoundaryEventActivityBehavior(interrupting, activity.getId());
}
 

开发者ID:flowable,
项目名称:flowable-engine,
代码行数:5,
代码来源:DefaultActivityBehaviorFactory.java

示例5: parseBoundaryEvents

点赞 2

import org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior; //导入依赖的package包/类
/**
 * Parses the boundary events of a certain 'level' (process, subprocess or
 * other scope).
 * 
 * Note that the boundary events are not parsed during the parsing of the bpmn
 * activities, since the semantics are different (boundaryEvent needs to be
 * added as nested activity to the reference activity on PVM level).
 * 
 * @param parentElement
 *          The 'parent' element that contains the activities (process,
 *          subprocess).
 * @param scopeElement
 *          The {@link ScopeImpl} to which the activities must be added.
 */
public void parseBoundaryEvents(Element parentElement, ScopeImpl scopeElement) {
  for (Element boundaryEventElement : parentElement.elements("boundaryEvent")) {

    // The boundary event is attached to an activity, reference by the
    // 'attachedToRef' attribute
    String attachedToRef = boundaryEventElement.attribute("attachedToRef");
    if (attachedToRef == null || attachedToRef.equals("")) {
      addError("AttachedToRef is required when using a timerEventDefinition", boundaryEventElement);
    }

    // Representation structure-wise is a nested activity in the activity to
    // which its attached
    String id = boundaryEventElement.attribute("id");
    if (LOGGER.isLoggable(Level.FINE)) {
      LOGGER.fine("Parsing boundary event " + id);
    }

    ActivityImpl parentActivity = scopeElement.findActivity(attachedToRef);
    if (parentActivity == null) {
      addError("Invalid reference in boundary event. Make sure that the referenced activity is " + "defined in the same scope as the boundary event",
              boundaryEventElement);
    }
    ActivityImpl nestedActivity = createActivityOnScope(boundaryEventElement, parentActivity);

    String cancelActivity = boundaryEventElement.attribute("cancelActivity", "true");
    boolean interrupting = cancelActivity.equals("true") ? true : false;

    // Catch event behavior is the same for all types
    BoundaryEventActivityBehavior behavior = new BoundaryEventActivityBehavior(interrupting);
    nestedActivity.setActivityBehavior(behavior);

    // Depending on the sub-element definition, the correct activityBehavior
    // parsing is selected
    Element timerEventDefinition = boundaryEventElement.element("timerEventDefinition");
    Element errorEventDefinition = boundaryEventElement.element("errorEventDefinition");
    if (timerEventDefinition != null) {
      parseBoundaryTimerEventDefinition(timerEventDefinition, interrupting, nestedActivity);
    } else if (errorEventDefinition != null) {
      interrupting = true; // non-interrupting not yet supported
      parseBoundaryErrorEventDefinition(errorEventDefinition, interrupting, parentActivity, nestedActivity);
    } else {
      addError("Unsupported boundary event type", boundaryEventElement);
    }
  }
}
 

开发者ID:logicalhacking,
项目名称:SecureBPMN,
代码行数:60,
代码来源:BpmnParse.java

示例6: parseBoundaryEvents

点赞 2

import org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior; //导入依赖的package包/类
/**
 * Parses the boundary events of a certain 'level' (process, subprocess or
 * other scope).
 * 
 * Note that the boundary events are not parsed during the parsing of the bpmn
 * activities, since the semantics are different (boundaryEvent needs to be
 * added as nested activity to the reference activity on PVM level).
 * 
 * @param parentElement
 *          The 'parent' element that contains the activities (process,
 *          subprocess).
 * @param scopeElement
 *          The {@link ScopeImpl} to which the activities must be added.
 */
public void parseBoundaryEvents(Element parentElement, ScopeImpl scopeElement) {
  for (Element boundaryEventElement : parentElement.elements("boundaryEvent")) {

    // The boundary event is attached to an activity, reference by the
    // 'attachedToRef' attribute
    String attachedToRef = boundaryEventElement.attribute("attachedToRef");
    if (attachedToRef == null || attachedToRef.equals("")) {
      addError("AttachedToRef is required when using a timerEventDefinition", boundaryEventElement);
    }

    // Representation structure-wise is a nested activity in the activity to
    // which its attached
    String id = boundaryEventElement.attribute("id");
    if (LOGGER.isLoggable(Level.FINE)) {
      LOGGER.fine("Parsing boundary event " + id);
    }

    ActivityImpl parentActivity = scopeElement.findActivity(attachedToRef);
    if (parentActivity == null) {
      addError("Invalid reference in boundary event. Make sure that the referenced activity is " + "defined in the same scope as the boundary event",
              boundaryEventElement);
    }
   
    ActivityImpl nestedActivity = createActivityOnScope(boundaryEventElement, parentActivity);

    String cancelActivity = boundaryEventElement.attribute("cancelActivity", "true");
    boolean interrupting = cancelActivity.equals("true") ? true : false;

    // Catch event behavior is the same for most types
    ActivityBehavior behavior = new BoundaryEventActivityBehavior(interrupting);

    // Depending on the sub-element definition, the correct activityBehavior
    // parsing is selected
    Element timerEventDefinition = boundaryEventElement.element("timerEventDefinition");
    Element errorEventDefinition = boundaryEventElement.element("errorEventDefinition");
    Element signalEventDefinition = boundaryEventElement.element("signalEventDefinition");
    Element cancelEventDefinition = boundaryEventElement.element("cancelEventDefinition");
    Element compensateEventDefinition = boundaryEventElement.element("compensateEventDefinition");
    if (timerEventDefinition != null) {
      parseBoundaryTimerEventDefinition(timerEventDefinition, interrupting, nestedActivity);
    } else if (errorEventDefinition != null) {
      interrupting = true; // non-interrupting not yet supported
      parseBoundaryErrorEventDefinition(errorEventDefinition, interrupting, parentActivity, nestedActivity);
    } else if (signalEventDefinition != null) {
      parseBoundarySignalEventDefinition(signalEventDefinition, interrupting, nestedActivity);
    } else if (cancelEventDefinition != null) {
      // always interrupting
      behavior = parseBoundaryCancelEventDefinition(cancelEventDefinition, nestedActivity);
    } else if(compensateEventDefinition != null) {
      parseCatchCompensateEventDefinition(compensateEventDefinition, nestedActivity);      
    } else {
      addError("Unsupported boundary event type", boundaryEventElement);
    }

    nestedActivity.setActivityBehavior(behavior);
  }
}
 

开发者ID:iotsap,
项目名称:FiWare-Template-Handler,
代码行数:72,
代码来源:BpmnParse.java

示例7: createBoundaryEventActivityBehavior

点赞 2

import org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior; //导入依赖的package包/类
public BoundaryEventActivityBehavior createBoundaryEventActivityBehavior(BoundaryEvent boundaryEvent, boolean interrupting, ActivityImpl activity) {
  return new BoundaryEventActivityBehavior(interrupting, activity.getId());
}
 

开发者ID:springvelocity,
项目名称:xbpm5,
代码行数:4,
代码来源:DefaultActivityBehaviorFactory.java

示例8: createBoundaryEventActivityBehavior

点赞 1

import org.activiti.engine.impl.bpmn.behavior.BoundaryEventActivityBehavior; //导入依赖的package包/类
public abstract BoundaryEventActivityBehavior createBoundaryEventActivityBehavior(BoundaryEvent boundaryEvent, boolean interrupting, ActivityImpl activity); 

开发者ID:flowable,
项目名称:flowable-engine,
代码行数:2,
代码来源:ActivityBehaviorFactory.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)