PE框架学习
PE开发基础:
开发平台PowerEngine:
开发新功能:
业务逻辑处理:
PE交易处理流程:
- 首先执行Chain中的一系列Commands,若有其中一个Command认为需结束处理,则处理立刻结束;
- 当Chain执行到Delegate Command时,开始执行Template;
- 不同的Template会调用不同的Actions,以完成实际的交易处理。
简言之,根据交易Id可以唯一地确定Template,根据Template可以唯一地确定Chain,一旦确定了Chain,系统就按流程图所示开始执行处理。
Transaction:
关键点:
交易id
引用的模板
定义的action
数据交验
返回页面的渠道
- <transaction id=“preManagerAdd" template="引用的模版Id">
- <!--交易级定义的Actions.由模版来确定这些Actions的调用方法。-->
- <actions>
- <ref name="act01" >交易级定义的Action</ref>
- </actions>
- <!--对每一个域的有效性检查-->
- <fields>
- <field name="域名1">Style名称</field>
- 。。。
- </fields>
- <!--渠道的定义-->
- <channels>
- <!--HTTP渠道的定义-->
- <channel type="http">
- <param name="success">result.jsp</param>
- ......
- </channel>
- </channels>
- </transaction>
- <transaction id="LoanBaseInformationQuery" template="queryTemplate">
- <description>
- @funcName
- @trsName 贷款基本信息查询
- @author
- @version 1.0
- @remark
- @fromPages
- </description>
- <actions>//交易级的action
- <ref name="action">LoanBaseInformationQueryAction</ref>
- </actions>
- <fields>
- <field name="ContractNo"></field>
- </fields>
- <channels>
- <channel type="http">
- <param name="success">pos/LoanBaseInformationQuery</param>
- </channel>
- </channels>
- </transaction>
- <action id="LoanBaseInformationQueryAction"
- class="com.csii.ibs.pos.action.LoanBaseInformationQueryAction" parent="BaseQueryAction">
- </action>
Template:
- <template id="queryTemplate" class="com.csii.pe.template.ExecutableSequenceTemplate" chain="chainForRoleControlMV">
- <actions>//模板级的action
- <ref name="action">Placeholder</ref>
- <ref name="preAction">WriteQueryTrsJournal</ref>
- </actions>
- </template>
Chain:
<commands>
<ref>引用的command Id.</ref>
</commands>
</chain>
/poscommon/src/config/chain.xml
- <chain id="chainForRoleControlMV">
- <commands>
- <ref>MultiVersionViewCommand</ref>
- <ref>roleControlCommand</ref>
- <ref>validationCommand</ref>
- <ref>ruleCommand</ref>
- <ref>delegateCommand</ref>
- <ref>${chain.monitor}</ref>
- </commands>
- </chain>
Command:
Command定义:
- DelegateCommand:每一个Chain必须有一个而且仅限于一个DelegateComand;
- ValidationCommand:执行系统级的基于Style的有效性检查;
- LoginControlCommand:用于控制用户访问服务的频率,主要用于登录交易。
- RoleControlCommand:用于控制用户访问服务的权限,主要用于控制需要用户登录的交易的权限控制。对不需要用户登录的交易,不用该Command。
- //......
- <command id="delegateCommand" class="com.csii.pe.chain.command.DelegateCommand" />
- //.......
Action:
<action id=“action Id” class=“Full qualified class name of this action”>
</action>
init ()
Execute()
Submit()
Prepare()
Bean定义继承方式:
- <action id="BaseQueryAction" class="com.csii.ibs.action.IbsQueryAction">
- <ref name="trsCodeResolver">hostTrsCodeResolver</ref>
- <ref name="returnCodeValidator">hostReturnCodeValidator</ref>
- <ref name="transportBean">${BaseQueryAction.hostTransportBean}</ref>
- </action>
- 继承
- <action id="ActBalAction" class="com.csii.ibs.query.action.ActBalAction" parent="BaseQueryAction">
- </action>
- 等同
- <action id="ActBalAction" class="com.csii.ibs.query.action.ActBalAction" parent="BaseQueryAction">
- <ref name="trsCodeResolver">hostTrsCodeResolver</ref>
- <ref name="returnCodeValidator">hostReturnCodeValidator</ref>
- <ref name="transportBean">${BaseQueryAction.hostTransportBean}</ref>
- </action>
Action:
- <action id="WriteQueryTrsJournal" class="com.csii.ibs.common.jnl.WriteQueryTrsJournal">
- <ref name="idFactory">idFactory</ref>
- <param name="jnlSql">common.insertQryLog</param>
- </action>
PE框架学习的更多相关文章
- PE框架学习之道:PE框架——发送报文流程
PE框架发送报文,适用于PE及VX技术 步骤: 1.在action中使用发送报文,要指定报文在router端的交易名称 2.如果使用supe.execute(context)来发送,不需要第一步 3. ...
- PE框架学习之道:PE框架——style的配置
1.在style.xml中定义style <style id="NumberStyle"> <setting> <param name=&qu ...
- 框架学习之道:PE框架简介
1.PE框架开发新功能所需的部分 2.PE框架工作流程(重要) 首先根据<transcation>中的id号,找到模板(template),然后再根据模板找到责任链(chain),一旦确认 ...
- Android接口和框架学习
Android接口和框架学习 缩写: HAL:HardwareAbstraction Layer.硬件抽象层 CTS:CompatibilityTest Suite,兼容性測试套件 Android让你 ...
- IdentityServer4 ASP.NET Core的OpenID Connect OAuth 2.0框架学习保护API
IdentityServer4 ASP.NET Core的OpenID Connect OAuth 2.0框架学习之保护API. 使用IdentityServer4 来实现使用客户端凭据保护ASP.N ...
- Hadoop学习笔记—18.Sqoop框架学习
一.Sqoop基础:连接关系型数据库与Hadoop的桥梁 1.1 Sqoop的基本概念 Hadoop正成为企业用于大数据分析的最热门选择,但想将你的数据移植过去并不容易.Apache Sqoop正在加 ...
- Spring框架学习一
Spring框架学习,转自http://blog.csdn.net/lishuangzhe7047/article/details/20740209 Spring框架学习(一) 1.什么是Spring ...
- EF框架学习手记
转载: [ASP.NET MVC]: - EF框架学习手记 1.EF(Entity Framework)实体框架EF是ADO.NET中的一组支持开发面向数据的软件应用程序的技术,是微软的一个ORM框架 ...
- web框架学习列表
转载自鲁塔弗的博客,原文网址:http://lutaf.com/148.htm web framework层出不穷,特别是ruby/python,各有10+个,php/java也是一大堆 根据我自己的 ...
随机推荐
- 那些年困扰我们的Linux 的蠕虫、病毒和木马
虽然针对Linux的恶意软件并不像针对Windows乃至OS X那样普遍,但是近些年来,Linux面临的安全威胁却变得越来越多.越来越严重.个中原因包括,手机爆炸性的普及意味着基于Linux的安卓成为 ...
- 即将来到: CSS Feature Queries (CSS特性查询)
Feature Queries 是CSS3 Conditional Rules specification中的一部分,它支持“@supports”规则,“@supports”规则可以用来测试浏览器是否 ...
- IOS开发帐号与发布问题综合
一.iOS开发:AD-HOC版应用测试方法:http://hi.baidu.com/kangle1208/item/163f39530abb4d3195eb05a7 二.plist的方式发布: 1.y ...
- Ubuntu 64位安装32位运行库
sudo apt-get install ia32-libs 32-64sudo apt-get install libc6:i386sudo apt-get install librt:i386su ...
- Open War I: 野王复活与视野,望远镜视野,近距离射击,远程狙击
Below demos For: 1- 野王复活与视野,近距离射击. 2- 野王视野之外,无法近距离射击,实现望远镜视野, 远程狙击 Share the source codes with your ...
- taro 环境判断
Taro.ENV_TYPE ENV_TYPE.WEAPP 微信小程序环境 ENV_TYPE.SWAN 百度小程序环境 ENV_TYPE.ALIPAY 支付宝小程序环境 ENV_TYPE.TT 字节跳动 ...
- Vertica7 Native Connection Load Balance
原文链接:Vertica7 Native Connection Load Balance 在Vertica7曾经的版本号中,Vertica是通过Linux的Virtual IP来实现连接的负载均衡的, ...
- 〖Linux〗使用ssh登录远程主机,并在本地打开远程图形界面
1. 修改/etc/ssh/sshd_config文件,设置允许TCP转发和X11转发 AllowTcpForwarding yes X11Forwarding yes 2. 登录无图形远程主机,并允 ...
- php实现二维数组排序array_multisort($ages, SORT_DESC, $home)函数
1.sql查询排序参数是order by,那么php进行排序呢 可以参考array_multisrot函数 //php进行二维数组排序 -xzz1009 foreach($home as $home) ...
- 新浪微博XSS攻击事件
http://blog.csdn.net/terryzero/article/details/6575078 6月28日20时14分左右开始,新浪微博出现了一次比较大的XSS攻击事件.大量用户自动发送 ...