工作流表配置相关代码示例Word格式文档下载.docx
- 文档编号:22251752
- 上传时间:2023-02-03
- 格式:DOCX
- 页数:33
- 大小:22.77KB
工作流表配置相关代码示例Word格式文档下载.docx
《工作流表配置相关代码示例Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《工作流表配置相关代码示例Word格式文档下载.docx(33页珍藏版)》请在冰豆网上搜索。
IDATE
审批时间
=ML.STATUSDATE
STATUS
VARCHAR2(12)
状态
=ML.STATUS
CHANGEBY
VARCHAR2(30)
审批人
=PERSON.PERSONID
MEMO
VARCHAR2(50)
备忘录
=WFTRANSACTION.MEMO
ORGID
VARCHAR2(8)
组织机构标识符
=ORGANIZATION.ORGID
SITEID
地点标识符
=SITE.SITEID
MLSTATUSID
INTEGER
状态标记
当前表唯一列
ROWSTAMP
VARCHAR2(40)
Rowstamp
系统字段
说明中等号后面的为等同表和等同列。
1.2.更改状态的参数表样例
MLCHANGESTATUS(此表是虚拟表)//wochangestatus//不固定
STATDATE
DATE
状态更改日期
VARCHAR2(12)
系统工作流字段,同义词域MLSTATUS
1.3.工作流主表样例<
ML>
//workorder
类型
VARCHAR2(20)
日志标识
DESCRIPTION
VARCHAR2(100)
描述
VARCHAR2(8)
组织机构标识
地点标识
STATUSDATE
状态日期
系统工作流字段
VARCHAR2(30)
更改人
CHANGEDATE
更改时间
HISTORYFLAG
YoN
历史标记
历史记录标记,默认0
LANGCODE
VARCHAR2(4)
语言列
HASLD
长描述标识
MLID
NUMBER
唯一标识
自动生成
VARCHAR2(40)
蓝色和红色是工作流表通常必须的字段。
建错了主码——后台修改:
primarykeycolseq/changed
SELECT*FROMmaxattributecfgwhereobjectname='
ML'
FORUPDATE;
select*fromMAXOBJECTCFGwhereobjectname='
forupdate;
后台查看应用程序定义:
select*frommaxpresentation;
新增同义词域:
insertintoMaxdomain(DOMAINID,DESCRIPTION,DOMAINTYPE,MAXTYPE,LENGTH,SCALE,MAXDOMAINID)values('
MLWOSTATUS'
'
工单状态'
SYNONYM'
UPPER'
16,0,Maxdomainseq.Nextval);
插入同义词域:
insertintoSYNONYMDOMAIN(DOMAINID,MAXVALUE,VALUE,DESCRIPTION,DEFAULTS,SITEID,ORGID,SYNONYMDOMAINID)values('
CAN'
已取消'
1,'
'
SYNONYMDOMAINSEQ.NEXTVAL);
MWOLSTATUS'
CLOSE'
关闭'
35SYNONYMDOMAINSEQ.NEXTVALinsertintoSYNONYMDOMAIN(DOMAINID,MAXVALUE,VALUE,DESCRIPTION,DEFAULTS,SITEID,ORGID,SYNONYMDOMAINID)values('
WAPPR'
已上报'
0,'
insertintoSYNONYMDOMAIN(DOMAINID,MAXVALUE,VALUE,DESCRIPTION,DEFAULTS,SITEID,ORGID,SYNONYMDOMAINID)values('
COMP'
已审批'
APPR'
审核中'
已提交'
待提交'
2.工作流表代码样例
2.1.新建主表MboSetRemote
publicinterfaceMLSetRemoteextendsMboSetRemote{
}
2.2.新建主表MboSet
packagewmc.app.ml;
importjava.rmi.RemoteException;
importpsdi.mbo.*;
importpsdi.util.MXException;
importpsdi.util.MXApplicationException;
publicclassMLSetextendsMboSetimplementsMLSetRemote{
publicMLSet(MboServerInterfacemboserverinterface)
throwsMXException,RemoteException{
super(mboserverinterface);
laborCode=newString();
current=false;
history=false;
}
protectedMbogetMboInstance(MboSetmboset)
returnnewML(mboset);
publicvoidcanAdd()
throwsMXException{
super.canAdd();
try{
CheckUserCanAddcheckusercanadd=newCheckUserCanAdd(this);
block=checkusercanadd.findBlock();
profession=checkusercanadd.findProfession();
if(profession==null)
thrownewMXApplicationException("
ml"
"
NeedfulProfession"
);
if(!
checkusercanadd.unAdd(block,profession))
FrontNoQuit"
catch(RemoteExceptionremoteexception){
remoteexception.printStackTrace();
publicvoidfindECommProcessML()
Stringas[]={
"
APPR"
};
Strings=getTranslator().toExternalList("
MLSTATUS"
as);
Strings1="
statusin("
+s+"
)"
;
setWhere(s1);
reset();
publicvoidfindECommCancelML()
CAN"
;
publicvoidsetHistory(booleanflag)
history=flag;
publicvoidsetCurrent(booleanflag)
current=flag;
publicvoidsetSupervisor(Strings)
laborCode=s;
publicStringgetUserPrefWhere(){
StringBufferstringbuffer=newStringBuffer();
if(current){
WAPPR"
stringbuffer.append("
if(history){
Stringas1[]={
CLOSE"
Strings1=getTranslator().toExternalList("
as1);
if(!
stringbuffer.substring(0).equalsIgnoreCase("
"
))
or"
+s1+"
catch(MXExceptionmxexception){
mxexception.printStackTrace();
returnstringbuffer.toString();
StringlaborCode;
publicStringprofession;
publicStringblock;
publicbooleancurrent;
publicbooleanhistory;
}}
2.3.新建主表MboRemote
publicinterfaceMLRemoteextendsMboRemote{
2.4.新建主表Mbo
importjava.util.*;
importpsdi.security.UserInfo;
importmon.purchasing.PurchasingMbo;
importpsdi.wmc.ml.virtual.MLChangeStatusSet;
importpsdi.txn.MXTransaction;
importpsdi.server.*;
importpsdi.util.*;
/**
*<
p>
Title:
Maximo<
/p>
*
Description:
Maximo升级<
Copyright:
Copyright(c)2006<
Company:
<
*@author
*@version1.0
*/
publicclassMLextendsPurchasingMboimplementsMLRemote{
//PurchasingMbo与采购相关,通常为:
//publicclassMLextendsStatefulMboimplementsMLRemote{
publicML(MboSetmboset)
super(mboset);
protectedMboSetRemotegetStatusHistory()
returngetMboSet("
protectedStatusHandlergetStatusHandler(){
returnnewMLStatusHandler(this);
publicStringgetStatusListName(){
return"
publicvoidinit()
super.init();
toBeAdded())
setFieldFlag("
mlnum"
7L,true);
setFlagsReadOnly();
publicvoidadd()
super.add();
Stringb=((MLSet)getThisMboSet()).block;
Strings=((MLSet)getThisMboSet()).profession;
Datedate=((AppService)getMboServer()).getMXServer().getDate();
setValue("
historyflag"
false,11L);
recorddate"
date,11L);
afterdate"
afterperson"
getUserInfo().getPersonId(),11L);
status"
11L);
statusdate"
block"
b,11L);
profession"
s,11L);
SqlFormatsqlformat=newSqlFormat(this,"
mlnum=(selectmax(mlnum)frommlwhereprofession='
andmltype='
LOG'
MboSetRemotembosetremote=getMboSet("
$ml"
sqlformat.format());
mbosetremote.isEmpty()){
Strings1=mbosetremote.getMbo(0).getString("
MboRemotemboremote=getMboSet("
mlnum='
).getMbo(0);
Strings2=mboremote.getString("
Datedate1=mboremote.getDate("
acceptdate"
frontdate"
date1,11L);
frontperson"
s2,11L);
publicbooleancheckUser()
Strings=getUserInfo().getPersonId();
s.equalsIgnoreCase(getString("
)))returnfalse;
returntrue;
publicStringgetRelatedToType(Strings,Strings1,Strings2)
String[]as=s.split("
_"
inti=s.indexOf("
Stringt=s.substring(i+1);
Stringp=s1.substring(0,2);
if(t.indexOf("
)>
0)
t="
Empty"
if(t.equalsIgnoreCase("
Electric"
)){
if(p.equalsIgnoreCase("
DQ"
if(s2.equalsIgnoreCase("
Base"
Append"
}else{
Error"
Chymist"
HX"
}else{
Fuel"
RL"
Boiler"
GL"
returnt;
privatevoidsetFlagsReadOnly()
throwsMXException,RemoteException
{
siteid"
"
setFieldFlag(as,7L,true);
protectedvoidsetEditibilityFlags(booleanflag)
description"
mltype"
week"
weather"
classgroup"
classorder"
classlea
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 工作流 配置 相关 代码 示例