customizing workflows in wso2 api manager

34
WSO2 Vijayaratha Vijayasingam, Lakmali Baminiwatta Customizing Workflows in WSO2 API Manager October, 2014

Upload: wso2

Post on 02-Dec-2014

305 views

Category:

Technology


0 download

DESCRIPTION

-

TRANSCRIPT

Page 1: Customizing workflows in WSO2 API Manager

WSO2Vijayaratha Vijayasingam, Lakmali Baminiwatta

Customizing Workflows in

WSO2 API Manager

October, 2014

Page 2: Customizing workflows in WSO2 API Manager

**

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.

Page 3: Customizing workflows in WSO2 API Manager

**

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

Page 4: Customizing workflows in WSO2 API Manager

**

What WSO2 delivers

Page 5: Customizing workflows in WSO2 API Manager

**

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

Page 6: Customizing workflows in WSO2 API Manager

*

APIs meet SOA

Page 7: Customizing workflows in WSO2 API Manager

*

API Management

A Managed API is:

๏ Actively advertised and subscribe-able

๏ Available with SLAs

๏ Secured, authenticated, authorized and protected

๏ Monitored and monetized with analytics

Page 8: Customizing workflows in WSO2 API Manager

**

API Management

Page 9: Customizing workflows in WSO2 API Manager

**

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

Page 10: Customizing workflows in WSO2 API Manager

*

Workflow integration in WSO2 API Manager 1.7.0

๏ User Sign-Up

๏ Application Creation

๏ Application Registration

๏ API Subscription

Page 11: Customizing workflows in WSO2 API Manager

*

How it works...

Page 12: Customizing workflows in WSO2 API Manager

*

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.

Page 13: Customizing workflows in WSO2 API Manager

*

Workflow complete action

๏ Supports both SOAP and REST

๏ Secured through HTTP Basic Authentication

๏ Expected parameters - ๏ workflowReference ๏ status - APPROVED/REJECTED๏ description - Human Readable Description

Page 14: Customizing workflows in WSO2 API Manager

*

Workflow complete action...

REST

Authorization:Basic YWRtaW46YWRtaW4=

workflowReference=b530be39-9174-43b3-acb3-2603a223b094&status=APPROVED&description=DESCRIPTION

SOAP

Page 15: Customizing workflows in WSO2 API Manager

*

Workflow configuration

๏ /_system/governance/apimgt/applicationdata/workflow-extensions.xml

Page 16: Customizing workflows in WSO2 API Manager

*

Workflow support for multi tenants

๏ Allows different tenants to define their own custom

workflows.

๏ Allows to define tenant specific human tasks.

Page 17: Customizing workflows in WSO2 API Manager

*

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

Page 18: Customizing workflows in WSO2 API Manager

*

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{

Page 19: Customizing workflows in WSO2 API Manager

*

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) .. { ..

Page 20: Customizing workflows in WSO2 API Manager

*

Customizing the Workflow Executor

Send an email to Administrator for approval

Send Email to Administrator

Page 21: Customizing workflows in WSO2 API Manager

*

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);}

Page 22: Customizing workflows in WSO2 API Manager

*

Demo

Page 23: Customizing workflows in WSO2 API Manager

*

Customizing the Business Process

Page 24: Customizing workflows in WSO2 API Manager

*

Customizing the Business Process

๏ WSO2 Developer Studio - Business Process EditorSubscription Creation

Default FlowSubscription Creation

Custom Flow

Page 25: Customizing workflows in WSO2 API Manager

*

Executing the Business Processes

Page 26: Customizing workflows in WSO2 API Manager

*

Demo

Page 27: Customizing workflows in WSO2 API Manager

*

Workflow Extensions - Future Enhancements

๏ API Lifecycle State Change

๏ More coming up in future releases...

Page 29: Customizing workflows in WSO2 API Manager

*

Questions?

Page 30: Customizing workflows in WSO2 API Manager

**

Business Model

Page 32: Customizing workflows in WSO2 API Manager

**

Page 33: Customizing workflows in WSO2 API Manager

**

Page 34: Customizing workflows in WSO2 API Manager

Contact us !