zoukankan      html  css  js  c++  java
  • activiti7流程实例启动

    package com.zcc.acvitivi;

    import org.activiti.engine.ProcessEngine;
    import org.activiti.engine.ProcessEngineConfiguration;
    import org.activiti.engine.RuntimeService;
    import org.activiti.engine.runtime.ProcessInstance;

    /**
    * 启动流程实例
    * 相关表:
    * act_hi_actinst 已完成信息
    * act_hi_identitylink 参与表
    * act_hi_procinst 流程实例
    * act_hi_taskinst 任务实例
    * act_ru_execution 执行表
    * act_ru_identitylink 参与表
    * act_ru_task 任务表
    */
    public class ActivitiStartInstance {
    public static void main(String[] args) {
    //创建流程引擎配置类
    ProcessEngineConfiguration processEngineConfiguration=
    ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml");
    //流程引擎对象
    ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
    //获取RuntimeService
    RuntimeService runtimeService = processEngine.getRuntimeService();
    //根据key启动流程实例
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("myProcess");
    System.out.println("流程部署id"+processInstance.getDeploymentId());
    System.out.println("流程实例id"+processInstance.getId());
    System.out.println("活动id"+processInstance.getActivityId());

    }
    }
  • 相关阅读:
    JS 打印实现部分打印
    window.opener和window.open
    js中!和!!的区别及用法
    SQL循环表里的数据
    简明lua教程[转]
    mysql调优技巧-profiles
    MySQL的InnoDB的幻读问题
    linux exec命令
    常用正则搜集整理
    flashget for linux安装问题解决
  • 原文地址:https://www.cnblogs.com/yscec/p/11802753.html
Copyright © 2011-2022 走看看