workflow for xpages

29
Workflow for XPages

Upload: niklas-heidloff

Post on 22-Nov-2014

24.488 views

Category:

Technology


9 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Workflow for XPages

Workflow for XPages

Page 2: Workflow for XPages

2

Agenda

● Objectives● Workflow Types● Design Goal● Architecture● Introduce to sample application● Guide to setup sample application● How to run the sample application● How to use the workflow engine● How to setup development environment

Page 3: Workflow for XPages

3

Objectives

● Promote a common Workflow capability across products▬ Make it platform agnostic with drivers that encapsulate the platform differences

▬ Full based on top of Java/OSGi▬ Come with a robust implementation dedicated to the Domino platform▬ Allow the move to a more robust architecture, like Lombardi

● Increase the Domino Application Development capability by providing an easy to use Workflow capability

▬ Increase the value of Domino as an application development platform▬ Better compete with Microsoft Sharepoint, and .NET▬ Workflow is one of the Domino app dev selling point, so make it real!

Page 4: Workflow for XPages

4

Workflow Types

● Different types of workflows are available▬ Ad hoc workflows, for simple, no administration workflows

▬ Defined as part of the forms, using simple components● Similar to the Workflow sub form

▬ Changing a process means opening Domino Designer and editing an XPage component

▬ Actions are happening synchronously▬ Managed Workflows

▬ Defined outside of the form, generally is external databases▬ Actions are happening asynchronously, using a background router

● Workflow context abstraction▬ The workflow is accessed the same way, regardless of the underlying implementation

● XPages common controls▬ Comes with a set of ready to use controls (action bar, display history...), connected to

the worklow context

Page 5: Workflow for XPages

5

Design Goals● Make the workflow engine easy to use and integrate for the simple

cases▬ Predefined Workflow templates

▬ Simple approval...▬ Easy to parameterize▬ Connects to the existing infrastructure (directory, ...)

▬ Built-in drivers▬ Ready to go set of XPages controls/API

● Make the engine customizable for more complex cases▬ Custom workflow templates

▬ Requires some custom Java/XPages custom development● Developer can use similar API to access workflow data regardless of the

workflow type▬ A workflow context object exposes the current state of the workflow and allows actions to

be triggered● Ensure that nothing is “hard coded” but provided through pluggable

services▬ From an XPages standpoint, the services will be available through Complex types

Page 6: Workflow for XPages

6

Architecture

XPage

Workflow Engine Adapter

People Adapter

Common Workflow API

Simple Workflow Engine

Lombadi BPM Connector

Lotus Connection

Profile Connector

Social Profile Connector

Lotus Workflow Connector

....

Lotus Workflow Org Connector

...

Page 7: Workflow for XPages

7

Introduction to the Sample ApplicationThe 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:1. At the beginning of year, employee create an objective for a year2. Manager approve/reject employee's objective3. At the end of a year, employee create a self assessment for the year4. Manager evaluate employee's assessment and give a evaluation result.

Employee

Manager

Create an objective

Evaluate objective

Create self assessment

Evaluate assessment

submit

reject approve

submit

rejectEnd

approve

Page 8: Workflow for XPages

8

Guide to Setup Sample Application1. Install XPage Extension Library first;2. Unzip the xflow.zip and get com.ibm.xsp.xflow.updatesite.zip. Install the update site to

Domino.3. Copy the Sample NSF(EmployeeReview.nsf) to domino data folder. The default user has

manager authority, please change access control if needed.4. Sign the design elements5. Access Admin Page ("http://yourDominoServer/EmployeeReview.nsf/WebAdmin.xsp"),

input 3 Notes users in your Domino server, press “Create Sample data set” button to generate sample data, including Employee Data and Review Data(These three users will be added to the demo workflow system).

6. If you want to create more employee, you can create them with Employee form in Notes client(see explanation of Employee field in page 10).

Page 9: Workflow for XPages

9

Guide to Setup Sample Application (cont')7. The Navigation List on Admin Page(Home page) has entries to access “Create Review”,

"WebMyReviews.xsp", "WebMyEmployees.xsp", "WebMyTodo.xsp", ▬ in "WebMyReviews.xsp" page, user can choose one employee to view his/her review

process, if the review process is not finished, you can edit it.▬ in "WebMyEmployees.xsp" page, manager can view all the review process in the tree

structure of Manager and his/her managed people, if the review process is not finished, you can edit it. (Only manager or XFlow_admin role can view this page)

8. In "WebEditReview.xsp", you can see the sample usage of "xe:simpleWorkflow". We can define a simple workflow with it.

Page 10: Workflow for XPages

10

Employee Form

ID to identify user in workflow system

Corresponding Notes ID for workflow user

User's manager id

All managed people ids, separated with comma.

User's second line manager id and user's manager id

Page 11: Workflow for XPages

11

How to Run the Sample Application1.Login the sample application with an admin user(with Manager authority), and press "Setup" button

Page 12: Workflow for XPages

12

How to Run the Sample Application2.In setup page, input 3 valid Notes Ids of your Domino server: one for employee, one for first line manager, one for second line manager. Click "Create Sample Data Set" will generate sample data for you.

Page 13: Workflow for XPages

13

How to Run the Sample Application2.In setup page, input 3 valid Notes Ids of your Domino server: one for employee, one for first line manager, one for second line manager. Click "Create Sample Data Set" will generate sample data for you.

Page 14: Workflow for XPages

14

How to Run the Sample Application3.Login with employee Notes Id. In "My Reviews", you will see 3 years' reviews. For current year, if it is still in "Objectives to be submitted", you can click on "Edit".

Page 15: Workflow for XPages

15

How to Run the Sample Application4.The employee can input this year's objective and submit it.

Page 16: Workflow for XPages

16

How to Run the Sample Application5.Login as first line manager id and in the "Pending Tasks" view, you can see all current tasks including the Objective submitted by previous employee. You can click "Edit" view detail information of the objective.

Page 17: Workflow for XPages

17

How to Run the Sample Application5.Login as first line manager id and in the "Pending Tasks" view, you can see all current tasks including the Objective submitted by previous employee. You can click "Edit" view detail information of the objective.

Page 18: Workflow for XPages

18

How to Run the Sample Application6.As manager, you can input objective comments and Approve/Reject employee's objective. Once approved, the document will return to employee to input assessment.

Page 19: Workflow for XPages

19

How to Run the Sample Application7.Login as employee and input self assessment and submit.

Page 20: Workflow for XPages

20

How to Run the Sample Application8.Login as first line manager, you can find employee's assessment in “Pending Tasks”. You can input manager assessment and select a evaluation result.

Page 21: Workflow for XPages

21

How to Run the Sample Application8.Login as first line manager, you can find employee's assessment in “Pending Tasks”. You can input manager assessment and select a evaluation result.

Page 22: Workflow for XPages

22

How to Run the Sample Application9.As first line manager, you can also view all employees' reviews in "My Employees" view.

Page 23: Workflow for XPages

23

How to Use the Workflow Engine:● For simple ad hoc workflow applications

● You can use the workflow engine directly in this distribution(called SimpleWorkflow)

● In your XPage, you can use workflowContext to access the workflow engine data

● For complex workflow applications● You can implement your own workflow custom control to

integrate third party workflow engine● In your XPage, you can use workflowContext to access the

workflow engine data

Page 24: Workflow for XPages

24

Use Simple Workflow Engine● For simple ad hoc workflow

application, you can use the workflow engine in this distribution

▬ In Application Properties → Advanced tab, add required libraries: com.ibm.xsp.extlib.library and com.ibm.xsp.xflow.library

▬ Drag the SimpleWorkflow control to your Xpage

▬ Define your workflow process in SimpleWorkflow's “Process” property

▬ Design your form in the XPage as usual

▬ Access workflow data through data bean workflowContext in Xpage

▬ Use custom control wkWorkflowActions to show workflow action bar

Page 25: Workflow for XPages

25

How to Setup Development Environment1. Install Domino server and Eclipse 3.6 or 3.4 above2. Download XPage Extension Library3. Install XPage Extension Library to Domino server: unzip the XPageExtensionLibrary.zip

and get the updatesite.zip; Unzip the updatesite.zip, copy the unzipped folder into \Domino\data\domino\workspace\applications\eclipse

4. Follow this guide to setup debug env: http://www.openntf.org/Projects/pmt.nsf/6EA1D2D26DF8D5BC862577D00055BB21/%24file/Lotus%20Domino%20Debug%20Plugin.pdf(Use the JVM installed in dominon directory <Domino Install Directory>\Domino\jvm)

5. Import XFlow source code to Eclipse workspace, set the target platform to Domino\osgi\rcp\eclipse, Domino\osgi\shared\eclipse, Domino\data\domino\workspace\applications\eclipse

6. Copy the sample NSF(EmployeeReview.nsf) to your Domino data directory7. In Domino Designer there maybe errors, you also need install updatesite.zip to domino

designer. You also need to install update site "com.ibm.xsp.xflow.updatesite.zip" into Designer.

Page 26: Workflow for XPages

26

Backup

Page 27: Workflow for XPages

27

Demo app snapshot: Admin page to create sample data

Page 28: Workflow for XPages

28

Demo app snapshot: employee creates "End of Year Review"

Page 29: Workflow for XPages

29

Demo app snapshot: manager list all employee's "End of Year Review"