Package com.starflow.wf.engine.core.data

Examples of com.starflow.wf.engine.core.data.RelaDataManager


   * @return
   */
  private TransitionElement findTransitonsForJexl(ActivityCreateEvent event, ProcessElement processXml,
      List<TransitionElement> transitions, List<ActivityElement> nextNodes, boolean isSort) {
    //准备Transition 表达式变量参数
    RelaDataManager relaDataManager = RelaDataManagerBuilder.buildRelaDataManager();
    long processInstId = event.getProcessInstance().getProcessInstId();
    String activityDefId = event.getPreActivityXml().getId();
    Map<String , Object> conditions = relaDataManager.getExpressConditions(processInstId, activityDefId);
   
    List<TransitionElement> tranEls = new ArrayList<TransitionElement>();
   
    TransitionElement defaultTransition = null;
    for(TransitionElement transitionXml : transitions) { //循所有的分支,寻找满足条件的分支
View Full Code Here


   
    boolean isFreeActivity = activityXml.getIsFreeActivity();
    if(!isFreeActivity)
      return null;
   
    RelaDataManager relaDataManager = RelaDataManagerBuilder.buildRelaDataManager();
    long processInstId = event.getProcessInstance().getProcessInstId();
    String activityDefId = event.getPreActivityXml().getId();
    List<String> actDefIds =  (List<String>)relaDataManager.getNextFreeActs(processInstId, activityDefId);
    List<ActivityElement> nextNodes = new ArrayList<ActivityElement>();
    for(String actDefId : actDefIds) {
      ActivityElement _e = processXml.getActivitys().get(actDefId);
      nextNodes.add(_e);
    }
View Full Code Here

  }
 
  protected void saveResultRelaData(ActivityStartEvent event, Object result, ActivityElement activityXml) {
    //执行结果放入相关数据区。
    if(result != null) {
      RelaDataManager relaDataManager = RelaDataManagerBuilder.buildRelaDataManager();
      long processInstId = event.getProcessInstance().getProcessInstId();
      String activityDefId = event.getPreActivityXml().getId();
      relaDataManager.bindAutoActLogicResult(processInstId, activityDefId, result);
    }
  }
View Full Code Here

   * @return
   */
  private int findTransitonsForJexl(AbstractFlowEvent event, ScriptEngineManager engineManager, List<TransitionElement> transitions) {
    int count = 0;
   
    RelaDataManager relaDataManager = RelaDataManagerBuilder.buildRelaDataManager();
    long processInstId = event.getProcessInstance().getProcessInstId();
    String activityDefId = event.getPreActivityXml().getId();
    Map<String , Object> conditions = relaDataManager.getExpressConditions(processInstId, activityDefId);
   
    for(TransitionElement transitionXml : transitions) { //循所有的分支,寻找满足条件的分支
      boolean isDefault = transitionXml.getIsDefault();
      if(isDefault) {
        count++;
View Full Code Here

    ProcessInstance processInstance = procInstService.createProcess("flow.StartActSplitXpathExample", "100001");
   
    Map<String, Object> conditions = new HashMap<String, Object>();
    //宽带处理班
    conditions.put("flag", "<flag>ADSL</flag>");
    RelaDataManager relaDataManager = RelaDataManagerBuilder.buildRelaDataManager();
    long processInstId = processInstance.getProcessInstId();
    String activityDefId = "act_start";
    relaDataManager.setExpressConditions(processInstId, activityDefId, conditions);
   
    //创建流程
    procInstService.startProcess(processInstance.getProcessInstId());
   
    workItemService.finishWorkItem(1l, "100001");
View Full Code Here

    ProcessInstance processInstance = procInstService.createProcess("flow.StartActSplitExample", "100001");
   
    Map<String, Object> conditions = new HashMap<String, Object>();
    //宽带处理班
    conditions.put("flag", "ADSL");
    RelaDataManager relaDataManager = RelaDataManagerBuilder.buildRelaDataManager();
    long processInstId = processInstance.getProcessInstId();
    String activityDefId = "act_start";
    relaDataManager.setExpressConditions(processInstId, activityDefId, conditions);
   
    //创建流程
    procInstService.startProcess(processInstance.getProcessInstId());
   
    workItemService.finishWorkItem(1l, "100001");
View Full Code Here

* @version 1.0
*/
public class RelDataParticipantMode implements ParticipantMode {

  public List<Participant> creatParticipants(AbstractFlowEvent event, ActivityElement activityXml) {
    RelaDataManager relaDataManager = RelaDataManagerBuilder.buildRelaDataManager();
    long processInstId = event.getProcessInstance().getProcessInstId();
    String activityDefId = event.getPreActivityXml().getId();
    List<Participant> participants = relaDataManager.getNextActParticipant(processInstId, activityDefId);
    return participants;
  }
View Full Code Here

TOP

Related Classes of com.starflow.wf.engine.core.data.RelaDataManager

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.