BPM业务流程管理BPM技术文档.docx

上传人:b****5 文档编号:6368954 上传时间:2023-01-05 格式:DOCX 页数:16 大小:33.08KB
下载 相关 举报
BPM业务流程管理BPM技术文档.docx_第1页
第1页 / 共16页
BPM业务流程管理BPM技术文档.docx_第2页
第2页 / 共16页
BPM业务流程管理BPM技术文档.docx_第3页
第3页 / 共16页
BPM业务流程管理BPM技术文档.docx_第4页
第4页 / 共16页
BPM业务流程管理BPM技术文档.docx_第5页
第5页 / 共16页
点击查看更多>>
下载资源
资源描述

BPM业务流程管理BPM技术文档.docx

《BPM业务流程管理BPM技术文档.docx》由会员分享,可在线阅读,更多相关《BPM业务流程管理BPM技术文档.docx(16页珍藏版)》请在冰豆网上搜索。

BPM业务流程管理BPM技术文档.docx

BPM业务流程管理BPM技术文档

(BPM业务流程管理)BPM技术文档

2

BPM与WEBDynpro总结

郑永文

2007-4-18

目录2

1基本步骤4

1.1创建BPM4

1.2创建WEBUI4

1.3建立process与webui的关系4

1.3.1指定关联4

1.3.2指定TASK的interface5

1.3.3指定process中的各activity的数据mapping,即在各个activity中可流转的数据6

1.4Deployprocess6

1.5访问6

2技术架构7

3结构7

3.1View的layout11

3.2CompositeUIElement15

3.3字段属性17

4Message17

5动态设置value-help19

6动态编程,即动态设置context20

7外部model数据27

8JA312:

AdvancedWebdynproforJAVA28

8.1设置弹出式窗口29

8.1.1OVS31

8.2消息处理32

8.3高级CONTEXT32

8.4动态UI33

8.5Modelinterface33

8.6Structingapplication33

8.6.1dependencity33

8.6.2structing40

8.7附录42

9实用东西44

9.1查看日志44

9.2ABAP层次的WEBSERVICE44

9.3Task层次的某些属性可在Humanactivity中覆盖44

9.4Process的webservice45

9.5调用webservice45

9.5.1WSDL文档结构46

9.5.2WSDL端口46

9.5.3WSDL消息47

9.5.4WSDLtypes47

9.5.5WSDLBindings47

9.5.6总结47

10实用类、接口49

10.1ClassWDValueServices49

11连接外部数据库49

12账号权限51

12.1Portal上UWL的权限51

12.2管理员权限51

13常用URL51

13.1流程管理51

http:

//192.168.0.233:

50000/ProcessManagement/index.jsp51

13.2流程监控51

14问题52

15总结52

1基本步骤

创建BPM

在NWDS中,创建一个BPM流程实例。

在此步骤中,只设置流程图(在pool中,创建多个lane,在每个lane中设置流程活动,如activity、event、gatway等),在流程图中的每个humanactivity中,需要用到task,在该task中,指向webdynproforjava开发的WEBUI。

在activity中,可指定该步骤的用户,但此处指定的用户可被该process种的task的role取代。

创建WEBUI

在该步骤中,创建process中人机交互的页面,此部主要就是webdynproforjava的开发,创建好后,需要每个componentaddtopublicpart中,以便在process中可用

建立process与webui的关系

此步在developmentinfrastructure中完成,即将上述两步创建的process与webui关联起来,以便在process的task中可指定webui的interface(即要用到第二步中addtopublicpart的组件)、在process的owner中指定该步的执行者及流程中多个activity的数据mapping(包括inputmapping、outputmapping等)

指定关联

指定TASK的interface

在task的编辑器中,可指定task对应的UIinterface,此处interface即需要用到1.2中addtopublicpart中的component.

在此处指定component后,即可在process的数据类型中可找到该component种定义的context中的数据,如下图所示:

注意:

在此处指定task的UIinterface时,必须在WEBUI的Component的Interfacecontroller中指定一个Completeevent,否则无法指定。

同理,在interfacecontroller中也要指定context,否则无法在process中mapping

指定process中的各activity的数据mapping,即在各个activity中可流转的数据

此步完成后,即可

●在process中加入数据对象

●可在process的activity中作数据mapping操作(否则,在inputmapping中无的TaskInput中无UIRequest,在outputmapping的TaskOutput中无UIResponse)

如此,即可在context与activity中的input/output做数据mapping。

在portal上的UWL中,将可以显示任务列表,此处的任务列表显示的内容可以定制并可用参数,在TASK的usertext中定义,如下图所示:

此处的参数也从绑定的userinterface(compontent)中而来,若不绑定,则无可选的context数据(在UIRequest或UIResponse节点中)。

即context(从绑定的compontent中取到)数据与activity的taskInput中的UIRequest绑定;与taskOutput中的UIResponse绑定。

通过这种方式来实现UI与process的数据绑定及流转。

Deployprocess

访问

http:

//192.168.0.233:

50000/index.html的san链接中,通过ConfigurationManagement--processesandtasks----processreposity来启动在1.4中deploy的流程

2技术架构

DC关系:

3结构

对于每个VIEW,分别对应有两个interface,假设view的名称为MMM,则接口名分别为IPrivateMMMView和IPublicMMMView,前者用于VIEW的对内数据操作,后者用于对外的数据交换,在VIEW中定义的ACTION在前者中定义,

在private的view中,

1.context中所选的每个node都对应有两个静态内部类,分别为I{NodeNmae}Node、I{NodeName}Element,在这两个内部类中分别定义node的操作、属性等东西。

通过提供的这些方法来操作VIEW中的数据,如查找按钮等。

2.view中定义的method、action也在此接口中定义

每个view均实现java.io.Serializable类,有个IPrivateMMMView类型的变量wdThis,

publicPurchaseRequestView(IPrivatePurchaseRequestViewwdThis)

{

this.wdThis=wdThis;

this.wdContext=wdThis.wdGetContext();

this.wdControllerAPI=wdThis.wdGetAPI();

this.wdComponentAPI=wdThis.wdGetAPI().getComponent();

}

对于每个webdynproforjava的组件,均有controller、view、window,其中controller对应有接口IPublic{组件名}、IPrivate{组件名}的接口,其中IPrivateextendsIPublic,在IPublic中,有两个内部类,分别为IContextNode继承自DataNode表示节点,IContextElement继承自DataNodeElement表示元素,在对应的Controller的JAVA文件中,有一个私有成员wdThis变量类型为IPrivate的,故通过这个变量即可实现对Context的访问.其中wdContext变量类型为上述IPublic中的内部类IcontextNode,通过该变量实现对Context的访问;此外,另两个变量wdComponentAPI/wdControllerAPI的类型均为IWDCompontent,通过这两个变量可实现对message、

尽量不要使用CustomController,只有在优化、简单化开发时才考虑使用

wdDoPostProcessing()在复杂的应用中,用于校验来自多个组件的数据

wdDoBeforeNavigation

在不同的controller中共享数据

External-mapping

在设置internalmapping时,需要将cardinality设为1..n,否则在界面上不能输入。

若view的context为从control映射过来,则需在controller的context中设置cardinality,在view中不能设置。

目前还不支持structure字段context属性的更名。

注意在VIEW中的BUTTON中,不要直接在VIEW中写代码更改屏幕中元素的值,而是应该在controller中更改值,方法是在controll中定义method,然后在view的layout的outline中,选中button,右键在出来的菜单中选择applytemplete,在此定义action并在后续步骤中选择controll中定义的方法。

当然也可在view中action中写代码,但这种方法应该是违反了mvc的原理,即在view中直接更改了元素的值,理论上view应该只用于显示数据,而不应该操作数据。

即在controll中定义方法,然后在view中通过wdThis.wdGet{StartComp}Controller()去调用controll中的数据,如下例所示:

其中{}中即为Compontent的名称。

publicvoidonActionInitialValue(com.sap.tc.webdynpro.progmodel.api.IWDCustomEventwdEvent)

{

//$$beginActionButton(-750211490)

wdThis.wdGetStartCompController().initPersonInfo();

//$$end

}

View的layout

CompositeUIElement

字段属性

在controller的context中,可将字段属性的calculated属性设为true,则该在controller中可在该字段的set/getter方法中写代码操作该字段的值,在该代码中修改该字段的值后,在mapping过的view中可直接显示该字段的值

4Message

3种类型:

Standard,Warning,Error

在IMessage{Nc}中作为常量存在,如component为StartComp,则该类名为IMessageStartComp.

访问方式:

IWDTextAccessortxtAccessor=wdComponentApi.getTextAccessor();

Stringmsg=txtAccessor.getText(“{MessageKey}”);

IWDMessageManagermsgMgr=wdComponentAPI.getMessageManager();

将Message与UI元素关联:

抛出错误信息:

wdComponentAPI.getMessageManager().raisePendingException();

在NWDS中在deploy时,经常会提示服务不可用,但经查系统,发现服务端无任何问题,此时,在NWDS中将SAPASJAVA中的服务重配即可。

在MESSAGEPOOL中维护好message后,如下:

其中text中的{0}{1}即为需要传递的参数,从0开始数。

然后要在程序中抛出该消息,有两种方法:

1.IWDMessageManagermsgMgr=this.wdComponentAPI.getMessageManager();

IWDTextAccessortxtAcc=this.wdComponentAPI.getTextAccessor();

Stringmsg=txtAcc.getText("S10001",newObject[]{"begindate","enddate"});

msgMgr.reportException(msg);

2.IWDMessageManagermsgMgr=this.wdComponentAPI.getMessageManager();

msgMgr.reportMessage(IMessageStartComp.S10001,newObject[]{"begindate","enddate"});

上述示例代码中加入的newObject[]数组即为需要传递到message中的变量值,与ABAP类似。

将消息与屏幕上的某个元素关联:

5动态设置value-help

SVS设置selectedKey属性

EVS设置value属性

OVS

动态设置参见下图

6动态编程,即动态设置context

1.动态创建context

此处定义的attribute,如需在UI的元素中使用,则其类型必须为sapjavadirectory,即上图中的ddic:

com.sap.dictionary.string等,具体可用类型在在context中定义时可看到;也可用java的类型,如java:

java.lang.String,但此种类型不能用于UI元素。

2.动态设置UI元素

如下例:

publicvoidwdDoModifyView(com.sap.tc.webdynpro.progmodel.api.IWDViewview,booleanfirstTime)

{

//@@beginwdDoModifyView

//setrequesternameandcounty

try{

IWDClientUseruser=WDClientUser.getCurrentUser();

StringBuffersb=newStringBuffer("");

if(user.getLastName()!

=null)

sb.append(user.getLastName());

if(sb.length()>0&&user.getFirstName()!

=null){

sb.append(",");

}

if(user.getFirstName()!

=null)

sb.append(user.getFirstName());

Stringcountry="";

if(user.getLocale().getDisplayCountry()!

=null)

country=user.getLocale().getDisplayCountry();

wdContext.currentRequesterElement().setRequesterName(sb.toString());

wdContext.currentRequesterElement().setRequesterCountry(country);

}catch(WDUMExceptione){

//donothing

}

//@@end

}

3.设置动态action

4.action的参数mapping

7外部model数据

RFC/BAPI

8JA312:

AdvancedWebdynproforJAVA

2009-4-21

设置弹出式窗口

OVS

接口:

IWDOVSDialog、IWDOVSSuggester、IWDOVSController、IWDOVSProvider、IWDWindow、IWDExternalControllerInterface、IWDComponentUsage

可将context中的属性的数据类型直接设置为某个JAVA类,如在context中创建一个dialog的属性,并将该属性的数据类型设为com.sap.tc.webdynpro.progmodel.api.IWDOVSDialog,表示该属性可实现对话框的打开、关闭等操作。

其中IWDOVSController传递给IWDOVSDialog、IWDOVSSuggester,用于控制dialog与webdynpor的数据通讯

IWDOVSProviderWebDynprousesthisinterfacetogetacomponenthandlingtheOVS.WebDynproonlyneedstheinterfacewindowofthiscomponenttosupplythepopupwindow

IWDExternalControllerInterface

CommonInterfaceforallExternalInterfacesofControllers.Important:

AllmembersinthisinterfaceMUSTbeprefixedwith"wd"toavoidcollisionswithapplicationcode

IWDComponentUsage

APIofcomponentusages.Acomponentusageprovidesaccesstotheinterfacesofanembeddedcomponentandmanagesthelifecycleofanembeddedcomponentinstance.

消息处理

在context中处理

高级CONTEXT

1.calculated属性

2.supplyfunction

3.disposefunction

4.recruive-contextnode

5.typedcontextAPI(howtoreducememory)

动态UI

Modelinterface

Structingapplication

dependencity

两种选择:

createOnCommand

Manual程序员控制

structing

附录

9实用东西

查看日志

通过Administrator界面查看,且可定制日志的显示方式等。

(NWA)即为NWAdministrator

http:

//:

/nwa按照如下链接进入:

Problemmanagment-->logandTrace-->LogViewer-->selectLast24hours.如下图所示:

但据所观察,该日志的参考意义不大,无法从该日志信息得到具体又实用的提示信息,如上图所示为流程启动时,发生错误,提示根据日志ID查看,但查看该日之后,无任何有帮助性质的内容。

ABAP层次的WEBSERVICE

TCODE:

WSADMIN

Task层次的某些属性可在Humanactivity中覆盖

如多个不同的humanactivity中需要共用某个task,但这个共用的task有些属性在不同的humanactivity中有不同的属性,此时,即可在不同的humanactivity中指定这些可覆盖的属性,这些属性包括:

∙Priority

∙Potentialandexcludedowners

∙Activationtime

∙Startdeadline

∙Completiondeadline

∙Expirationtime

Whenyouassignatasktoahumanactivity,youcanoverridethedefinedtaskattributesonthehumanactivitylevel.Youoverridetaskattributesonthehumanactivitylevelwhenyouwanttousethesametaskindifferenthumanactivitiesintheprocessmodel.Overridingthetaskattributesmeansthatyoudefinedifferentsettingsforthetaskattributesforeachhumanactivityinsteadofcreatinganewtaskforeachhumanactivity.

Process的webservice

每个流程都定义为一个异步的webservice,service的接口名称即为开始事件中的名称。

需要在WSA(WebServiceNavigator中去找这个webservice)

needtofindtherightwebserviceintheWSNavigator.EachprocessisexposedasaWebService.Theserviceinterfacenameistheoneusedinthestartevent.

若以同步的方式在页面上启动webservice,则会抛出一个exception“”

调用webservice

在NWCE7.1EHP1中,只能通过WebService来启动流程

YoucancallawebservicewitoutSRifyouhavethewsdlfileandwsdllinkforthewebservice.

Youcangetthewsdllinkforawebserviceinthet-codewsadmininSAP.

OnceyouhavethewsdlforwebserviceofSAP,createalogicaldestinationforthatserviceinthewe

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 党团工作 > 入党转正申请

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1