activiti 工作流学习 3

7 篇文章 0 订阅
4 篇文章 0 订阅

     1.工作流引擎  ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();  这是获取工作流引擎的方式 ,根据后面的方法意思是 获取(get) 默认的(Default) 工作流引擎 (ProcessEngine)

     2. 我们导入源码进入到 getDefaultProcessEngine() 方法中 看到有一个 init() 方法 我们跳到 init() 方法里面去

 

      来到 init() 方法里面 看到  resources = classLoader.getResources("activiti.cfg.xml"); 这么一段代码,这里会加载 配置文件,所以为什么要把 配置文件取名为 activiti.cfg.xml ,就是这个原因,默认名称 如果没有表的话,这里也会去创建的 ,然后我们就获得了流程引擎对象

 

    3. ProcessEngine   

 流程引擎对象是activiti的核心  它操作者 7个接口来 处理 各个表 之间的业务逻辑

org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl  这个类中,就可以看到这些接口服务

  protected RepositoryService repositoryService = new RepositoryServiceImpl();
  protected RuntimeService runtimeService = new RuntimeServiceImpl();
  protected HistoryService historyService = new HistoryServiceImpl(this);
  protected IdentityService identityService = new IdentityServiceImpl();
  protected TaskService taskService = new TaskServiceImpl(this);
  protected FormService formService = new FormServiceImpl();
  protected ManagementService managementService = new ManagementServiceImpl();
  protected DynamicBpmnService dynamicBpmnService = new DynamicBpmnServiceImpl(this);

还有关于这 28 张表的接口(interface)

我们进入到其中的一个 接口里面 ,不难看出是使用Mybatis的写法

    重点就在于 7 大服务到底各自代表着什么?,各自处理着什么?,各自对应着什么?

 

Activiti 工作流引擎 七大服务
服务名称服务英文意思 服务中文意思
RepositoryServiceService providing access to the repository of process definitions and deployments服务提供过程定义和部署的存储库
HistoryServiceService exposing information about ongoing and past process instances. This is different from the runtime information in the sense that this runtime information only contains the actual runtime  state at any given moment and it is optimized for runtime process execution performance. The history information is optimized for easy querying and remains permanent in the persistent storage.服务公开信息进行和过去的流程实例。这不同于运行时信息,这个运行时信息只包含实际的运行时状态在任何给定的时刻,它是运行时流程执行性能的优化。历史信息,便于查询和优化是永久的持久存储。
IdentityServiceService to manage {@link User}s and {@link Group}s.服务管理{ @link用户}和{ @link组织/部门}。
TaskServiceService which provides access to {@link Task} and form related operations.服务提供访问{ @link任务},形成相关操作。
FormServiceAccess to form data and rendered forms for starting new process instances and completing tasks对表单数据的访问和呈现形式,从而创建新的流程实例,完成任务。
ManagementServiceService for admin and maintenance operations on the process engine.These operations will typically not be used in a workflow driven application, but are used in for example the operational console.服务管理和维护操作流程引擎,这些操作通常不应用在工作流驱动的应用程序中,但是用于例如操作控制台。
DynamicBpmnServiceService providing access to the repository of process definitions and deployments.这些操作通常不应用在工作流驱动的应用程序中,但是用于例如操作控制台。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值