XPages is Workflow's new best friend

download XPages is Workflow's new best friend

If you can't read please download the document

description

Presentation Workflow for XPages including integration into Activiti BPMN 2.0 engine. Delivered at Lotusphere/Connect 2013 (Orlando) and Nachlese 2013 (Muenchen/Duesseldorf)

Transcript of XPages is Workflow's new best friend

  • 1. AD215 XPages Are Workflows New Best Friend Qian Liang | Advisory Software Engineer @ CDL Stephan Wissel | NotesSensei 2013 IBM Corporation

2. Please note: IBMs statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBMs sole discretion. Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the users job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.2 2013 IBM Corporation 3. Agenda Workflow, history, overview key considerations XFlow Workflow integration for XPages XFlow and the big boys: Activiti & IBM Business Process Manager3 2013 IBM Corporation 4. Who we are Qian Liang China Development Lab Stephan H. WisselAdvisory Software Engineer NotesSensei THE MAN who brought you Xflow XPages advocate (www.wissel.net)(and other Xpages goodness) Stackoverflow XPages expert4 2013 IBM Corporation 5. Who we are Qian Liang China Development Lab Stephan H. WisselAdvisory Software Engineer NotesSensei THE MAN who brought you Xflow XPages advocate (www.wissel.net)(and other Xpages goodness) Stackoverflow XPages expert5 2013 IBM Corporation 6. #XpagesFlow6 2013 IBM Corporation 7. Agenda Workflow, history, overview key considerations Workflow for XPages Workflow integration for XPages (WXP) WXP and the big boys: Activiti & IBM Business Process Manager7 2013 IBM Corporation 8. Everything is workflow! Business Logic8 2013 IBM Corporation 9. Workflow components Provide information Validate information Transform data Make decisions Approve Most popular Notify Archive9 2013 IBM Corporation 10. Workflows are complicated!10 2013 IBM Corporation 11. Really?11 2013 IBM Corporation 12. Most of them 12 2013 IBM Corporation 13. The best ever ...13 2013 IBM Corporation 14. Wouldnt it be wonderful if business users could define their own flows?14 2013 IBM Corporation 15. Rise of the workflow engines15 2013 IBM Corporation 16. Workflow Engines Code libraries (subforms) Notes Document library template Platform engines Fully self contained code Configurable e.g. Lotus Workflow Orchestration engines High level of automation External to platform e.g. IBM BPM Activiti16 2013 IBM Corporation 17. Role Resolver Sample rule:Every project expenditure above500$ must be approved by the projectmanager and the project controller Roles run across organisationalhierarchies Role resolving is an art Early (on submission) Late (when a specific step is due) Delegation settings Unavailability of role holder Inaction of role holder17 2013 IBM Corporation 18. Workflow standards*18 2013 IBM Corporation *Good we have so many of them! 19. The WfMC Reference model19 2013 IBM Corporation * Check the references for more 20. Workflow for XPages Open Source project on OpenNTF.org20 2013 IBM Corporation 21. Take 121 2013 IBM Corporation 22. Design objectives Lightweight engine Simple workflows build in Extensible to connect to other WorkFlow engines Easy to add to an XPages application22 2013 IBM Corporation 23. The planBuild a comprehensiveAPI 2012 Provide simple We are looking at this! Implementation 2013Link to otherWF engine(s)23 2013 IBM Corporation 24. com.ibm.xsp.xflow24 2013 IBM Corporation 25. 25 2013 IBM Corporation 26. API IWorkflowContextFactory: Workflow engine adapter need to implement this interface to supply workflow context public IWorkflowContext createWorkflowContext(final FacesContext context, final AbstractWorkflow workflow, final DataSource dataSource, final Object data) : This method will be called when a workflow context is needed in a XPage. public void setWorkflowInfo(String server, String port, String url, String endpoint, IIdentityResolver idResolver, IRoleResolver roleResolver, String actionHandler) : This method will be called when the WorkflowContextFactory created. All the information set here come from xml files under WebContent/WEB-INF/workflow folder.26 2013 IBM Corporation 27. Installation27 2013 IBM Corporation 28. The SimpleWorkflow control Usage Add following library dependency:com.ibm.xsp.extlib.library andcom.ibm.xsp.xflow.library Drag SimpleWorkflow control into Xpage In properties of SimpleWorkflow control, defineprocess(see right snapshot) Develop form in XPage In XPage, we can use bean workflowContext" toaccess workflow information We can also add wkWorkflowActions control toXPage which will show an action bar withworkflow actions on it Define identityResolver which can map betweenworkflow user id and Notes id; Define roleResolver which can resolve role nameto workflow user id;28 2013 IBM Corporation 29. The SimpleWorkflow control29 2013 IBM Corporation 30. Workflow actions30 2013 IBM Corporation 31. The Sample Application The sample application is called: End of Year Review. It is an application to help evaluating employees work in a year. It contains the following workflow: At the beginning of year, employee create an objective for a year Manager approve/reject employees objective At the end of a year, employee create a self assessment for the year Manager evaluate employees assessment and give a evaluation result.Create anCreate selfEmployeeobjectiveassessmentreject approve rejectEnd submit submitapprove Evaluate EvaluateManagerobjective assessment31 2013 IBM Corporation 32. 32 2013 IBM Corporation 33. 33 2013 IBM Corporation 34. Workflow for XPages Open Source project on OpenNTF.org34 2013 IBM Corporation 35. Take 235 2013 IBM Corporation 36. Activiti A light-weight workflow and Business Process Management (BPM) Platform A super-fast and rock-solid BPMN 2 process engine for Java Open-source and distributed under the Apache license36 2013 IBM Corporation 37. BPMN 2.0 Current publication Complete Online editor37 2013 IBM Corporation 38. Activiti API Java API Rest API38 2013 IBM Corporation 39. Activiti integration There are several configurations to integrate Activiti server Rest API DominoTomcat Workflow App Activiti Server Rest API DominoDomino Workflow App Activiti Server DominoWorkflow AppActiviti Server39 2013 IBM Corporation 40. Activiti integration architectureDomino server for ApplicationsDomino server for workflow engine XPages ServerXPageRest APIActiviti ServerActiviti Adaptor RDBMS40 2013 IBM Corporation 41. 41 2013 IBM Corporation 42. 42 2013 IBM Corporation 43. 43 2013 IBM Corporation 44. 44 2013 IBM Corporation 45. 45 2013 IBM Corporation 46. BPM 2.0 source XML (Schema by OMG) Uses UEL for conditions Contains layout information forthe flow chart Can contain form information46 2013 IBM Corporation 47. Task & Form definition47 2013 IBM Corporation 48. Conditions in UEL48 2013 IBM Corporation 49. Workflow Control for Activiti Usage yourFullServerName Add following library dependency:80 com.ibm.xsp.extlib.library and com.ibm.xsp.xflow.libraryhttp://yourFullServerName/activiti- Create a workflow engine definition file in rest/service WebContent/WEB-INF/workflow/*.workflow, file name iscom.ibm.xsp.xflow.ac the engine name. File content likes right.tiviti.ActivitiWorkflowContextFactory Drag Common Workflow Control into XPage workflowengine> In properties of Common Workflow Control, define process(see right snapshot) processId: process id defined Activiti server workflowEngineName: workflow engine namedefined by above step Develop form in XPage In XPage, we can use bean workflowContext" to access workflow information We can also add wkWorkflowActions control to XPage which will show an action bar with workflow actions on it (Option)Define identityResolver which can map between workflow user id and Notes id; (Option)Define roleResolver which can resolve role name to workflow user id;49 2013 IBM Corporation 50. Architecture XPageLotusConnectionProfileConnector Social Common Workflow API ProfileConnectorWorkflowPeople/Role Engine AdapterAdapter LotusWorkflow OrgConnectorSimpleActiviti IBMLotus ... WorkflowBPM BPMWorkflow ....Engine Connector ConnectorConnector50 2013 IBM Corporation 51. Source code structure com.ibm.xsp.xflow API definition com.ibm.xsp.xflow.lib Custom control, UI related control implementation, there are three controls: SimpleWorkflow, CommonWorkflow and WorkflowActions com.ibm.xsp.xflow.domino Simple workflow engine implementation based on Domino com.ibm.xsp.xflow.lombardi IBM BPM Lombardi workflow engine adaptor com.ibm.xsp.xflow.activiti Open source workflow engine Activiti adaptor51 2013 IBM Corporation 52. API IWorkflowContext: main interface between XPages and workflow engine, in XPage, we can use this API to get/set information from/to workflow engine for process instance attached to current XPage public String getCurrentStep(): return current step name public String getCurrentStepLabel(): return label of current step public String getRequester(): get requester id public String[] getActions(): get current step action names public String[] getActionLabels(): get labels of current step actions public String getLocale(): return locale public boolean isInitiated(): whether current process instance is initialized public boolean isRunning(): whether current process instance is running public boolean isCompleted(): whether current process instance is completed public boolean isReadonly(): public void setWorkflowData(HashMap data); public HashMap getWorkflowData(); public void executeAction(String name) throws WorkflowException;52 2013 IBM Corporation 53. 53 2013 IBM Corporation 54. 54 2013 IBM Corporation 55. IBM BPM A integrated platform of workflow process modeling, development, process analysis/optimize etc Shared Model Process Snapshot Authoring Environment Process Playback Process toolkit IBM BPM formerly known as Lombardi55 2013 IBM Corporation 56. IBM BPM - Architecture56 2013 IBM Corporation 57. IBM BPM Lombardi integrationDomino server for Applications IBM Websphere ServerRest APIXPageIBM BPM ServerIBM BPM Adapter57 2013 IBM Corporation 58. Workflow Control for IBM BPM Usage yourFullServerName Add following library dependency:com.ibm.xsp.extlib.library and com.ibm.xsp.xflow.library 80http://yourFullServerName/activiti- Create a workflow engine definition file inrest/serviceWebContent/WEB-INF/workflow/*.workflow, file name is com.ibm.xsp.xflow.lothe engine name. File content likes right. mbarid.LombardiWorkflowContextFact Drag Common Workflow Control into XPageory In properties of Common Workflow Control, define process(see right snapshot) processId: process definition id defined Lombardi server workflowEngineName: workflow engine name defined by above step Develop form in XPage In XPage, we can use bean workflowContext" to accessworkflow information We can also add wkWorkflowActions control to XPagewhich will show an action bar with workflow actions on it (Option)Define identityResolver which can map betweenworkflow user id and Notes id; (Option)Define roleResolver which can resolve role nameto workflow user id;58 2013 IBM Corporation 59. Status Latest version under legal review(standard OpenNTF release process) Activiti version first IBM BPM integration via IBM Softwareservice agreement Planning for the next version59 2013 IBM Corporation 60. Plans* Collect your feedback Publish updated WXP on OpenNTF Provide more samples, controls Integrate with visual workflow editor Submit patches back to Activiti Domino as workflow repository *Plans are not set in stone, see disclaimer60 2013 IBM Corporation 61. What we have shown today Everything is workflow WXP, you new best WFB(Workflow Buddy) WXP Extensibility API61 2013 IBM Corporation 62. 62 2013 IBM Corporation 63. Q&A#XpagesFlow63 2013 IBM Corporation 64. Thank you for listening!64 2013 IBM Corporation 65. Resources http://www.openntf.org/P/Workflow%20for%20XPages http://www.wfmc.org http://www.workflowpatterns.com/ http://www.e-workflow.org/ http://ieeexplore.ieee.org/xpl/articleDetails.jsp?reload=true&arnumber=994737 http://www.cloud-uestc.cn/cloudflow/home.html http://www.bpmn.org/ https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsbpel http://www-01.ibm.com/software/integration/business-process-manager/ http://www.activiti.org/65 2013 IBM Corporation 66. Legal disclaimer IBM Corporation 2013. All Rights Reserved. The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBMs current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBMs sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the users job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here. All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries. Java and all Java-based trademarks are trademarks of Oracle Inc. in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. Intel, Intel Centrino, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. UNIX is a registered trademark of The Open Group in the United States and other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others. All references to Renovations, Zeta Bank or any other fictitious company refer to a fictitious company and are used for illustration purposes only.66 2013 IBM Corporation