Package com.starflow.wf.engine.repository

Examples of com.starflow.wf.engine.repository.IActivityInstRepository


public class TransCtrlFilter extends ProcessFilterAdapter {
 
  @Override
  public void activityCreate(AbstractFlowEvent event, ActivityInst destActInst) {
    if(event instanceof ActivityCreateEvent) {
      IActivityInstRepository actInstRep = event.getActInstRep();
      ActivityInst srcActInst = ((ActivityCreateEvent)event).getActivityInst();
     
      //调用startActivityInst方法直接启动环节
      if(srcActInst == null)
        srcActInst = destActInst;
     
      TransCtrl transCtrl = new TransCtrl();
      transCtrl.setSrcActDefId(srcActInst.getActivityDefId());
      transCtrl.setSrcActDefName(srcActInst.getActivityInstName());
      transCtrl.setSrcActType(srcActInst.getActivityType());
      transCtrl.setDestActDefId(destActInst.getActivityDefId());
      transCtrl.setDestActDefName(destActInst.getActivityInstName());
      transCtrl.setDestActType(destActInst.getActivityType());
      transCtrl.setTransTime(new Date());
      transCtrl.setProcessInstId(destActInst.getProcessInstId());
      transCtrl.setIsUse("N");
      transCtrl.setIsStartDestAct("N");
     
      long transCtrlId = PrimaryKeyUtil.getPrimaryKey(Keys.TRANSCTRLID);
      transCtrl.setTransCtrlId(transCtrlId);
     
      actInstRep.insertTransCtrl(transCtrl);
    }
  }
View Full Code Here


    }
  }
 
  public void saveTransCtrlCanNotAct(AbstractFlowEvent event, ActivityElement activityXml) {
    if(event instanceof ActivityCreateEvent) {
      IActivityInstRepository actInstRep = event.getActInstRep();
      ActivityInst srcActInst = ((ActivityCreateEvent)event).getActivityInst();
     
      TransCtrl transCtrl = new TransCtrl();
      transCtrl.setSrcActDefId(srcActInst.getActivityDefId());
      transCtrl.setSrcActDefName(srcActInst.getActivityInstName());
      transCtrl.setSrcActType(srcActInst.getActivityType());
      transCtrl.setDestActDefId(activityXml.getId());
      transCtrl.setDestActDefName(activityXml.getName());
      transCtrl.setDestActType(activityXml.getType());
      transCtrl.setTransTime(new Date());
      transCtrl.setProcessInstId(srcActInst.getProcessInstId());
      transCtrl.setIsUse("N");
      transCtrl.setIsStartDestAct("Y");
     
      long transCtrlId = PrimaryKeyUtil.getPrimaryKey(Keys.TRANSCTRLID);
      transCtrl.setTransCtrlId(transCtrlId);
     
      actInstRep.insertTransCtrl(transCtrl);
    }
  }
View Full Code Here

TOP

Related Classes of com.starflow.wf.engine.repository.IActivityInstRepository

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.