BPM事件
Posted passerlee
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了BPM事件相关的知识,希望对你有一定的参考价值。
Context context = Context.Current;
try
{
string query = "update SpendApplication set dr=‘1‘ where TaskID={0}";
query = String.Format(query,context.Task.TaskID);
DataSourceManager.ExecuteNonQuery("BPMDATA", query);
query = "update Spend_ct set dr=‘1‘ where TaskID={0}";
query = String.Format(query,context.Task.TaskID);
DataSourceManager.ExecuteNonQuery("BPMDATA", query);
FlowDataTable fdt = Context.Current.FormDataSet.Tables["SpendApplication"];
foreach (FlowDataRow row in fdt.Rows)
{ string lrr=row["lrr"]==null?"":row["lrr"].ToString();
string YsDjh=row["YsDjh"]==null?"":row["YsDjh"].ToString();
Double APPlyAmount=row["APPlyAmount"]==null?0:Convert.ToDouble(row["APPlyAmount"].ToString());
Double cwfkjes=row["cwfkjes"]==null?0:Convert.ToDouble(row["cwfkjes"].ToString());
query = " update BD_OutInfo set OutAmounts=OutAmounts-{1} where YsDjh=‘{0}‘ and OutAmounts>={1}";
if(string.IsNullOrEmpty(lrr))
{
query = String.Format(query,YsDjh,APPlyAmount);
}
else
{
query = String.Format(query,YsDjh,cwfkjes);
}
DataSourceManager.ExecuteNonQuery("BPMDATA", query);
}
}
catch(Exception e)
{
throw e;
}
以上是关于BPM事件的主要内容,如果未能解决你的问题,请参考以下文章
Liferay7 BPM门户开发之4: Activiti事件处理和监听Event handlers
v4.1.8 更新,Cloud 下使用 BPM,读写分离,柔性事务
Liferay7 BPM门户开发之2: BPMN 2.0 开发入门 (Activiti BPMN extensions)