Examples of SkipStrategy


Examples of com.founder.fix.bpmn2extensions.fixflow.SkipStrategy

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetSkipStrategy(SkipStrategy newSkipStrategy, NotificationChain msgs) {
    SkipStrategy oldSkipStrategy = skipStrategy;
    skipStrategy = newSkipStrategy;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FixFlowPackage.DOCUMENT_ROOT__SKIP_STRATEGY, oldSkipStrategy, newSkipStrategy);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

Examples of com.founder.fix.bpmn2extensions.fixflow.SkipStrategy

  }

  // 覆写父类的跳过执行方法
  protected void skipExecute(ExecutionContext executionContext) {

    SkipStrategy skipStrategy = executionContext.getSkipStrategy();
    SkipAssignee skipAssignee = skipStrategy.getSkipAssignee();
    SkipComment skipComment = skipStrategy.getSkipComment();

    String skipAssigneeString = null;
    String skipCommentString = null;

    if (skipAssignee != null && skipAssignee.getExpression() != null) {
View Full Code Here

Examples of com.founder.fix.bpmn2extensions.fixflow.SkipStrategy

            propertiesNode.put(PROPERTY_MULTIINSTANCE_CONDITION, BpmnModelUtil.getExpression(loopDef.getCompletionCondition()));
          }
      }
     
    //跳过策略
      SkipStrategy skipStrategy = activity.getSkipStrategy();
      if(skipStrategy !=null){
        setPropertyValue(PROPERTY_ACTIVITY_SKIPSTRATEGY, StringUtil.getString(skipStrategy.isIsEnable()), propertiesNode);
        setPropertyValue(PROPERTY_ACTIVITY_IS_CREATE_SKIP_PROCESS, StringUtil.getString(skipStrategy.isIsCreateSkipProcess()), propertiesNode);
        SkipAssignee skipAssignee = skipStrategy.getSkipAssignee();
        if(skipAssignee != null){
          setPropertyValue(PROPERTY_ACTIVITY_SKIPASSIGNEE, skipAssignee.getExpression().getValue(), propertiesNode);
        }
        SkipComment skipComment = skipStrategy.getSkipComment();
        if(skipComment !=null){
          setPropertyValue(PROPERTY_ACTIVITY_SKIPCOMMENT, skipComment.getExpression().getValue(), propertiesNode);
        }
        Expression skipExpression = skipStrategy.getExpression();
        if(skipExpression !=null){
          setPropertyValue(PROPERTY_ACTIVITY_SKIPEXPRESSION, skipExpression.getValue(), propertiesNode);
        }
      }
     
View Full Code Here

Examples of com.founder.fix.bpmn2extensions.fixflow.SkipStrategy

      boolean isSkipEnabled = false;
      if(skipEnabled !=null){
        isSkipEnabled = getProperty(PROPERTY_ACTIVITY_SKIPSTRATEGY,elementNode).asBoolean();
      }
      if(isSkipEnabled){
        SkipStrategy skipStrategy = FixFlowFactory.eINSTANCE.createSkipStrategy();
        skipStrategy.setIsEnable(isSkipEnabled);
        String skipExpressionValue = getPropertyValueAsString(PROPERTY_ACTIVITY_SKIPEXPRESSION, elementNode);
        String skipAssigneeValue = getPropertyValueAsString(PROPERTY_ACTIVITY_SKIPASSIGNEE, elementNode);
        String skipCommentValue = getPropertyValueAsString(PROPERTY_ACTIVITY_SKIPCOMMENT, elementNode);
        Expression skipExpression = FixFlowFactory.eINSTANCE.createExpression();
        skipExpression.setName(skipExpressionValue);
        skipExpression.setValue(skipExpressionValue);
        skipStrategy.setExpression(skipExpression);
       
        boolean isCreateSkipProcess = getProperty(PROPERTY_ACTIVITY_IS_CREATE_SKIP_PROCESS, elementNode).asBoolean();
        if(isCreateSkipProcess){
          skipStrategy.setIsCreateSkipProcess(isCreateSkipProcess);
        }
       
        Expression skipAssigneeExpression = FixFlowFactory.eINSTANCE.createExpression();
        skipAssigneeExpression.setName(skipAssigneeValue);
        skipAssigneeExpression.setValue(skipAssigneeValue);
        SkipAssignee skipAssignee = FixFlowFactory.eINSTANCE.createSkipAssignee();
        skipAssignee.setExpression(skipAssigneeExpression);
        skipStrategy.setSkipAssignee(skipAssignee);
       
        Expression skipCommentExpression = FixFlowFactory.eINSTANCE.createExpression();
        skipCommentExpression.setName(skipCommentValue);
        skipCommentExpression.setValue(skipCommentValue);
        SkipComment skipComment = FixFlowFactory.eINSTANCE.createSkipComment();
        skipComment.setExpression(skipCommentExpression);
        skipStrategy.setSkipComment(skipComment);
       
        BpmnModelUtil.addExtensionElement(activity, FixFlowPackage.Literals.DOCUMENT_ROOT__SKIP_STRATEGY, skipStrategy);
      }
     
      ConnectorInstanceElm cie = new ConnectorInstanceElm();
View Full Code Here

Examples of com.founder.fix.bpmn2extensions.fixflow.SkipStrategy

    // 移除临时执行内容对象
    executionContext.clearExecutionContextData();


    //获取跳过策略设置
    SkipStrategy skipStrategy = getSkipStrategy();


    if (skipStrategy != null) {

      boolean isEnable = skipStrategy.isIsEnable();

      // 判断是否启用
      if (isEnable) {
        //启用跳过策略处理的情况
       
        LOG.debug("节点: {}({}) 启用跳过策略.", this.getName(),this.getId());
       
        boolean valueObj = false;
       
        //处理跳过策略表达式
        if (skipStrategy.getExpression() != null) {
         
          String expressionValue = skipStrategy.getExpression().getValue();
         
          if (expressionValue != null && !expressionValue.equals("")) {
            try {
             
              LOG.debug("节点: {}({}) 跳过策略开始直接,跳过策略表达式内容为:\n {}", this.getName(),this.getId(),expressionValue);
             
              //执行验证表达式
              valueObj = StringUtil.getBoolean(ExpressionMgmt.execute(expressionValue, executionContext));
             
              LOG.debug("节点: {}({}) 跳过策略直接结束,结果为 '{}'.", this.getName(),this.getId(),valueObj);
             
            } catch (Exception e) {
             
              LOG.error("节点: "+this.getName()+"("+this.getId()+") 跳过策略执行出错,错误信息: 【"+e.getMessage()+"】.", e);
             
              throw new FixFlowExpressionException(ExceptionCode.EXPRESSION_EXCEPTION_SKIPSTRATEGY,this.getId(),this.getName(),expressionValue,e);
             
            }
          }
        }

        if (valueObj) {

          // 直接跳过
          boolean isCreateSkipProcess = skipStrategy.isIsCreateSkipProcess();

          if (isCreateSkipProcess) {
             
            executionContext.setSkipStrategy(skipStrategy);
           
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.