Your SlideShare is downloading. ×
0
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Apache HISE + Apache Camel
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Apache HISE + Apache Camel

3,907

Published on

Task Handling …

Task Handling
Using Open Source Components
(Apache HISE, Apache Camel)

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,907
On Slideshare
0
From Embeds
0
Number of Embeds
14
Actions
Shares
0
Downloads
43
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  1. Task Handling Using Open Source Components (Apache HISE, Apache Camel) Rafał Rusin rr@touk.pl  Warsjava 2010­10­23 info@touk.plinfo@touk.pl
  2. Introduction to WS Human Task Introduction to WS Human Task  ► Specification describes an XML language to enable  the integration of human beings in SOA systems ► Human tasks are services "implemented" by people, like  transation service or approval service ► Human task definition (htd) specifies various task  properties, like task name, people assignments  (potential owners, administrators), task renderings (to  present task subject and contents), timeouts,  escalations and notifications.
  3. WS Human Task ExampleWS Human Task Example ► Creating sample Human Task Definition (HTD file) <htd:humanInteractions> <htd:tasks> <htd:task name="ClaimsHandling"> <htd:interface portType="tns:ClaimsHandlingPT" operation="approve" responsePortType="tns:ClaimsResolvingPT" responseOperation="resolve"/> <htd:peopleAssignments> <htd:potentialOwners> <htd:from> <htd:literal> <htd:organizationalEntity> <htd:users> <htd:user>Fred</htd:user> </htd:users> </htd:organizationalEntity> </htd:literal> </htd:from> </htd:potentialOwners> </htd:peopleAssignments> ...
  4. WS Human Task ExampleWS Human Task Example ► Defining Task presentation (Subject and Description) <htd:presentationElements> <htd:name xml:lang="en-US"> Approve Claim </htd:name> <htd:presentationParameters> <htd:presentationParameter name="firstname" type="xsd:string"> xs:string(htd:getInput("ClaimApprovalRequest")/cla:cust/cla:firstname) </htd:presentationParameter> ... </htd:presentationParameters> <htd:subject xml:lang="en-US"> Approve the insurance claim for PLN {$euroAmount} on behalf of {$firstname {$lastname} </htd:subject> <htd:description xml:lang="en-US" contentType="text/plain"> Approve this claim following corporate guideline #4711.0815/7 for {$firstname} {$lastname} </htd:description> </htd:presentationElements>
  5. WS Human Task ExampleWS Human Task Example ► Specifying outcome to external system on Task  completion <htd:outcome> <![CDATA[ <cla:resolve> <claimId>{htd:getInput("ClaimApprovalRequest")/cla:cust/cla:id/text()}</claimId> <ok>{$outcome}</ok> </cla:resolve> ]]> </htd:outcome>
  6. Task OperationsTask Operations ► Task Operations Service is specified in WSDL format ● It contains 74 operations to perform by various types of users,  like Task Owners, Business Administrators, etc. ● Authentication is required to access those operations  (for example WS Security) ► Example operation ● listing tasks <xsd:getMyTasks> <xsd:taskType>ALL</xsd:taskType> <xsd:genericHumanRole>ACTUALOWNER</xsd:genericHumanRole> <xsd:maxTasks>10</xsd:maxTasks> </xsd:getMyTasks>
  7. Task Operations: Basic Task LifecycleTask Operations: Basic Task Lifecycle ► Basic Task lifecycle consists of claim, start and  complete operations performed by Task Operator <xsd:claim> <xsd:identifier>123</xsd:identifier> </xsd:claim> <xsd:start> <xsd:identifier>123</xsd:identifier> </xsd:start> <xsd:complete> <xsd:identifier>123</xsd:identifier> <xsd:taskData>someOutputData</xsd:taskData> </xsd:complete>
  8. Task Operations: Advanced LifecycleTask Operations: Advanced Lifecycle ► Task Operations allow various operations.  Examples are:  Forwarding, Nomination, Suspend / Resume,  Suspend Until ► Additional operations are: Managing Attachments, Renderings, Task Priority,  Querying tasks using where clause
  9. Apache HISE Apache HISE  WS Human Task ImplementationWS Human Task Implementation ► HISE is Human Interactions Service Engine http://incubator.apache.org/hise ► Why Open Source? ● We believe it's better to not reinvent wheel in each project  dealing with tasks handling ● We feel it's better to start from existing project instead of  developing Task Handling engine from scratch ● We accept extensions to suit needs for various projects  requirements
  10. Apache HISE ­ InstallationApache HISE ­ Installation ► What's inside: ● Engine (JPA based, H2 Database by default) ● Camel Integration ● GWT Frontend for Task Operators ► Detailed instructions are in User Guide ● http://incubator.apache.org/hise/user­guide.xhtml ► WAR Distribution ● Unzip and put htd files in WEB­INF directory ► ServiceMix 4 OSGi Distribution ● features:install hise­h2­test­example­osgi ► GWT Frontend in separate web application (WAR)
  11. Apache HISEApache HISE Claims Handling ExampleClaims Handling Example ► Detailed instructions are in User Guide ● http://incubator.apache.org/hise/user­guide.xhtml ► WAR Distribution ● Unzip and put htd files in WEB­INF directory ► ServiceMix 4 OSGi Distribution ● features:addUrl mvn:org.apache.hise/hise­karaf/1.0.0­ SNAPSHOT/xml/features ● features:addUrl mvn:org.apache.hise.examples/claims­ handling­karaf/1.0.0­SNAPSHOT/xml/features ● features:install claims­handling­example­osgi
  12. Apache HISEApache HISE Claims Handling ExampleClaims Handling Example ► We pick ServiceMix 4 OSGi example ► Task Operations is exposed under ●  http://localhost:8181/cxf
  13. Apache HISE ­ Camel IntegrationApache HISE ­ Camel Integration ► Camel integration is done using simple Camel Context ► HISE exposes two direct Camel endpoints for each Task <bean id="hiseRouteBuilder" class="org.apache.hise.engine.store.HISERouteBuilder"> <property name="humanInteractionsResource" value="classpath:Htd1.xml"/> <property name="hiseEngine" ref="hiseEngine"/> <property name="transactionManager" ref="transactionManager"/> </bean> <camel-osgi:camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring"> <routeBuilder ref="hiseRouteBuilder"/> <route> <from uri="file:input?delete=true" /> <to uri="direct:ClaimsHandling"/> </route> <route> <from uri="direct:ClaimsResolving"/> <to uri="file:output"/> </route> </camel-osgi:camelContext>
  14. Apache HISEApache HISE Claims Handling ExampleClaims Handling Example ► After installing example, we can copy approve.xml file  to input directory to create a task ► Then, we can resolve it using either call to Task  Operations Web Service or GWT frontend ► After Task is processed, outcome is sent to output  directory (as specified in Camel Context) <message xmlns:cla="http://www.insurance.example.com/claims"> <cla:cust> <cla:id>123</cla:id> <cla:firstname>Edmund</cla:firstname> <cla:lastname>Zorn</cla:lastname> </cla:cust> <cla:amount>1234</cla:amount> <cla:region>usa</cla:region> <cla:prio>2</cla:prio> <cla:activateAt>2009-01-02T12:00:00</cla:activateAt> </message>
  15. Apache HISE – GWT FrontendApache HISE – GWT Frontend ► We can manipulate tasks using GWT Frontent  application. Following screenshot shows how it looks like
  16. Apache HISE Apache HISE  Future Plans & SummaryFuture Plans & Summary ► Release 1.0 version (it's almost out) ► Extend Camel usage  ● We plan to expose Task Operations directly over Camel ► Adding Forms to GWT Frontend using Renderings ► Simplify GWT Frontent by integrating directly with  Camel ► Our community is growing.  We have 7 current committers and 3 pending to vote. ► HISE has commercial application  (it's running in production)

×