亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? graphelement.java

?? jboss jpdl-3.2.2 nolib
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * JBoss, Home of Professional Open Source
 * Copyright 2005, JBoss Inc., and individual contributors as indicated
 * by the @authors tag. See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.jbpm.graph.def;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jbpm.JbpmException;
import org.jbpm.context.exe.ContextInstance;
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.RuntimeAction;
import org.jbpm.graph.exe.Token;
import org.jbpm.graph.log.ActionLog;
import org.jbpm.instantiation.UserCodeInterceptor;
import org.jbpm.instantiation.UserCodeInterceptorConfig;
import org.jbpm.job.ExecuteActionJob;
import org.jbpm.msg.MessageService;
import org.jbpm.svc.Services;
import org.jbpm.taskmgmt.def.AssignmentHandler;
import org.jbpm.taskmgmt.def.TaskControllerHandler;
import org.jbpm.taskmgmt.exe.TaskInstance;
import org.jbpm.util.EqualsUtil;

public abstract class GraphElement implements Serializable {
  
  private static final long serialVersionUID = 1L;

  long id = 0;
  protected String name = null;
  protected String description = null;
  protected ProcessDefinition processDefinition = null;
  protected Map events = null;
  protected List exceptionHandlers = null;

  public GraphElement() {
  }
  
  public GraphElement( String name ) {
    setName( name );
  }

  // events ///////////////////////////////////////////////////////////////////

  /**
   * indicative set of event types supported by this graph element.
   * this is currently only used by the process designer to know which 
   * event types to show on a given graph element.  in process definitions 
   * and at runtime, there are no contstraints on the event-types.
   */
  public abstract String[] getSupportedEventTypes();

  /**
   * gets the events, keyd by eventType (java.lang.String).
   */
  public Map getEvents() {
    return events;
  }

  public boolean hasEvents() {
    return ( (events!=null)
             && (events.size()>0) );
  }

  public Event getEvent(String eventType) {
    Event event = null;
    if (events!=null) {
      event = (Event) events.get(eventType);
    }
    return event;
  }
  
  public boolean hasEvent(String eventType) {
    boolean hasEvent = false;
    if (events!=null) {
      hasEvent = events.containsKey(eventType);
    }
    return hasEvent;
  }
  
  public Event addEvent(Event event) {
    if (event == null) throw new IllegalArgumentException("can't add a null event to a graph element");
    if (event.getEventType() == null) throw new IllegalArgumentException("can't add an event without an eventType to a graph element");
    if (events == null) events = new HashMap();
    events.put(event.getEventType(), event);
    event.graphElement = this;
    return event;
  }
  
  public Event removeEvent(Event event) {
    Event removedEvent = null;
    if (event == null) throw new IllegalArgumentException("can't remove a null event from a graph element");
    if (event.getEventType() == null) throw new IllegalArgumentException("can't remove an event without an eventType from a graph element");
    if (events != null) {
      removedEvent = (Event) events.remove(event.getEventType());
      if (removedEvent!=null) {
        event.graphElement = null;
      }
    }
    return removedEvent;
  }

  // exception handlers ///////////////////////////////////////////////////////

  /**
   * is the list of exception handlers associated to this graph element.
   */
  public List getExceptionHandlers() {
    return exceptionHandlers;
  }
  
  public ExceptionHandler addExceptionHandler(ExceptionHandler exceptionHandler) {
    if (exceptionHandler == null) throw new IllegalArgumentException("can't add a null exceptionHandler to a graph element");
    if (exceptionHandlers == null) exceptionHandlers = new ArrayList();
    exceptionHandlers.add(exceptionHandler);
    exceptionHandler.graphElement = this;
    return exceptionHandler;
  }
  
  public void removeExceptionHandler(ExceptionHandler exceptionHandler) {
    if (exceptionHandler == null) throw new IllegalArgumentException("can't remove a null exceptionHandler from an graph element");
    if (exceptionHandlers != null) {
      if (exceptionHandlers.remove(exceptionHandler)) {
        exceptionHandler.graphElement = null;
      }
    }
  }

  public void reorderExceptionHandler(int oldIndex, int newIndex) {
    if ( (exceptionHandlers!=null)
         && (Math.min(oldIndex, newIndex)>=0)
         && (Math.max(oldIndex, newIndex)<exceptionHandlers.size()) ) {
      Object o = exceptionHandlers.remove(oldIndex);
      exceptionHandlers.add(newIndex, o);
    } else {
      throw new IndexOutOfBoundsException("couldn't reorder element from index '"+oldIndex+"' to index '"+newIndex+"' in exceptionHandler-list '"+exceptionHandlers+"'");
    }
  }

  // event handling ///////////////////////////////////////////////////////////

  public void fireEvent(String eventType, ExecutionContext executionContext) {
    Token token = executionContext.getToken();

    log.debug( "event '"+eventType+"' on '"+this+"' for '"+token+"'" );

    try {
      executionContext.setEventSource(this);
      fireAndPropagateEvent(eventType, executionContext);
    } finally {
      executionContext.setEventSource(null);
    }
  }

  public void fireAndPropagateEvent(String eventType, ExecutionContext executionContext) {
    // calculate if the event was fired on this element or if it was a propagated event
    boolean isPropagated = !(this.equals(executionContext.getEventSource()));
    
    // execute static actions 
    Event event = getEvent(eventType);
    if (event!=null) {
      // update the context
      executionContext.setEvent(event);
      // execute the static actions specified in the process definition
      executeActions(event.getActions(), executionContext, isPropagated);
    }
    
    // execute the runtime actions
    List runtimeActions = getRuntimeActionsForEvent(executionContext, eventType);
    executeActions(runtimeActions, executionContext, isPropagated);

    // remove the event from the context
    executionContext.setEvent(null);
    
    // propagate the event to the parent element
    GraphElement parent = getParent();
    if (parent!=null) {
      parent.fireAndPropagateEvent(eventType, executionContext);
    }
  }

  void executeActions(List actions, ExecutionContext executionContext, boolean isPropagated) {
    if (actions!=null) {
      Iterator iter = actions.iterator();
      while (iter.hasNext()) {
        Action action = (Action) iter.next();
        if ( action.acceptsPropagatedEvents()
             || (!isPropagated)
           ) {
          if (action.isAsync()) {
            ExecuteActionJob job = createAsyncActionExecutionJob(executionContext.getToken(), action);
            MessageService messageService = (MessageService) Services.getCurrentService(Services.SERVICENAME_MESSAGE);
            messageService.send(job);
          } else {
            executeAction(action, executionContext);
          }
        }
      }
    }
  }
  
  protected ExecuteActionJob createAsyncActionExecutionJob(Token token, Action action) {
    ExecuteActionJob job = new ExecuteActionJob(token);
    job.setAction(action);
    job.setDueDate(new Date());
    job.setExclusive(action.isAsyncExclusive());
    return job;
  }

  public void executeAction(Action action, ExecutionContext executionContext) {
    Token token = executionContext.getToken();

    // create action log
    ActionLog actionLog = new ActionLog(action);
    token.startCompositeLog(actionLog);

    // if this is an action being executed in an event, 
    // the token needs to be locked.  if this is an action 
    // being executed as the node behaviour or if the token 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91激情五月电影| 日韩精品在线网站| 欧美videofree性高清杂交| 国产精品嫩草影院com| 午夜伦欧美伦电影理论片| 成人精品国产免费网站| 欧美精选一区二区| 亚洲品质自拍视频| 国产精品888| 日韩精品一区二区三区在线播放| 亚洲啪啪综合av一区二区三区| 国产精品一区免费在线观看| 欧美日韩国产电影| 亚洲免费电影在线| 成人av先锋影音| 久久先锋资源网| 蜜臀精品一区二区三区在线观看 | 韩国av一区二区| 欧美高清www午色夜在线视频| 亚洲图片激情小说| 国产成人av福利| 精品少妇一区二区三区在线播放| 亚洲电影欧美电影有声小说| 成人午夜av电影| 久久久久久久久久久电影| 青青草精品视频| 欧美综合欧美视频| 樱桃国产成人精品视频| 99久久精品免费| 亚洲欧洲国产专区| 色拍拍在线精品视频8848| 日韩美女精品在线| 91在线视频观看| 亚洲最大成人网4388xx| 欧美三级视频在线观看| 一区二区三区高清在线| 欧美私模裸体表演在线观看| 亚洲午夜久久久久| 91麻豆精品国产91久久久资源速度 | 午夜日韩在线电影| 在线综合视频播放| 精品在线观看视频| 久久精品视频在线看| 国产酒店精品激情| 国产欧美日韩视频在线观看| 成人精品免费视频| 国产精品白丝在线| 91久久精品一区二区三区| 亚洲综合小说图片| 91精品国产全国免费观看| 免费在线看成人av| 日本一区二区三区四区在线视频 | 国产成人午夜精品5599| 国产日韩av一区| caoporen国产精品视频| 亚洲一区二区三区在线播放| 制服丝袜av成人在线看| 国产精品66部| 一区二区三区中文字幕在线观看| 欧美日韩亚洲综合一区二区三区| 美女尤物国产一区| 国产精品盗摄一区二区三区| 精品1区2区3区| 久国产精品韩国三级视频| 国产精品免费观看视频| 精品视频资源站| 国产一区二区三区综合| 一级女性全黄久久生活片免费| 欧美一区二区三区不卡| 懂色av中文字幕一区二区三区 | 国产精品久久久久一区二区三区| 91福利国产精品| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲精品久久久蜜桃| 日韩欧美在线不卡| 99精品久久只有精品| 日本一不卡视频| 日韩毛片高清在线播放| 亚洲精品在线一区二区| 欧美亚一区二区| 国产在线精品免费| 亚洲福利一区二区| 国产片一区二区| 日韩欧美在线影院| 色视频成人在线观看免| 黄色小说综合网站| 五月天激情综合网| 国产精品―色哟哟| 日韩精品专区在线| 欧美日韩美女一区二区| 成年人国产精品| 久久国产精品99久久久久久老狼| 亚洲免费在线视频| 欧美国产日韩a欧美在线观看 | 欧美最猛性xxxxx直播| 国产激情视频一区二区在线观看 | 日本二三区不卡| 成人免费观看视频| 国产精品一二三在| 日本欧美肥老太交大片| 亚洲国产综合人成综合网站| 日韩毛片精品高清免费| 国产精品毛片高清在线完整版 | 国产伦精品一区二区三区视频青涩 | 久久久不卡网国产精品二区| 3atv一区二区三区| 欧美日高清视频| 91国产免费观看| 91欧美一区二区| 不卡av电影在线播放| 懂色av一区二区夜夜嗨| 国产成人在线看| 岛国av在线一区| 成人一区在线看| 成人午夜在线免费| 成人黄色777网| 99精品热视频| 色久优优欧美色久优优| 91视频在线观看| 色综合久久综合| 欧美大白屁股肥臀xxxxxx| 91精品免费在线观看| 91精品一区二区三区久久久久久| 制服丝袜在线91| 日韩欧美亚洲国产精品字幕久久久| 欧美一级欧美三级在线观看| 日韩免费高清电影| 久久久www成人免费毛片麻豆| 久久综合久久99| 国产精品乱码妇女bbbb| 亚洲欧洲成人精品av97| 一区二区三区在线观看视频 | 久久精品999| 国产一区二区福利视频| 成人毛片视频在线观看| 色偷偷成人一区二区三区91| 日本黄色一区二区| 欧美一级搡bbbb搡bbbb| 久久蜜桃一区二区| 亚洲欧美日韩一区二区三区在线观看 | 国产欧美一区二区精品秋霞影院 | 色94色欧美sute亚洲线路一ni| 在线中文字幕一区二区| 欧美一区二视频| 国产日韩欧美精品在线| 一区二区三区不卡在线观看| 午夜精品久久久久影视| 国产在线精品免费| 色香蕉成人二区免费| 91精品欧美综合在线观看最新| 久久久99精品免费观看不卡| 亚洲视频图片小说| 男男视频亚洲欧美| 成人精品在线视频观看| 欧美欧美欧美欧美首页| 国产人久久人人人人爽| 视频一区视频二区中文字幕| 欧美色欧美亚洲另类二区| 欧美成人官网二区| 亚洲三级小视频| 狠狠狠色丁香婷婷综合激情| 色综合久久99| 久久精品欧美日韩精品| 亚洲成人免费影院| 成人免费视频视频| 日韩精品一区二| 亚洲成人免费观看| 99这里都是精品| 久久亚区不卡日本| 日韩国产高清影视| 色视频成人在线观看免| 国产亚洲精品7777| 美女mm1313爽爽久久久蜜臀| 91美女片黄在线观看| 久久久久久97三级| 久久国产精品99久久久久久老狼| 欧美无人高清视频在线观看| 国产精品久久久久影院老司| 国产精品白丝jk黑袜喷水| 欧美一区二区女人| 亚洲第一av色| 色哟哟一区二区在线观看| 久久久www成人免费毛片麻豆| 日本一区中文字幕 | 午夜精品久久久久久久蜜桃app| 99精品视频在线观看| 国产欧美一区二区精品性色超碰| 午夜不卡在线视频| 欧美性高清videossexo| 一区二区三区在线视频播放| 9i看片成人免费高清| 中文字幕一区二区日韩精品绯色| 国产麻豆视频一区| www国产成人| 国产精品2024| 国产精品婷婷午夜在线观看| 懂色av中文一区二区三区| 国产精品久久毛片a| 97se亚洲国产综合自在线不卡| 国产精品国产三级国产有无不卡|