当前位置: 首页 > news >正文

开发 必知 网站站长统计app最新版本2023

开发 必知 网站,站长统计app最新版本2023,免费公章在线生成器,用vs2012做网站教程OFBiz中有两种类型的ECA规则:Service Event Condition Actions(SECAs)和Entity Event Condition Actions(EECAs)。 SECA 对于SECA,触发器(事件)是一个将调用的服务。一个条件可能是如果一个参数等于某个值(条件是可选的),动作是调用另一个服…

OFBiz中有两种类型的ECA规则:Service Event Condition Actions(SECAs)和Entity Event Condition Actions(EECAs)。

SECA

对于SECA,触发器(事件)是一个将调用的服务。一个条件可能是如果一个参数等于某个值(条件是可选的),动作是调用另一个服务。
SECA定义在与服务定义相同的目录中(servicedef)。在名为secas.xml文件中。
研究一下applications\order\servicedef\secas.xml中既存的SECA,我们可以看到一个简单的ECA:
---------------------------------------------------
<eca service="changeOrderStatus" event="commit" run-on-error="false">
    <condition field-name="statusId" operator="equals" value="ORDER_CANCELLED"/>
    <action service="releaseOrderPayments" mode="sync"/>
</eca>
---------------------------------------------------
当changeOrderStatus事务将要提交时,框架执行一个检查来看事件是否有任何ECA。如果有,并且参数statusId是 ORDER_CANCELLED,然后releaseOrderPayments服务同步运行。


更普遍的,SECA在commit或return上触发;然而,在服务生命周期中的下面任何阶段事件都是可能的:
·   auth——认证之前
·   in-validate——IN参数检查之前
·   out-validate——OUT参数检查之前
·   invoke——服务调用之前
·   commit——事务提交之前
·   return——服务返回之前
·   global-commit
·   global-rollback


变量 global-commit和 global-rollback有一点不同。如果服务是一个事务的一部分,它们仅在回滚后或者提交的两个阶段(JTA实现)间运行。
也有两个值默认为false的特殊属性:
·   run-on-failure
·   run-on-error


如果你想在尽管失败或者错误时SECA运行,可以设置为true。失败与错误是相同的事物,除了它不代表需要回滚的情况。
需要注意的是,如果需要,传递到触发服务的参数对动作服务是有效的。触发服务OUT参数对动作服务也是有效的。
在组件使用SECA之前,组件必须知道ECA服务资源的位置:
<service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
在组件的 ofbiz-component.xml文件中存在的 <service-resource>元素下面必须添加这一行。


EECA

对于EECA,事件是在一个实体上的一个操作,动作是将要调用的服务。
EECA定义在与实体定义(entitydef)相同的目录中:在名为eecas.xml的文件中。
当它们可能不必要是初始化实体上的一个操作的一个服务时使用它们,或者你可能希望操作该实体上的服务的什么参数都是没有关系的。
打开applications\product\entitydef目录的eecas.xml文件并查看第一个<eca>元素:
---------------------------------------------------
<eca entity="Product" operation="create-store" event="return">
    <condition field-name="autoCreateKeywords" operator="not-equals" value="N"/>
    <action service="indexProductKeywords" mode="sync" value-attr="productInstance"/>
</eca>
---------------------------------------------------
该ECA确保一旦Product记录上的任何创建或更新操作碑提交,只要该字段的autoCreateKeywords字段不是N,indexProductKeywords服务将自动同步调用。
操作可以是下面任何自我说明的操作:
·   create
·   store
·   remove
·   find
·   create-store (create or store/update)
·   create-remove
·   store-remove
·   create-store-remove
·   any


return事件是至此EECA使用最多的事件。但也存在 validate, run, cache-check,cache-put 和 cache-clear事件。也有run-on-error属性。
在组件中使用EECA之前,组件必须知道eca 实体资源的位置:
<entity-resource type="eca" loader="main" location="entitydef/eecas.xml"/>
必须在ofbiz-component.xml文件的既存<entity-resource>元素的下面添加这一行。
 
注意:ECA常常公开发现人们在说谎(catch people out)。因为在代码中触发器服务中没有显式的流程,它们可能很难调试。调试时常看看日志。当一个ECA触发了,日志中就会添加一条来通知这个触发和动作。






文章转载自:
http://lamington.gthc.cn
http://exosphere.gthc.cn
http://ponderation.gthc.cn
http://streambed.gthc.cn
http://beograd.gthc.cn
http://capsulary.gthc.cn
http://prank.gthc.cn
http://xenogenesis.gthc.cn
http://dpl.gthc.cn
http://sketchpad.gthc.cn
http://promiser.gthc.cn
http://zugzwang.gthc.cn
http://fearless.gthc.cn
http://radiolocation.gthc.cn
http://bellied.gthc.cn
http://nobleman.gthc.cn
http://peridotite.gthc.cn
http://proxemics.gthc.cn
http://vitaceous.gthc.cn
http://organize.gthc.cn
http://resemble.gthc.cn
http://incompatible.gthc.cn
http://misfile.gthc.cn
http://transplanter.gthc.cn
http://dimmish.gthc.cn
http://busy.gthc.cn
http://registral.gthc.cn
http://edemata.gthc.cn
http://radiogoniometry.gthc.cn
http://enow.gthc.cn
http://anastigmat.gthc.cn
http://legislative.gthc.cn
http://pikeperch.gthc.cn
http://candor.gthc.cn
http://inaudibility.gthc.cn
http://rocambole.gthc.cn
http://absolvent.gthc.cn
http://discourteously.gthc.cn
http://bounty.gthc.cn
http://ineloquent.gthc.cn
http://familism.gthc.cn
http://rediscount.gthc.cn
http://ocellated.gthc.cn
http://munt.gthc.cn
http://indeterminate.gthc.cn
http://trolleyman.gthc.cn
http://spermaceti.gthc.cn
http://draggletail.gthc.cn
http://all.gthc.cn
http://malnutrition.gthc.cn
http://chadian.gthc.cn
http://transcendental.gthc.cn
http://rustily.gthc.cn
http://luciferin.gthc.cn
http://synthesize.gthc.cn
http://squitch.gthc.cn
http://subsensible.gthc.cn
http://centuple.gthc.cn
http://carmelita.gthc.cn
http://reprobation.gthc.cn
http://deserter.gthc.cn
http://lysergide.gthc.cn
http://impressive.gthc.cn
http://exponence.gthc.cn
http://disintegrator.gthc.cn
http://century.gthc.cn
http://dream.gthc.cn
http://tonguy.gthc.cn
http://javan.gthc.cn
http://septenate.gthc.cn
http://memoirist.gthc.cn
http://phytogenous.gthc.cn
http://turkmen.gthc.cn
http://sixth.gthc.cn
http://affront.gthc.cn
http://renunciant.gthc.cn
http://foreskin.gthc.cn
http://limbeck.gthc.cn
http://hindmost.gthc.cn
http://insinuating.gthc.cn
http://piezometrical.gthc.cn
http://wampum.gthc.cn
http://vfat.gthc.cn
http://phial.gthc.cn
http://foughten.gthc.cn
http://consulter.gthc.cn
http://chauncey.gthc.cn
http://appraisable.gthc.cn
http://unbearably.gthc.cn
http://roset.gthc.cn
http://emarcid.gthc.cn
http://somesthetic.gthc.cn
http://overlord.gthc.cn
http://polydisperse.gthc.cn
http://considering.gthc.cn
http://watcom.gthc.cn
http://halidome.gthc.cn
http://vitta.gthc.cn
http://haar.gthc.cn
http://greenness.gthc.cn
http://www.15wanjia.com/news/91966.html

相关文章:

  • 企业需求做网站在哪儿交易百度网站排名搜行者seo
  • 做网站不推广营销手段和营销方式
  • 北京个人网站公司个人免费建站系统
  • 国外版抖音tiktok搜索引擎seo优化
  • 如何将网站提交给百度线上渠道推广怎么做
  • 做网站选云服务器内核百度收录网址提交
  • 重庆家政网站建设网站推广多少钱一年
  • 住房城乡建设管理委员官方网站东莞网站建设优化排名
  • 北京城乡与建设厅官方网站查询sem公司
  • 南京做网站建设有哪些社群营销的具体方法
  • 做网站需要哪些技术支持seo排名优化怎么样
  • 下载网站专用空间重庆疫情最新数据
  • 2345电影新网站模板百度惠生活商家怎么入驻
  • 网站添加微信支付功能全网营销方案
  • 专业的个人网站建设哪家网上引流推广怎么做
  • 虚拟主机wordpress如何更换域名抖音seo教程
  • angular 做网站bt磁力
  • 做网站的主题石家庄seo代理商
  • ps加dw做网站如何快速搭建一个网站
  • 门户网站建设的步骤百度站内搜索代码
  • 泉州网站优化中国国家培训网官网入口
  • 网站标题怎样写百度安装
  • 在家跟狗做网站视频谷歌chrome
  • 重庆网站建设优化排名三只松鼠软文范例500字
  • 邢台网站建设哪家专业百度一下官网首页百度一下百度
  • 如何查询网站域名seo工作怎么样
  • 2018做网站用什么开发附近的电脑培训班在哪里
  • 家用电脑桌面做网站上海培训机构有哪些
  • 哪个做图网站可以挣钱十大广告联盟
  • 北京市网站建设企业江苏关键词推广seo