uEngine BPM 的一些核心类和实例

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Samplecodes–AppendixCSamplecodes–AppendixC..................................................................................................1AppendixC–SampleCode..................................................................................................2ProcessManagerInterfaceExample.............................................................................2index.jsp..................................................................................................................2PMIExample#1.-initiateProcess.jsp'''................................................................4PMIExample#2.-startProcess.jsp'''....................................................................5PMIExample#3.-initiateAndStartProcess.jsp..................................................7PMIExample#4.–getProcessVariable.jsp........................................................10PMIExample#5.-setProcessVariable.jsp..........................................................11MainClass....................................................................................................................131.ActivityDefinitionClassReferenceCodes#1-Activity.java.....................132.ActivityFlowControlClassReferenceCodes#1-ComplexActivity.java.153.ProcessDefinitionClass-ProcessDefintion...............................................184.RolesandRoleMappingClass–RolesandRoleMapping.........................185.ProcessVariableClass-ProcessVariable....................................................196.ProcessDefinitionTest,Example#1...........................................................19TransactionUsageexample#1...................................................................................21JDBCExtWorklist.................................................................................................21TypeDeclarationExample#1.....................................................................................23AutomaticUICreationExample#1...........................................................................24ReferencecodesofconsistentwaystoInputdata#1–DateInput.java..................28RoleObjectExtensionExample#1-organizationChartXML.jsp............................33RoleObjectExtensionExample#2–MultipleRoleMappingExample..................35AppendixC–SampleCodeProcessManagerInterfaceExampleindex.jsph1ExampleAPIInvocationDemos/h1olformaction=initiateProcess.jspmethod=POSTliInitiatingProcessDefinition:brulEnterProcessDefinitionNametobeinitiated:inputname=definitionNameinputtype=submit/ul/li/formpformaction=startProcess.jspmethod=POSTliStartingProcessDefinition:brulEnterInstanceIdtobestarted:inputname=instanceIdinputtype=submit/ul/li/formpformaction=initiateAndStartProcess.jspmethod=POSTliInitiatingandStartingProcessDefinition:brulEnterProcessDefinitionNametobeinitiatedandstarted:inputname=definitionNameinputtype=submit/ul/li/formpformaction=getProcessVariable.jspmethod=POSTliGettingValueofVariable:brulEnterinstanceId:inputname=instanceIdbrEntervariablename:inputname=variableNamebrinputtype=submit/ul/li/formpformaction=setProcessVariable.jspmethod=POSTliSettingValuetoVariable:brulEnterinstanceId:inputname=instanceIdbrEntervariablename:inputname=variableNamebrEntervalue(JustStringvalueforthisexample):inputname=valuebrinputtype=submit/ul/li/formPMIExample#1.-initiateProcess.jsp'''%@includefile=../common/header.jsp%%@pageimport=javax.transaction.*%LINKhref=../style/uengine.csstype=text/cssrel=stylesheetjsp:useBeanid=processManagerFactoryscope=applicationclass=org.uengine.processmanager.ProcessManagerFactoryBean/%ProcessManagerRemotepm=processManagerFactory.getProcessManager();InitialContextcontext=newInitialContext();UserTransactiontx=(GlobalContext.useManagedTransaction?(UserTransaction)context.lookup(GlobalContext.USERTRANSACTION_JNDI_NAME):null);try{if(tx!=null)tx.begin();StringdefinitionName=decode(request.getParameter(definitionName));StringproductionVersionId=pm.getProcessDefinitionProductionVersionByName(definitionName);StringinstanceId=pm.initializeProcess(productionVersionId);pm.applyChanges();try{tx.commit();}catch(Exceptiontxe){}%Processinstance'%=instanceId%'hasbeensuccessfullyinitialized.p%}catch(Exceptione){try{pm.cancelChanges();}catch(Exceptiontxe){}try{tx.rollback();}catch(Exceptiontxe){}throwe;}finally{try{pm.remove();}catch(Exceptionex){System.out.println(errorwhentoremovepm);ex.printStackTrace();}}%PMIExample#2.-startProcess.jsp'''%@includefile=../common/header.jsp%%@pageimport=javax.transaction.*%LINKhref=../style/uengine.csstype=text/cssrel=stylesheetjsp:useBeanid=processManagerFactoryscope=applicationclass=org.uengine.processmanager.ProcessManagerFactoryBean/%ProcessManagerRemotepm=processManagerFactory.getProcessManager();InitialContextcontext=newInitialContext();UserTransactiontx=(GlobalContext.useManagedTransaction?(UserTransaction)context.lookup(Global

1 / 38
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功