AD215
                     XPages Are Workflow's New Best Friend
                     Qian Liang | Advisory Software Engineer @ CDL
                     Stephan Wissel | NotesSensei




© 2013 IBM Corporation
Please note:

       IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal
       without notice at IBM’s 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 user's 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
Agenda

   Workflow, history, overview key considerations
   XFlow – Workflow integration for XPages
   XFlow and the big boys: Activiti & IBM Business Process Manager




3    © 2013 IBM Corporation
Who we are

   Qian Liang – China Development Lab      Stephan H. Wissel
    Advisory Software Engineer               NotesSensei




   THE MAN who brought you Xflow           XPages advocate (www.wissel.net)
    (and other Xpages goodness)             Stackoverflow XPages expert


4   © 2013 IBM Corporation
Who we are

   Qian Liang – China Development Lab      Stephan H. Wissel
    Advisory Software Engineer               NotesSensei




   THE MAN who brought you Xflow           XPages advocate (www.wissel.net)
    (and other Xpages goodness)             Stackoverflow XPages expert


5   © 2013 IBM Corporation
#XpagesFlow



6   © 2013 IBM Corporation
Agenda

   Workflow, history, overview key considerations
   Workflow for XPages – Workflow integration for XPages (WXP)
   WXP and the big boys: Activiti & IBM Business Process Manager




7    © 2013 IBM Corporation
Everything is workflow!




                             Business Logic
8   © 2013 IBM Corporation
Workflow components

                              Provide information
                              Validate information

                              Transform data

                              Make decisions

                              Approve         Most popular

                              Notify

                              Archive




9   © 2013 IBM Corporation
Workflows are complicated!




10   © 2013 IBM Corporation
Really?




11   © 2013 IBM Corporation
Most of them …




12   © 2013 IBM Corporation
The best ever ...




13   © 2013 IBM Corporation
Wouldn't it be wonderful
     if business users could
     define their own flows?




14    © 2013 IBM Corporation
Rise of the workflow engines




15   © 2013 IBM Corporation
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
                                   ─ Activiti




16   © 2013 IBM Corporation
Role Resolver

                                 Sample rule:
                                  “Every project expenditure above
                                  500$ must be approved by the project
                                  manager and the project controller”
                                 Roles run across organisational
                                  hierarchies
                                 Role resolving is an art
                                   ─ Early (on submission)
                                   ─ Late (when a specific step is due)
                                   ─ Delegation settings
                                   ─ Unavailability of role holder
                                   ─ Inaction of role holder




17   © 2013 IBM Corporation
Workflow standards*




18   © 2013 IBM Corporation   *Good we have so many of them!
The WfMC Reference model




19   © 2013 IBM Corporation   * Check the references for more
Workflow for XPages – Open Source project on OpenNTF.org




20   © 2013 IBM Corporation
Take 1


21   © 2013 IBM Corporation
Design objectives

    Lightweight engine
    Simple workflows build in
    Extensible to connect to other WorkFlow engines
    Easy to add to an XPages application




22   © 2013 IBM Corporation
The plan

        Build a
     comprehensive
          API                       2012


                               Provide simple
 We are looking at this!
                               Implementation
                                                     2013


                                                Link to other
                                                WF engine(s)




23    © 2013 IBM Corporation
com.ibm.xsp.xflow



24   © 2013 IBM Corporation
25   © 2013 IBM Corporation
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
Installation




27   © 2013 IBM Corporation
The SimpleWorkflow control

    Usage
      ─ Add following library dependency:
        com.ibm.xsp.extlib.library and
        com.ibm.xsp.xflow.library
      ─ Drag SimpleWorkflow control into Xpage
      ─ In properties of SimpleWorkflow control, define
        process(see right snapshot)
      ─ 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
      ─ Define identityResolver which can map between
        workflow user id and Notes id;
      ─ Define roleResolver which can resolve role name
        to workflow user id;




28   © 2013 IBM Corporation
The SimpleWorkflow control




29   © 2013 IBM Corporation
Workflow actions




30   © 2013 IBM Corporation
The Sample Application

      The sample application is called: End of Year Review. It is an application to
       help evaluating employee's work in a year. It contains the following
       workflow:
         ─ At the beginning of year, employee create an objective for a year
         ─ Manager approve/reject employee's objective
         ─ At the end of a year, employee create a self assessment for the year
         ─ Manager evaluate employee's assessment and give a evaluation result.



                          Create an                          Create self
Employee
                          objective                          assessment
                                          reject   approve                   reject
                                                                                                      End
                                 submit                             submit                  approve
                                             Evaluate                           Evaluate
Manager                                      objective                         assessment


  31    © 2013 IBM Corporation
32   © 2013 IBM Corporation
33   © 2013 IBM Corporation
Workflow for XPages – Open Source project on OpenNTF.org




34   © 2013 IBM Corporation
Take 2


35   © 2013 IBM Corporation
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 license




36   © 2013 IBM Corporation
BPMN 2.0

                                   Current publication
                                   Complete
                                   Online editor




37   © 2013 IBM Corporation
Activiti API

    Java API
    Rest API




38   © 2013 IBM Corporation
Activiti integration

    There are several configurations to integrate Activiti server


                                                 Rest API
                                 Domino                            Tomcat
                               Workflow App                     Activiti Server



                                                 Rest API
                                 Domino                            Domino
                               Workflow App                     Activiti Server



                                                 Domino
                                              Workflow App
                                              Activiti Server



39    © 2013 IBM Corporation
Activiti integration architecture

        Domino server for Applications                      Domino server for workflow engine



                                                                     XPages Server



                    XPage                        Rest API
                                                                    Activiti Server

                              Activiti Adaptor




                                                                       RDBMS



40   © 2013 IBM Corporation
41   © 2013 IBM Corporation
42   © 2013 IBM Corporation
43   © 2013 IBM Corporation
44   © 2013 IBM Corporation
45   © 2013 IBM Corporation
BPM 2.0 source
                                 XML (Schema by OMG)
                                 Uses UEL for conditions
                                 Contains layout information for
                                  the flow chart
                                 Can contain form information




46   © 2013 IBM Corporation
Task & Form definition




47   © 2013 IBM Corporation
Conditions in UEL




48   © 2013 IBM Corporation
Workflow Control for Activiti

        Usage                                                             <workflow>
                                                                           <server>yourFullServerName</server>
             ─ Add following library dependency:                              <port>80</port>
               com.ibm.xsp.extlib.library and com.ibm.xsp.xflow.library
                                                                              <url>http://yourFullServerName/activiti-
             ─ Create a workflow engine definition file in                 rest/service</url>
               WebContent/WEB-INF/workflow/*.workflow, file name is        <workflowengine>com.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            </workflow>
               process(see right snapshot)
                      –   processId: process id defined Activiti server
                      –   workflowEngineName: workflow engine name
                          defined 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
Architecture



                                                           XPage                        Lotus
                                                                                      Connection
                                                                                        Profile
                                                                                      Connector


                                                                                       Social
                               Common Workflow API                                     Profile
                                                                                      Connector
                                                Workflow
                                                                        People/Role
                                                 Engine                   Adapter
                                                Adapter                                 Lotus
                                                                                      Workflow
                                                                                         Org
                                                                                      Connector


      Simple                    Activiti         IBM          Lotus                       ...
     Workflow                    BPM             BPM        Workflow           ....
      Engine                   Connector       Connector    Connector

50    © 2013 IBM Corporation
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 adaptor




51    © 2013 IBM Corporation
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   © 2013 IBM Corporation
54   © 2013 IBM Corporation
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 Lombardi




55    © 2013 IBM Corporation
IBM BPM - Architecture




56   © 2013 IBM Corporation
IBM BPM – Lombardi integration


        Domino server for Applications                     IBM Websphere Server




                                                Rest API
                    XPage                                    IBM BPM Server


                              IBM BPM Adapter




57   © 2013 IBM Corporation
Workflow Control for IBM BPM

    Usage                                                             <workflow>
                                                                       <server>yourFullServerName</server>
      ─ Add following library dependency:
        com.ibm.xsp.extlib.library and com.ibm.xsp.xflow.library         <port>80</port>
                                                                         <url>http://yourFullServerName/activiti-
      ─ Create a workflow engine definition file in                    rest/service</url>
        WebContent/WEB-INF/workflow/*.workflow, file name is           <workflowengine>com.ibm.xsp.xflow.lo
        the engine name. File content likes right.
                                                                       mbarid.LombardiWorkflowContextFact
      ─ Drag Common Workflow Control into XPage                        ory</workflowengine>
      ─ In properties of Common Workflow Control, define               </workflow>
        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 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;

58   © 2013 IBM Corporation
Status

                                 Latest version under legal review
                                  (standard OpenNTF release process)
                                 Activiti version first
                                 IBM BPM integration via IBM Software
                                  service agreement
                                 Planning for the next version




59   © 2013 IBM Corporation
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 disclaimer
60    © 2013 IBM Corporation
What we have shown today




                               Everything is workflow
                               WXP, you new best WFB

                                (Workflow Buddy)
                               WXP Extensibility API




61   © 2013 IBM Corporation
62   © 2013 IBM Corporation
Q&A
                              #XpagesFlow




63   © 2013 IBM Corporation
Thank you for listening!




64   © 2013 IBM Corporation
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
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 IBM’s 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 IBM’s 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 user's 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

XPages is Workflow's new best friend

  • 1.
    AD215 XPages Are Workflow's New Best Friend Qian Liang | Advisory Software Engineer @ CDL Stephan Wissel | NotesSensei © 2013 IBM Corporation
  • 2.
    Please note: IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s 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 user's 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 Manager 3 © 2013 IBM Corporation
  • 4.
    Who we are  Qian Liang – China Development Lab  Stephan H. Wissel Advisory Software Engineer NotesSensei  THE MAN who brought you Xflow  XPages advocate (www.wissel.net) (and other Xpages goodness)  Stackoverflow XPages expert 4 © 2013 IBM Corporation
  • 5.
    Who we are  Qian Liang – China Development Lab  Stephan H. Wissel Advisory Software Engineer NotesSensei  THE MAN who brought you Xflow  XPages advocate (www.wissel.net) (and other Xpages goodness)  Stackoverflow XPages expert 5 © 2013 IBM Corporation
  • 6.
    #XpagesFlow 6 © 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 Manager 7 © 2013 IBM Corporation
  • 8.
    Everything is workflow! Business Logic 8 © 2013 IBM Corporation
  • 9.
    Workflow components  Provide information  Validate information  Transform data  Make decisions  Approve Most popular  Notify  Archive 9 © 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.
    Wouldn't it bewonderful if business users could define their own flows? 14 © 2013 IBM Corporation
  • 15.
    Rise of theworkflow engines 15 © 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 ─ Activiti 16 © 2013 IBM Corporation
  • 17.
    Role Resolver  Sample rule: “Every project expenditure above 500$ must be approved by the project manager and the project controller”  Roles run across organisational hierarchies  Role resolving is an art ─ Early (on submission) ─ Late (when a specific step is due) ─ Delegation settings ─ Unavailability of role holder ─ Inaction of role holder 17 © 2013 IBM Corporation
  • 18.
    Workflow standards* 18 © 2013 IBM Corporation *Good we have so many of them!
  • 19.
    The WfMC Referencemodel 19 © 2013 IBM Corporation * Check the references for more
  • 20.
    Workflow for XPages– Open Source project on OpenNTF.org 20 © 2013 IBM Corporation
  • 21.
    Take 1 21 © 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 application 22 © 2013 IBM Corporation
  • 23.
    The plan Build a comprehensive API 2012 Provide simple We are looking at this! Implementation 2013 Link to other WF engine(s) 23 © 2013 IBM Corporation
  • 24.
    com.ibm.xsp.xflow 24 © 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.
    Installation 27 © 2013 IBM Corporation
  • 28.
    The SimpleWorkflow control  Usage ─ Add following library dependency: com.ibm.xsp.extlib.library and com.ibm.xsp.xflow.library ─ Drag SimpleWorkflow control into Xpage ─ In properties of SimpleWorkflow control, define process(see right snapshot) ─ 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 ─ Define identityResolver which can map between workflow user id and Notes id; ─ Define roleResolver which can resolve role name to workflow user id; 28 © 2013 IBM Corporation
  • 29.
    The SimpleWorkflow control 29 © 2013 IBM Corporation
  • 30.
    Workflow actions 30 © 2013 IBM Corporation
  • 31.
    The Sample Application  The sample application is called: End of Year Review. It is an application to help evaluating employee's work in a year. It contains the following workflow: ─ At the beginning of year, employee create an objective for a year ─ Manager approve/reject employee's objective ─ At the end of a year, employee create a self assessment for the year ─ Manager evaluate employee's assessment and give a evaluation result. Create an Create self Employee objective assessment reject approve reject End submit submit approve Evaluate Evaluate Manager objective assessment 31 © 2013 IBM Corporation
  • 32.
    32 © 2013 IBM Corporation
  • 33.
    33 © 2013 IBM Corporation
  • 34.
    Workflow for XPages– Open Source project on OpenNTF.org 34 © 2013 IBM Corporation
  • 35.
    Take 2 35 © 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 license 36 © 2013 IBM Corporation
  • 37.
    BPMN 2.0  Current publication  Complete  Online editor 37 © 2013 IBM Corporation
  • 38.
    Activiti API  Java API  Rest API 38 © 2013 IBM Corporation
  • 39.
    Activiti integration  There are several configurations to integrate Activiti server Rest API Domino Tomcat Workflow App Activiti Server Rest API Domino Domino Workflow App Activiti Server Domino Workflow App Activiti Server 39 © 2013 IBM Corporation
  • 40.
    Activiti integration architecture Domino server for Applications Domino server for workflow engine XPages Server XPage Rest API Activiti Server Activiti Adaptor RDBMS 40 © 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 for the flow chart  Can contain form information 46 © 2013 IBM Corporation
  • 47.
    Task & Formdefinition 47 © 2013 IBM Corporation
  • 48.
    Conditions in UEL 48 © 2013 IBM Corporation
  • 49.
    Workflow Control forActiviti  Usage <workflow> <server>yourFullServerName</server> ─ Add following library dependency: <port>80</port> com.ibm.xsp.extlib.library and com.ibm.xsp.xflow.library <url>http://yourFullServerName/activiti- ─ Create a workflow engine definition file in rest/service</url> WebContent/WEB-INF/workflow/*.workflow, file name is <workflowengine>com.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 </workflow> process(see right snapshot) – processId: process id defined Activiti server – workflowEngineName: workflow engine name defined 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 XPage Lotus Connection Profile Connector Social Common Workflow API Profile Connector Workflow People/Role Engine Adapter Adapter Lotus Workflow Org Connector Simple Activiti IBM Lotus ... Workflow BPM BPM Workflow .... Engine Connector Connector Connector 50 © 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 adaptor 51 © 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 Lombardi 55 © 2013 IBM Corporation
  • 56.
    IBM BPM -Architecture 56 © 2013 IBM Corporation
  • 57.
    IBM BPM –Lombardi integration Domino server for Applications IBM Websphere Server Rest API XPage IBM BPM Server IBM BPM Adapter 57 © 2013 IBM Corporation
  • 58.
    Workflow Control forIBM BPM  Usage <workflow> <server>yourFullServerName</server> ─ Add following library dependency: com.ibm.xsp.extlib.library and com.ibm.xsp.xflow.library <port>80</port> <url>http://yourFullServerName/activiti- ─ Create a workflow engine definition file in rest/service</url> WebContent/WEB-INF/workflow/*.workflow, file name is <workflowengine>com.ibm.xsp.xflow.lo the engine name. File content likes right. mbarid.LombardiWorkflowContextFact ─ Drag Common Workflow Control into XPage ory</workflowengine> ─ In properties of Common Workflow Control, define </workflow> 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 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; 58 © 2013 IBM Corporation
  • 59.
    Status  Latest version under legal review (standard OpenNTF release process)  Activiti version first  IBM BPM integration via IBM Software service agreement  Planning for the next version 59 © 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 disclaimer 60 © 2013 IBM Corporation
  • 61.
    What we haveshown today  Everything is workflow  WXP, you new best WFB (Workflow Buddy)  WXP Extensibility API 61 © 2013 IBM Corporation
  • 62.
    62 © 2013 IBM Corporation
  • 63.
    Q&A #XpagesFlow 63 © 2013 IBM Corporation
  • 64.
    Thank you forlistening! 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 IBM’s 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 IBM’s 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 user's 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