customizing workflows in wso2 api manager
DESCRIPTION
-TRANSCRIPT
WSO2Vijayaratha Vijayasingam, Lakmali Baminiwatta
Customizing Workflows in
WSO2 API Manager
October, 2014
**
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.
**
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
**
What WSO2 delivers
**
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
*
APIs meet SOA
*
API Management
A Managed API is:
๏ Actively advertised and subscribe-able
๏ Available with SLAs
๏ Secured, authenticated, authorized and protected
๏ Monitored and monetized with analytics
**
API Management
**
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
*
Workflow integration in WSO2 API Manager 1.7.0
๏ User Sign-Up
๏ Application Creation
๏ Application Registration
๏ API Subscription
*
How it works...
*
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.
*
Workflow complete action
๏ Supports both SOAP and REST
๏ Secured through HTTP Basic Authentication
๏
๏ Expected parameters - ๏ workflowReference ๏ status - APPROVED/REJECTED๏ description - Human Readable Description
*
Workflow complete action...
REST
Authorization:Basic YWRtaW46YWRtaW4=
workflowReference=b530be39-9174-43b3-acb3-2603a223b094&status=APPROVED&description=DESCRIPTION
SOAP
*
Workflow configuration
๏ /_system/governance/apimgt/applicationdata/workflow-extensions.xml
*
Workflow support for multi tenants
๏ Allows different tenants to define their own custom
workflows.
๏ Allows to define tenant specific human tasks.
*
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
*
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{
*
Customizing the Workflow Executor - Methods to Override
//Logic to execute the workflowpublic void execute(WorkflowDTO workflowDTO).. { ..
//Logic to complete the workflowpublic void complete(WorkflowDTO workflowDTO)..{ ..
//Returns the workflow type - ex: WF_TYPE_AM_USER_SIGNUPpublic String getWorkflowType() { ..
//Used to get workflow detailspublic List<WorkflowDTO> getWorkflowDetails(String workflowStatus) .. { ..
*
Customizing the Workflow Executor
Send an email to Administrator for approval
Send Email to Administrator
*
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);}
*
Demo
*
Customizing the Business Process
*
Customizing the Business Process
๏ WSO2 Developer Studio - Business Process EditorSubscription Creation
Default FlowSubscription Creation
Custom Flow
*
Executing the Business Processes
*
Demo
*
Workflow Extensions - Future Enhancements
๏ API Lifecycle State Change
๏ More coming up in future releases...
*
Documentation
๏ https://docs.wso2.com/display/AM170/Adding+Workflow+Extensions
*
Questions?
**
Business Model
**
Call to action page
๏ Product documentation home page(http://docs.wso2.org/display/AM160/WSO2+API+Manager+Documentation)
๏ 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/)
**
**
Contact us !