Activiti 监听器的配置使用

Activiti 监听器的配置使用
Activiti 监听器的配置使用

Activiti 监听器的配置使用

一)流程监听器的配置

此监听器的作用是记录流程的启动和结束事件日志,详细参考类

cn.bc.workflow.activiti.delegate.ProcessLogListener

用Activiti Designer打开流程图,点击空白处,在Properties的Listeners中如下配置流程的start和end两个事件:

二)任务监听器的配置

此监听器的作用是记录任务的创建、分派和完成的事件日志,详细参考类

cn.bc.workflow.activiti.delegate.TaskLogListener

用Activiti Designer打开流程图,点击要配置的任务节点,在Properties的Listeners中如下配置任务的事件监听:

如下是自动将任务分配到岗位或岗位内用户的任务监听器的配置:

详见类cn.bc.workflow.activiti.delegate.Assign2GroupUserListener,监听器在流程图中需要配置为"java class"类型,Fields参数中有两种配置方式:1)岗位名称+保存组织ID的流程变量名(全局变量),2)岗位编码。

监听器会根据配置方式先获取岗位,然后自动获取岗位内的用户信息,如果岗位内只有一个用户,就直接将任务分配给此用户,否则分配给岗位。

三)流向或网关监听器的配置

此监听器的作用是记录流向的执行事件日志,在平台中是可选的,视具体情况按需配置,详细参考类cn.bc.workflow.activiti.delegate.FlowLogListener

用Activiti Designer打开流程图,点击要配置的流向或网关,在Properties的Listeners 中类似任务监听器的方式进行配置即可:

Android基础——Fragment与Activity交互

Android基础——Fragment与Activity交互 今天继续讲解Fragment组件的特性,主要是跟Activity的交互和生命周期的关系,我们前面已经说过Fragment是依赖于Activity的,而且生命周期也跟Activity绑定一起。下面我们看看Fragment跟Activity的关系。 1、为Activity创建事件回调方法 在一些情况下, 你可能需要一个fragment与activity分享事件。一个好的方法是在fragment中定义一个回调的interface, 并要求宿主activity实现它。当activity通过interface接收到一个回调,必要时它可以和在layout中的其他fragment分享信息。例如, 如果一个新的应用在activity中有2个fragment –一个用来显示文章列表(framgent A), 另一个显示文章内容(fragment B) –然后 framgent A必须告诉activity何时一个list item被选中,然后它可以告诉fragmentB去显示文章。 在这个例子中, OnArticleSelectedListener 接口在fragment A中声明: public static class FragmentA extends ListFragment { //... // Container Activity must implement this interface public interface OnArticleSelectedListener { public void onArticleSelected(Uri articleUri); } //... } 然后fragment的宿主activity实现 OnArticleSelectedListener 接口,并覆写 onArticleSelected() 来通知fragment B,从fragment A到来的事件。为了确保宿主activity实现这个接口, fragment A的onAttach() 回调方法(当添加fragment到activity时由系统调用) 通过将作为参数传入onAttach()的Activity做类型转换来实例化一个OnArticleSelectedListener实例。 public static class FragmentA extends ListFragment { OnArticleSelectedListener mListener; //... @Override public void onAttach(Activity activity) { super.onAttach(activity); try { mListener = (OnArticleSelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implementOnArticleSelectedListener"); } } //... } 如果activity没有实现接口,fragment会抛出 ClassCastException 异常。正常情形下,mListener

大学英语综合教程答案

3.Many products for sale seem to scream at us, "Buy me! Buy me!" Advertising is a big busin ess in our world with many products competing for our attention. Think of the last time you boug ht clothes. You probably noticed the variety of colors, patterns, fabrics and brands you could choo se from. Which kind of soft drink would you like to have today or what kind of computer do you want? Advertisers are skilled in the art of making their products look the best to appeal to our se nses. But products aren't always what they seem. Sometimes advertising is deceptive and as cons umers ,we must be careful about what we choose to buy. It is important to learn to compare prod ucts and identify our purpose in purchasing the things we need. But the good thing about advertising is that it helps people to make decisions and refine thei r choices. In the United States, the Ad Council creates timely public service messages to the nation. Th eir purpose is to raise awareness of public problems that citizens can respond to. Inspiring ads ca use individuals to take action and even save lives. Pollution in America, for example has been red uced over the years because of the creative Public Service advertisements that the council provid es" Please, please don't be a litter bug, 'cause every 'litter bit' hurts." Many families have taught t heir children to place litter in the trash can in response to this catchy phrase, which has affected g enerations as each succeeding generation has taught their children not to litter. 4.Nature imposes difficult conditions upon the earth from time to time . The tornado and fo rest fire destroy natural resources ,homes and other structures ,and very often harm or kill peopl e . Technological tragedies happen with little or no warning as we see trains crash and airplanes f all from the sky shortly after take-off. As tragic as calamities are , they seem to bring out the best in human nature . people trained in em ergency care arrive at the scene and begin assisting the inj ured .Others come with equipment to remove debris. Men , women ,and young people willingly c ome to the scene of an accident , hoping to be of help in some way . These selfless acts of kindne ss make our world a better place . compassion eases the wounds of calamities. American Airlines flight number 587 crashed less than three minutes after taking off from JF K Airport in New York in November,2001. Witnesses s aw an engine fire develop on the plane’s nu mber one engine located under the left wing of the aircraft .seconds later ,the airliner crashed int o eight homes ,completely destroying four of them .All 260 people aboard the airplane were kille d along with six people at the crash site ,leaving many people to mourn the loss of their loved on es .the residents (people who live in the area of the crash ) rallied together to comfort those griev ing, while others removed bodies from the wreckage and did the necessary clean-up. 工程实施困难的条件下在地上的时候。龙卷风和森林火灾破坏自然资源,房屋和其他建筑物,和经常伤害或杀死人。技术的悲剧发生在很少或没有预警,因为我们看到火车事故,飞机起飞后不久就从天空坠落。一样悲惨的灾难,他们似乎显示出人性中最好的。在急诊受训的人到达现场并开始帮助受伤的人则跟设备清除残骸。男人,女人,和年轻人自愿来到事故现场,希望能有帮助。这些无私的善举让我们的世界变得更美好。同情减轻灾害的伤口。 美国航空公司587号航班坠毁不到三分钟后从纽约肯尼迪机场起飞,11月2001。目击者看到一个引擎火灾发展在飞机上的1号引擎位于下飞机的左翼,接着后,客机坠毁八家,完全摧毁了四个260名乘客的飞机遇难连同6人在事故现场,造成许多人悼念失去的亲人,居民(住在崩溃的面积)聚集在一起,安慰那些悲伤,而另一些人则从残骸,并把尸体移走必要的清理。 5.Success can be reached in different ways by people in different careers. Bill Gates began at age to program computers,His vision for personal computing has been central to the success of M icrosoft Corporation, the company he founded with his childhood friend in 1975 . The former CEO of General Electric, Jack Welch, is a business legend. A famous quote by Mr. Welch is,” Chang before you have to. ”He believes in leading by example and encourages his empl oyees to do their best every day. Michael Jordan s aid,”I accept failure, but I can’t accept not trying.” He is one of the best athl etes to ever play team sports. His great smile, athletic achievements, and pleasant personality ha ve made him one of the most famous athletes in the world. Michael Jordan spent a lot of time pla ying basketball as a child but in senior middle school he was taken off the team . Instead of giving up , he worked through adversity and became the greatest basketball player yet .

activiti流程开发基本步骤详解

activiti流程开发指南 ?一、BPMN ?二、activiti主要接口 ?三、如何实现一个业务流程 ?四、如何管理所有流程与实例 ?五、开发流程 ?六、api 一、BPMN 1. 什么是BPMN 首先BPMN规范是由标准组织BPMI发布的.BPMN 1.0规范发布于2004年5月。此规范展示了BPMI组织两年多的努力成果。BPMN的主要目标就是要提供被所有业务用户理解的一套标记语言,包括业务分析者、软件开发者以及业务管理者与监察者。BPMN还将支持生成可执行的 BPEL4WS语言。所以,BPMN在业务流程设计与流程实现之间搭建了一条标准化的桥梁。 BPMN定义了业务流程图,其基于流程图技术,同时为创建业务流程操作的图形化模型进行了裁减。业务流程的模型就是图形化对象的网图,包括活动(也可以说工作)和定义操作顺序的流控制。 2. BPMN基础 业务流程图由一系列的图形化元素组成。这些元素简化了模型的开发,且业务分析者看上去非常熟悉。这些元素每个都有各自的特性,且与大多数的建模器类似。比如,活动是矩形,条件是菱形。应该强调的是:开发BPMN的动力就是为了在创建业务流程模型时提供一个简单的机制,同时又能够处理来自业务流程的复杂性。要处理这两个矛盾的需求的方法就是将标记的图形化方面组织分类为特定的类别。这里提供标记类别中的一小部分,以便业务流程图的读者可以简单地识别出元素的基本类型从而理解图形。以下是四种基本的类型: 1)流对象 2)连接对象 3)泳道

4)人工信息 BPMN2.0概要:https://www.360docs.net/doc/0f8996430.html,/workclass/201206272.asp 二、activiti主要接口 ProcessEngine processEngine =ProcessEngines.getDefaultProcessEngine(); RuntimeService runtimeService = processEngine.getRuntimeService(); RepositoryService repositoryService = processEngine.getRepositoryService(); TaskService taskService = processEngine.getTaskService(); ManagementService managementService = processEngine.getManagementService(); IdentityService identityService = processEngine.getIdentityService(); HistoryService historyService = processEngine.getHistoryService(); FormService formService = processEngine.getFormService(); ProcessEngines.getDefaultProcessEngine()会在第一次调用时初始化并创建一个流程引擎,以后再调用就会返回相同的流程引擎。使用对应的方法可以创建和关闭所有流程引擎:ProcessEngines.init()和ProcessEngines.destroy()。 ProcessEngines会扫描所有activiti.cfg.xml和activiti-context.xml文件。对于activiti.cfg.xml文件,流程引擎会使用Activiti的经典方式构建: ProcessEngineConfiguration.createProcessEngineConfigurationFromInputStream (inputStream).buildProcessEngine(). 对于activiti-context.xml文件,流程引擎会使用Spring方法构建:先创建一个Spring的环境,然后通过环境获得流程引擎。

Activiti工作流入门详解完整教学教程

Activiti入门教程详解完整教程 1.A ctiviti介绍 Activiti是由Alfresco软件在2010年5月17日发布的业务流程管理(BPM)框架,它是覆盖了业务流程管理,工作流,服务协作等领域的一个开源,灵活的,易扩展的可执行流程语言框架。 Activiti基于Apache许可的开源BPM平台,创始人Tom Baeyens是JBoss JBPM的项目架构师,它的特色是提供了eclipse插件,开发人员可以通过插件直接绘画出业务流程图。 1.1工作流引擎 ProcessEngine对象,这是Activiti工作的核心。负责生成流程运行时的各种实例及数据,监控和管理流程的运行。 1.2BPMN 业务流程建模与标注(Business Process Model and Notation,BPMN),描述流程的基本符号,包括这些图元如何组合成一个业务流程图(Business Process Diagram)

2.准备环境 2.1Activiti软件环境 1)JDK1.6或者更高版本 2)支持的数据库有:h2,mysql,oracle,mysql,db2等 3)支持Activiti运行的jar包,可以通过maven依赖引入 4)开发环境为Eclipse3.7或者以上版本,myeclipse为8.6版本2.2安装流程设计器(eclipse插件) 1)打开Help →Install New Software →Add 输入Name: Activiti Designer Location: https://www.360docs.net/doc/0f8996430.html,/designer/update/ 输入完成后,单击OK按钮等待下载完成后安装。 安装完成后在菜单选项中会出现Activiti的目录选项

配置和自动启动Oracle的数据库和监听

配置和自动启动Oracle的数据库和监听(lsnrctl) 1.设置主机名称 [root@myc ~]# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=myc 2.设置主机名称与IP地址的对应 [root@myc ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.2.16 myc 3.修改:/u01/app/oracle/network/admin/listener.ora [oracle@myc admin]$ cat listener.ora # listener.ora Network Configuration File: /u01/app/oracle/network/admin/listener.ora # Generated by Oracle configuration tools. LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = myc)(PORT = 1521)) ) ) ADR_BASE_LISTENER = /u01/app 4.修改:/u01/app/oracle/network/admin/tnsnames.ora [oracle@myc admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /u01/app/oracle/network/admin/tnsnames.ora # Generated by Oracle configuration tools. ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = myc) ) ) 5.lsnrctl 的常用方法

安卓期末重点复习资料(EK-绝密版)

1、p4 开放手机联盟成员 ①电信运营商 ②半导体芯片商 ③手机硬件制造商 ④软件厂商 ⑤商品化公司 2、p9 Android具有自己的运行时和虚拟机,与java和.Net 运行时不同,Android运行时还可以管理进程的生命周期。Eclipse 3、p10 4、p12 在开始下载和安装Eclipse之前,应该首先确认开发主机上是否已经安装了Java 运行环境JRE 5、p26 DDMS ①Android系统中内置的调试工具 ②监视Android系统中进程、堆栈信息,查看logcat日志,实现端口转发服务和屏幕截图功能,模拟器电话呼叫和SMS短信,以及浏览Android模拟器

文件系统等 ③启动文件: /tools/ddms.bat (1)DDMS中的设备管理器 同时检控多个Android模拟器,显示每个模拟器中所以正在运行的进程 提供屏幕截图功能 (2)DDMS中的模拟器控制器 控制Android模拟器的网络速度和延迟,模拟语音和SMS短信通信 网络速率:GSM、HSCSD、PRS、EDGE、MTS、DPA和全速率 网络延迟:GPRS、EDGE、UMTS和无延迟 (3)DDMS中的模拟器控制器 电话呼入显示 SMS短信显示 (4)DDMS中的文件浏览器 上传、下载和删除Android内置存储器上的文件 显示文件和目录的名称、权限、建立时间等 (5)DDMS中的日志浏览器(LogCat) 浏览Android系统、Dalvik虚拟机或应用程序产生的日志信息,有助于快速定位应用程序产生的错误 6、p36 根目录包含四个子目录:src、assets、res和gen,一个库文件android.jar,以及两个工程文件Androidmanifest.xml和default.properties (1)src目录是源代码目录,所有允许用户修改的java文件和用户自己添加的java文件都保存在这个目录中 (2)gen目录是1.5版本新增的目录,用来保存ADT自动生成的java文件,例如R.java或AIDL文件 (3)assets目录用来存放原始格式的文件,例如音频文件、视频文件等二进制格

大学英语综合教程3 unit 3

Unit 3 Security Part Ⅰ Listening Comprehension Section A Directions: In this section, you will hear three news reports. At the end of each news report, you will hear two or three questions. Both the news report and the questions will be spoken only once. After you hear a question, you must choose the best answer from the four choices marked A), B) C) and D). Then mark the corresponding letter on Answer Sheet 1 with a single line through the centre. Questions 1 and 2 are based on the news item you have just heard. 1. A) All the schools were closed. B) 14 people were killed. C) A terrorist attack took place in one of the schools there. D) Many parents refused to send their children to school. 2. A) School administrators there also received terrorist threats. B) Schools were closed there, too. C) Many parents took a day off from work to care for their children at home. D) 700,000 students didn‘t come to school. Questions 3 and 4 are based on the news item you have just heard. 3. A) In the Arctic. B) In Washington D.C. C) In Montreal. D) In Quebec. 4. A) They live in Arctic in winter. B) Snow owl is the official bird of Quebec. C) They are often seen in Canada. D) They are not afraid of traffic on the road. Questions 5 and 7 are based on the news item you have just heard. 5. A) The major events of the Winter Olympics. B) The high cost of the Winter Olympics. C) The countries participating the Winter Olympics. D) The main attractions of the Winter Olympics. 6. A) At least $15 billion. B) At least $50 billion. C) At least $13 billion. D) At least $7 billion. 7. A) People involved in the project have taken some of the money. B) The likelihood of corruption was increased. C) Security measures cost a lot of money. D) The building of Stadiums cost a lot of money. Questions 9 to 12 are based on the conversation you have just heard. 9. A) Next Friday. B) Next year. C) Next Month. D) Next Monday. 10. A) Her mother. B) Her cousin. C) Her husband. D) Her son. 11. A) Because a civil war broke out in Mexico. B) Because the bird flu broke out in Mexico. C) Because the swine flu broke out in Mexico. D) Because there was an earthquake in Mexico. 12. A) Avoid direct contact with chickens, ducks and other birds.

oracle12.2.0.3 监听白名单配置

oracle12.2.0.3 监听白名单配置 出于提高数据安全性等目地,有时需要对 oracle的进行访问限制,允许某些IP连接数据库或拒绝某些IP访问数据库。当然使用防火墙(iptables)也能达到限制的目地,但是从监听端口变更限制仍可生效、只针对oracle自己不和其他端口的限制相混杂和不需要root账号这几方面来说,通过配置sqlnet.ora文件来进行访问限制可能是一种更好的选择。 1.配置sqlnet.ora文件 进入$ORACLE_HOME/network/admin(一般对应的真实路径形如/u01/app/oracle19c/pr oduct/19.2.0/db_1/network/admin)查看是否存在sqlnet.ora文件及是否已配置tcp.val idnode_checking、tcp.invited_nodes、tcp.excluded_nodes项。如果文件存在且已有这几项,则在此基础上修改这几项;如果文件存在但这几项不存在,则在最后追加;如果文件不存在则直接新建。 oracle默认是没有的,我们以没有为例新建该文件,并写入以下内容: tcp.validnode_checking=yes tcp.invited_nodes=(192.168.220.128,127.0.0.1) tcp.excluded_nodes=(192.168.220.1) tcp.validnode_checking:此项是启用IP合法检查,此项是必须配置的,如果不启用其它两项配置了也无效。 tcp.invited_nodes:此项是允许连接数据库的IP地址,多个地址用逗号(半角)隔开,如果启用此项,一定要配上本地地址不然监听无法启动。 tcp.excluded_nodes:此项是不允许连接数据库的IP地址,多个地址用逗号(半角)隔开,如果与tcp.invited_nodes有相同IP,则还是允许该IP访问数据库。 tcp.invited_nodes和tcp.excluded_nodes其实可以只配置一项,当只配tcp.invited_no des时就是白名单,在此项列表中的所有IP允许访问数据库,所有不在此项列表中的所有I P拒绝访问数据库。当只配置tcp.excluded_nodes时,在此项列表中的所有IP拒绝访问数据库,所有不在此项列表中的所有IP允许访问数据库。 2.重新加载使配置生效 如果之前不存在sqlnet.ora则需要重启监听,如果之前存在sqlnet.ora则只需要重新加载配置即可。 重启和reload的区别,应该是监听完全停上和不完全停止的区别,使用stop/start 当前所有已连接的会话会强制断开,reload不会断开已有会话。 重启监听(业务会中断,在不影响业务情况下重启): lsnrctl stop

ssh中自定义监听器,拦截器,过滤器

SSH中自定义监听器、拦截器、过滤器 1、自定义监听器 a)自定义监听器有哪些 监听器的定义是在web.xml中完成,其实做过ssh项目的人并不陌生监听器,主要是因为spring提供了监听器就是 org.springframework.web.context.ContextLoa derListener 如果我们想自己定义一个监听器来完成我们自己的特定功能怎么办呢,struts为我们提供了自定义servlet监听器,他们主要有 (1)ServletContextListener Servlet的上下文监听,它主要实现监听ServletContext的创建和删除。该接口提供了两种方法 1.contextInitialized(ServletContextEvent event); 通知正在收听的对象,应用程序 已经被加载和初始化。 2.contextDestroyed(ServletCotextEvent event); 通知正在收听的对象,应用程序 已经被载出,即关闭。 (2)ServletAttributeListener 主要实现监听ServletContext属性的增加,删除和修改。该接口提供了一下3个方法 1.attributeAdded(ServletContextAttributeEvent event); 当有对象加入 Application的范围时,通知正在收听的对象 2.attributeReplaced(ServletContextAttributeEvent event); 当在application的范围有 对象取代另一个对象的时,通知正在收听的对象 3.attributeRemoved(ServletContextAttributeEvent event); 当有对象从application 的范围移除时,通知正在收听的对象 (3)HttpSessionListener HTTP会话监听,该接口实现监听HTTP会话创建、销毁。该接口提供了一下两种方法 1.sessionCreated(HttpSessionEvent event); 通知正在收听的对象,session 已经被加载及初始化 2. sessionDestoryed(HttpSessionEvent event)l 通知正在收听的对象, session已经被载出(HttpSessionEvent类的主要方法是getSession(),可以使用该方法回传一个session对象)

Java学习路线图-学习视频资料分享

Java学习路线图-学习视频资料分享 Java的火爆袭来,吸引了大批的初学者涉猎,想入行Java,却苦于自己没有基础,担心学不好。小编告诉你,这些担心都是浮云,你只是惧怕走进一个新天地,人都是一样的,面对自己不熟悉的领域总会有莫名的恐惧感。不是不可以,只是你缺乏的是勇敢迈出去的勇气。 小编整理了一份关于Java自学的学习路线图,希望帮助每一位想学习Java 的小伙伴快速成长为Java开发工程师。 第一阶段:Java基础 Java开发介绍 Java数组 Java面向对象 常用基础类 集合 IO流

异常 网络 反射 第二阶段:JavaWeb HTML5 CSS3 JavaScript MySQL使用JDBC连接池Servlet JSP AJAX jQuery Bootstrap 第三阶段:Java框架Maven Hibernate Spring Spring MVC MyBatis WebService

Activiti 第四阶段:Java + 云数据 Linux版本 astDFS MySQL优化 Nginx反向代理 Quartz 作业调度 Redis 高性能(Key-Value)数据库 Shiro 安全(权限)框架 Lucene&Solr全文检索 Zookeeper 分布式系统 MyCAT 大数据集群 Dubbo实现分布式架构 ActiveMQ 消息队列 分布式事务和单点登录 分布式框架原理(采用视频资料教学) 基于SpringMVC的集成单元测试MockMVC SpringBoot 快速构建JavaEE项目 Java自学书籍: 1、《Head First Java, 2nd Edition(中文版)》 这本书不仅内容丰富、有趣且通俗易懂,并且涵盖了所有Java 相关的基础

监听器与过滤器

监听器与过滤器 监听器简介 什么是监听器 1.能监听某个对象的状态变化的组件 2.监听域对象的变化 监听器相关的概念 1.事件源:被监听的对象- request、session、servletContext 2.监听器:监听事件源的对象- 8个监听器 3.注册监听器:监听器与事件源相绑定 4.响应行为:监听到事件源变化时,去做什么事情 监听器划分 1.三个监听域对象的创建与销毁ServletContextListener HttpSessionListener ServletRequestListener 2.三个监听域对象当中属性变化ServletContextAttributeListener HttpSessionAttributeListener ServletRequestAttributeListener

域监听器 ServletContext域监听器监听ServletContext域的创建与销毁的监听器ServletContextListenerServletContext域生命周期:服务器启动创建、服务器关闭销毁监听器的编写步骤: 1.编写一个监听器类去实现监听器接口 2.覆盖监听器的方法 3.需要在web.xml中进行配置 作用 1.初始化的工作:初始化对象、初始化数据、加载数据库驱动、连接池的初始化 2.加载一些初始化的配置文件 3.任务调度

HttpSessionListener 监听HttpSession域的创建与销毁的监听器HttpSessionListener HttpSession的生命周期:第一次调用request.getSession时创建、服务器关闭session 过期或手动销毁 应用场景:记录访问人数 过滤器介绍 什么是过滤器 1.filter是对客户端访问资源的过滤,符合条件放行,不符合条件不放行 2.可以对目标资源访问前后进行逻辑处理 过滤器编写步骤 1.编写一个过滤器的类实现Filter接口 2.实现接口中尚未实现的方法(主要是DoFilter方法)

Android官方开发教程中文版(二)

Android官方开发教程中文版 添加操作栏 添加操作栏 操作栏是你能为你的Activity实现的重要的设计元素之一,它提供了几种用户界面特性,使你的应用能够保持和其它应用的一致性,以便用户很快熟悉它。主要功能包括:1.用专门的空间为你的应用指定标识并且指示出用户在应用中的位置。 2.以可预测的方式访问重要的操作(如搜索) 3.支持导航和视图切换(使用选项卡或下拉列表) 本课程提供了关于操作栏基础知识的快速指南,要获得关于操作栏各种特性的更多信息,请参考“操作栏”指南。 设置操作栏 操作栏的最基本形式是为Activity显示标题以及在标题左边显示应用图标。即使是这种简单的形式,操作栏也有利于通知用户当前的位置,以及为你的应用保持一致性。 操作栏包括一个应用图标和Activity标题 设置一个基本的操作栏需要你的应用使用一个Activity主题并启用操作栏。如何获取这样一个主题取决于你的应用支持的最低Android版本。因此这节课根据你的应用支持的Android最低版本分为两个部分。 仅支持Android3.0及以上版本 从Android3.0开始(API级别11),操作栏被包含在所有使用Theme.Holo(或它的派生类)主题的Activity中,当targetSdkVersion或minSdkVersion的值大于等于11时,Theme.Holo 是默认主题。 因此,要在Activity中添加操作栏,只需简单地把这两个属性之一的值设为11或更高就可以了,如:

关于bpmn.io流程设计器

关于bpmn.io流程设计器 一、概要说明 例子分为两部分:视频例子和代码例子。 视频文件直观的展示了如何使用bpmn.io流程设计器绘制流程图。代码文件验证了使用bpmn.io绘制的流程图可以被activitiAPI正确解析。 视频文件名与代码文件名相对应。代码bpmn和svg文件都以my前缀开头。 经试验,bpmn.io流程设计器不支持(代码不能解析)直接指定Assignee,也不支持在usertask图元上使用流程变量指定Assignee。(实际上项目中也不会使用以上两种方法指定Assignee,因为是写死在xml中属于硬编码) 二、bpmn.io设计器使用 注意:bpmn.io设计器在画图的时候与eclipse不同的地方在与经常会使用【设置】按钮对选中的图元进行设置,包括类别的选择等。 三、根据activiti技术要点绘图 见视频文件

四、小结 1、activiti工作流中,如果一个任务完成后,存在多条连线,应该如何处理? 在连线中,使用流程变量。 当一个任务完成后,根据这几天连线的条件设置流程变量,例如${流程变量的名称==”流程变量的值”},{}符号是boolean类型,在完成任务的时候,设置流程变量,activiti引擎判断走哪条线。 2、activiti工作流中,排他网关和并行网关都能执行什么功能? 排他网关:分支,通过连线设置流程变量,activiti引擎判断执行哪条线,如果条件不符合,会执行默认的连线离开,注意:排他网关只能执行其中的一个流程。(排除其他流程) 并行网关:可以同时执行多个流程,直到总流程的结束。可以对流程进行分支和聚合,注意:流程实例和执行对象是不一样的。一个流程实例只有一个,但是执行对象可以存在多个。如果是单例流程(没 有分支和聚合),那么流程实例ID和执行对象ID是相同的。 执行对象(Execution)的含义就是一个流程对象(ProcessInstance)具体要执行的过程对象。 3、分配个人任务的三种方式 直接给值,在流程设计器中指定Assignee。bpmn.io不支持 使用流程变量${变量的名称==”变量的值”}。bpmn.io不支持 使用类,使用监听类(实现activiti接口),指定任务的办理人(setAssignee())。bpmn.io支持五、工作流思想 工作流的主要作用是分离了业务逻辑和过程逻辑,让业务开发人员专注于核心的业务开发,过程逻辑

相关文档
最新文档