diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java index 15d01823a9bd..eba5eb10b49f 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java @@ -111,6 +111,7 @@ import org.wso2.carbon.apimgt.impl.utils.ContentSearchResultNameComparator; import org.wso2.carbon.apimgt.impl.utils.VHostUtils; import org.wso2.carbon.apimgt.impl.workflow.ApplicationDeletionApprovalWorkflowExecutor; +import org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor; import org.wso2.carbon.apimgt.impl.workflow.GeneralWorkflowResponse; import org.wso2.carbon.apimgt.impl.workflow.WorkflowConstants; import org.wso2.carbon.apimgt.impl.workflow.WorkflowException; @@ -2357,6 +2358,10 @@ else if (APIConstants.API_KEY_TYPE_SANDBOX.equals(tokenType)) { } else { throw new APIManagementException("Invalid Token Type '" + tokenType + "' requested."); } + + if (appRegistrationWorkflow == null ) { + appRegistrationWorkflow = new ApplicationRegistrationSimpleWorkflowExecutor(); + } //check whether callback url is empty and set null if (StringUtils.isBlank(callbackUrl)) {