• Like

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Apache HISE + Apache Camel

  • 3,840 views
Uploaded on

Task Handling …

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

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,840
On Slideshare
0
From Embeds
0
Number of Embeds
14

Actions

Shares
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 [email_address] Warsjava 2010-10-23 [email_address]
  • 2. Introduction to WS Human Task
    • Specification describes an XML language to enable the integration of human beings in SOA systems
    • 3. Human tasks are services "implemented" by people, like transation service or approval service
    • 4. 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.
  • 5. WS Human Task Example
    • Creating sample Human Task Definition (HTD file)
    <htd:humanInteractions> <htd:tasks> <htd:task name=&quot;ClaimsHandling&quot;> <htd:interface portType=&quot;tns:ClaimsHandlingPT&quot; operation=&quot;approve&quot; responsePortType=&quot;tns:ClaimsResolvingPT&quot; responseOperation=&quot;resolve&quot;/> <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> ...
  • 6. WS Human Task Example
    • Defining Task presentation (Subject and Description)
    <htd:presentationElements> <htd:name xml:lang=&quot;en-US&quot;> Approve Claim </htd:name> <htd:presentationParameters> <htd:presentationParameter name=&quot;firstname&quot; type=&quot;xsd:string&quot;> xs:string(htd:getInput(&quot;ClaimApprovalRequest&quot;)/cla:cust/cla:firstname) </htd:presentationParameter> ... </htd:presentationParameters> <htd:subject xml:lang=&quot;en-US&quot;> Approve the insurance claim for PLN {$euroAmount} on behalf of {$firstname {$lastname} </htd:subject> <htd:description xml:lang=&quot;en-US&quot; contentType=&quot;text/plain&quot;> Approve this claim following corporate guideline #4711.0815/7 for {$firstname} {$lastname} </htd:description> </htd:presentationElements>
  • 7. WS Human Task Example
    • Specifying outcome to external system on Task completion
    <htd:outcome> <![CDATA[ <cla:resolve> <claimId>{htd:getInput(&quot;ClaimApprovalRequest&quot;)/cla:cust/cla:id/text()}</claimId> <ok>{$outcome}</ok> </cla:resolve> ]]> </htd:outcome>
  • 8. Task 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.
      • 9. 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>
  • 10. Task 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>
  • 11. Task Operations: Advanced Lifecycle
    • Task Operations allow various operations. Examples are: Forwarding, Nomination, Suspend / Resume, Suspend Until
    • 12. Additional operations are: Managing Attachments, Renderings, Task Priority, Querying tasks using where clause
  • 13. Apache HISE WS Human Task Implementation
    • HISE is Human Interactions Service Engine http://incubator.apache.org/hise
    • 14. Why Open Source?
      • We believe it's better to not reinvent wheel in each project dealing with tasks handling
      • 15. We feel it's better to start from existing project instead of developing Task Handling engine from scratch
      • 16. We accept extensions to suit needs for various projects requirements
  • 17. Apache HISE - Installation
    • What's inside:
      • Engine (JPA based, H2 Database by default)
      • 18. Camel Integration
      • 19. 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)
  • 20. Apache HISE Claims 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
      • 21. features:addUrl mvn:org.apache.hise.examples/claims-handling-karaf/1.0.0-SNAPSHOT/xml/features
      • 22. features:install claims-handling-example-osgi
  • 23. Apache HISE Claims Handling Example
    • We pick ServiceMix 4 OSGi example
    • 24. Task Operations is exposed under
      • http://localhost:8181/cxf
  • 25. Apache HISE - Camel Integration
    • Camel integration is done using simple Camel Context
    • 26. HISE exposes two direct Camel endpoints for each Task
    <bean id=&quot;hiseRouteBuilder&quot; class=&quot;org.apache.hise.engine.store.HISERouteBuilder&quot;> <property name=&quot;humanInteractionsResource&quot; value=&quot;classpath:Htd1.xml&quot;/> <property name=&quot;hiseEngine&quot; ref=&quot;hiseEngine&quot;/> <property name=&quot;transactionManager&quot; ref=&quot;transactionManager&quot;/> </bean> <camel-osgi:camelContext id=&quot;camelContext&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;> <routeBuilder ref=&quot;hiseRouteBuilder&quot;/> <route> <from uri=&quot;file:input?delete=true&quot; /> <to uri=&quot;direct:ClaimsHandling&quot;/> </route> <route> <from uri=&quot;direct:ClaimsResolving&quot;/> <to uri=&quot;file:output&quot;/> </route> </camel-osgi:camelContext>
  • 27. Apache HISE Claims Handling Example
    • After installing example, we can copy approve.xml file to input directory to create a task
    • 28. Then, we can resolve it using either call to Task Operations Web Service or GWT frontend
    • 29. After Task is processed, outcome is sent to output directory (as specified in Camel Context)
    <message xmlns:cla=&quot;http://www.insurance.example.com/claims&quot;> <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>
  • 30. Apache HISE – GWT Frontend
    • We can manipulate tasks using GWT Frontent application. Following screenshot shows how it looks like
  • 31. Apache HISE Future Plans & Summary
    • Release 1.0 version (it's almost out)
    • 32. Extend Camel usage
      • We plan to expose Task Operations directly over Camel
    • Adding Forms to GWT Frontend using Renderings
    • 33. Simplify GWT Frontent by integrating directly with Camel
    • 34. Our community is growing. We have 7 current committers and 3 pending to vote.
    • 35. HISE has commercial application (it's running in production)