Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Customizing workflows in WSO2 API Manager

1,787 views

Published on

-

Published in: Technology

Customizing workflows in WSO2 API Manager

  1. 1. Customizing Workflows in Vijayaratha Vijayasingam, Lakmali Baminiwatta WSO2 WSO2 API Manager October, 2014
  2. 2. * About the Presenter(s) Lakamali joined WSO2 in September 2011. She is a senior software engineer in the WSO2 API Manager team where she mainly focuses on the development of the product. Ratha joined WSO2 in June 2008. She is a Senior Software engineer in the WSO2 API Manager team. In addition to her product development efforts she has also been a part of several onsite customer engagements.
  3. 3. * About WSO2 ๏ Global enterprise, founded in 2005 by acknowledged leaders in XML, web services technologies, standards and open source ๏ Provides only open source platform-as-a- service for private, public and hybrid cloud deployments ๏ All WSO2 products are 100% open source and released under the Apache License Version 2.0. ๏ Is an Active Member of OASIS, Cloud Security Alliance, OSGi Alliance, AMQP Working Group, OpenID Foundation and W3C. ๏ Driven by Innovation ๏ Launched first open source API Management solution in 2012 ๏ Launched App Factory in 2Q 2013 ๏ Launched Enterprise Store and first open source Mobile solution in 4Q 2013
  4. 4. * What WSO2 delivers
  5. 5. * Agenda ๏ API Management - Introduction ๏ Workflow extensions. Why are they important? ๏ Workflow integration capabilities in WSO2APIManager ๏ Workflow support for multi tenants ๏ Customizing workflows ๏ Customizing the workflow executor ๏ Future enhancements ๏ Demo
  6. 6. * APIs meet SOA
  7. 7. * API Management A Managed API is: ๏ Actively advertised and subscribe-able ๏ Available with SLAs ๏ Secured, authenticated, authorized and protected ๏ Monitored and monetized with analytics
  8. 8. * API Management
  9. 9. * Workflow extensions. Why are they important? Workflow - Describes the tasks, procedural steps, organizations or people involved, required input/output , and tools needed for each step in a business process. ๏ Governance ๏ Auditing ๏ Extensions
  10. 10. * Workflow integration in WSO2 API Manager 1.7.0 ๏ User Sign-Up ๏ Application Creation ๏ Application Registration ๏ API Subscription
  11. 11. * How it works...
  12. 12. * Workflow trigger action ๏ workflowExternalRef - A unique ID which maps the internal workflow reference to the external workflow instance. ๏ callbackURL - Where to call back when the workflow completes.
  13. 13. * Workflow complete action ๏ Supports both SOAP and REST ๏ Secured through HTTP Basic Authentication ๏ ๏ Expected parameters - ๏ workflowReference ๏ status - APPROVED/REJECTED ๏ description - Human Readable Description
  14. 14. * Workflow complete action... REST Authorization:Basic YWRtaW46YWRtaW4= workflowReference=b530be39-9174-43b3-acb3- 2603a223b094&status=APPROVED&description=DESCRIP TION SOAP
  15. 15. * Workflow configuration ๏ /_system/governance/apimgt/applicationdata/workflow-extensions.xml
  16. 16. * Workflow support for multi tenants ๏ Allows different tenants to define their own custom workflows. ๏ Allows to define tenant specific human tasks.
  17. 17. * Customizing workflows - When to do What? ๏ Customizing the Workflow Executor ๏ When you need to change the workflow logic ๏ When you need to change the Data Formats ๏ Customizing the Business Process ๏ When you are happy with the Data Formats and need to change only the business flow
  18. 18. * Customizing the Workflow Executor /** * This is the class that should be extended by each workflow executor implementation. */ public abstract class WorkflowExecutor { /** * The Application Registration Web Service Executor. */ public class ApplicationRegistrationWSWorkflowExecutor extends WorkflowExecutor{
  19. 19. * Customizing the Workflow Executor - Methods to Override //Logic to execute the workflow public void execute(WorkflowDTO workflowDTO).. { .. //Logic to complete the workflow public void complete(WorkflowDTO workflowDTO)..{ .. //Returns the workflow type - ex: WF_TYPE_AM_USER_SIGNUP public String getWorkflowType() { .. //Used to get workflow details public List<WorkflowDTO> getWorkflowDetails(String workflowStatus) .. { ..
  20. 20. * Customizing the Workflow Executor Send an email to Administrator for approval Send Email to Administrator
  21. 21. * Sending an email to Administrator upon Application Registration ๏ Write a new executor extending ApplicationRegistrationWSWorkflowExecutor public class AppRegistrationEmailSender extends ApplicationRegistrationWSWorkflowExecutor { ๏ Add private String attributes and public getters and setters for email properties (adminEmail, emailAddress, emailPassword) ๏ Override execute(WorkflowDTO workflowDTO) method and implement email sending logic. Finally invoke super.execute(workflowDTO). public void execute(WorkflowDTO workflowDTO) { sendEmail(adminEmail, emailAddress, emailPassword); super.execute(workflowDTO); }
  22. 22. * Demo
  23. 23. * Customizing the Business Process
  24. 24. * Customizing the Business Process ๏ WSO2 Developer Studio - Business Process Editor Subscription Creation Default Flow Subscription Creation Custom Flow
  25. 25. * Executing the Business Processes
  26. 26. * Demo
  27. 27. * Workflow Extensions - Future Enhancements ๏ API Lifecycle State Change ๏ More coming up in future releases...
  28. 28. * Documentation ๏ https://docs.wso2. com/display/AM170/Adding+Workflow+Extensions
  29. 29. * Questions?
  30. 30. * Business Model
  31. 31. * Call to action page ๏ Product documentation home page(http://docs.wso2. org/display/AM160/WSO2+API+Manager+Documentati on) ๏ Workflow Extensions Documentation (https://docs. wso2.org/display/AM160/Workflow+Extensions) ๏ Product home page(http://wso2.com/products/api-manager/) ๏ WSO2 API Manager Webinar Series (http://wso2. com/landing/wso2-apim-webinar-series/)
  32. 32. *
  33. 33. *
  34. 34. Contact us !

×