Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Igw dev 410 rc3 bugs #621

Open
wants to merge 12 commits into
base: igw-dev-410-rc3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,25 @@ public WorkflowResponse complete(WorkflowDTO workFlowDTO) throws WorkflowExcepti
throw new WorkflowException(msg, e);
}

String msgOnCompletion = "Application Creation approval process completed. Workflow ID : " + workFlowDTO
.getExternalWorkflowReference() + " Workflow State : " + workFlowDTO.getStatus();
log.info(msgOnCompletion);
auditLog.info(msgOnCompletion);
/**
* Log improvement : Application Approval details
*/
try {
Application application = dao.getApplicationById(Integer.parseInt(workFlowDTO.getWorkflowReference()));

String msgOnCompletion =
" Application Creation approval process completed. Workflow ID : " + workFlowDTO.getExternalWorkflowReference() +
" | Workflow State : " + workFlowDTO.getStatus() +
" | Application name : " + application.getName() +
" | UUID : " + application.getUUID() +
" | Subscriber : " + application.getSubscriber().getName() +
" | Owner : " + application.getOwner() +
" | Approved Tier : " + application.getTier();
log.info(msgOnCompletion);
auditLog.info(msgOnCompletion);
} catch (APIManagementException e) {
e.printStackTrace();
}

return new GeneralWorkflowResponse();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,28 @@ public WorkflowResponse execute(WorkflowDTO workflowDTO) throws WorkflowExceptio
@Override
public WorkflowResponse complete(WorkflowDTO workFlowDTO) throws WorkflowException {
workFlowDTO.setUpdatedTime(System.currentTimeMillis());
ApiMgtDAO dao = ApiMgtDAO.getInstance();
super.complete(workFlowDTO);
String logm = "Subscription Creation [Complete] Workflow Invoked. Workflow ID : " +
workFlowDTO.getExternalWorkflowReference() + "Workflow State : " + workFlowDTO.getStatus();
log.info(logm);
auditLog.info(logm);

/**
* Log improvement : Subscription Approval details
*/
try {
SubscribedAPI subscription = dao.getSubscriptionById(Integer.parseInt(workFlowDTO.getExternalWorkflowReference()));
String logm =
"Subscription Creation [Complete] Workflow Invoked. Workflow ID : " + workFlowDTO.getExternalWorkflowReference() +
" | Workflow State : " + workFlowDTO.getStatus() +
" | API ID : " + subscription.getApiId() +
" | UUID : " + subscription.getUUID() +
" | Subscriber : " + subscription.getSubscriber().getName() +
" | Application : " + subscription.getApplication() +
" | Approved Tier : " + subscription.getTier();
log.info(logm);
auditLog.info(logm);
} catch (APIManagementException e) {
e.printStackTrace();
}


if (WorkflowStatus.APPROVED.equals(workFlowDTO.getStatus()) ||
WorkflowStatus.REJECTED.equals(workFlowDTO.getStatus())) {
Expand Down