WSRP Portlets - mandsdesign.net

Download Report

Transcript WSRP Portlets - mandsdesign.net

Business Process
Management and Workflow
Copyright © 2000-2007 Liferay, Inc.
All Rights Reserved.
No material may be reproduced electronically or in print without written
permission from Liferay, Inc.
Objectives
Business Process Management - Workflow
1. What is BPM (jPDL & WS-BPEL)?
2. How does it work?
3. BPM in Action
4. An Example in Liferay
What is BPM?
BPM = Business Process management
• Encompassing methods, techniques and tools
to design, enact, control, and analyze
operational business processes involving
humans, organizations, applications,
documents and other sources of information.
• A business process is a set of linked activities
that creates value by transforming an input into
a more valuable output.
What is BPM?
BPM = Business Process management
• Business process - a set of linked activities
that creates value by transforming an input into
a more valuable output.
• BPM Encompasses methods, techniques and
tools to design, enact, control, and analyze
operational business processes involving
humans, organizations, applications,
documents and other sources of information.
• Workflow - series of tasks within an
organization to produce a final outcome.
How it works
BPEL-Business Process Execution Language
• A business process modeling language that is
executable.
–
–
–
–
–
interact with external entities through Web Service operations
use an XML based language
Define a set of Web service orchestration concepts
Provide both hierarchical and graph-like control regimes
Provide data manipulation functions
• An Orchestration language - not a choreography
language
• WS-BPEL 2.0 & BPEL4WS 1.1
An Example – WS-BPEL
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
<process name="Hello"
targetNamespace="http://eclipse.org/bpel/sample"
suppressJoinFailure="yes"
xmlns:tns="http://eclipse.org/bpel/sample"
xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
>
……
<sequence name="main">
<!-- Receive input from requestor.
Note: This maps to operation defined in Hello.wsdl
-->
<receive name="receiveInput" partnerLink="client"
portType="tns:Hello"
operation="initiate" variable="input"
createInstance="yes"/>
<invoke name="callbackClient"
partnerLink="client"
portType="tns:HelloCallback"
operation="onResult"
inputVariable="output"
/>
</sequence>
</process>
An Example – WS-BPEL
How it works
jPDL - jBPM Process Definition Language
• An intuitive process language to express
business processes graphically in terms of
tasks, wait states for asynchronous
communication, timers, automated
actions.
jPDL
jPDL - jBPM Process Definition Language
• An intuitive process language to express
business processes graphically in terms of
tasks, wait states for asynchronous
communication, timers, automated
actions.
An Example - jPDL
•
<?xml version="1.0" encoding="UTF-8"?>
•
•
•
•
•
<process-definition
xmlns="urn:jbpm.org:jpdl-3.1" name="Hello">
<start-state name="start">
<transition name="To_auction" to="auction">
<action name="action"
class="com.jbay.HelloActionHandler"></action>
</transition>
</start-state>
<state name="auction">
<transition name="To_end" to="end"></transition>
</state>
<end-state name="end"></end-state>
</process-definition>
•
•
•
•
•
•
•
An Example - jPDL
BPM in Action
Security
BPEL4WS / WS-BPEL
Transports
Reliable
messaging
Composable
service
assurances
Transactions
XSD,WSDL,UDDI,Policy,Metadata Exchange
Transports
XML, SOAP, Addressing
Messaging
HTTP, HTTPS, SMTP
Transports
BPM in Action
An Example in Liferay
Workflow - as a web service
• UI: Add content: Workflow
• Link:
com.liferay.portlet.workflow.service.WorkflowComponentServiceUtil
• BPM engine: jBPM at portal/jbpm-web
• Model: com.liferay.portlet.workflow.model;
• Page: portal/portal-web/html/portlet/workflow/init.jsp,
view.jsp
• Portlet Type:
Struts portlet at portal/portal-ejb/src
• com.liferay.portlet.workflow.action
An Example in Liferay
Code Review – at source-bpm/WorkflowComponentServiceUtil.java
•
•
•
•
•
•
•
•
•
public static java.util.List getInstances(long definitionId,
long instanceId, java.lang.String definitionName,
java.lang.String definitionVersion, java.lang.String startDateGT,
java.lang.String startDateLT, java.lang.String endDateGT,
java.lang.String endDateLT, boolean hideEndedTasks,
boolean andOperator, int begin, int end)
throws com.liferay.portal.kernel.jbi.WorkflowComponentException,
java.rmi.RemoteException {
WorkflowComponentService workflowComponentService =
WorkflowComponentServiceFactory.getService();
•
•
•
return workflowComponentService.getInstances(definitionId, instanceId,
definitionName, definitionVersion, startDateGT, startDateLT,
endDateGT, endDateLT, hideEndedTasks, andOperator, begin,
end);
•
}
Revision History
Jonas Yuan
05/30/07
Created for Liferay 4.2.2