Skip to content

Commit

Permalink
Merge pull request wso2#4890 from wso2/revert-4802-master
Browse files Browse the repository at this point in the history
Revert "Add temp logs for handleLongWait and handlePrompt"
  • Loading branch information
dewniMW committed Sep 4, 2023
2 parents e28f24e + 34fc870 commit 763399e
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,9 @@ private boolean handleNode(HttpServletRequest request, HttpServletResponse respo
context.setProperty(FrameworkConstants.JSAttributes.PROP_CURRENT_NODE, currentNode);
boolean isInterrupt = false;
if (currentNode instanceof ShowPromptNode) {
log.info("Current node is an instance of ShowPromptNode.");
isInterrupt = handlePrompt(request, response, context, sequenceConfig, (ShowPromptNode) currentNode);
log.info("Handled prompt for current node");
} else if (currentNode instanceof LongWaitNode) {
log.info("Current node is an instance of LongWaitNode.");
isInterrupt = handleLongWait(request, response, context, sequenceConfig, (LongWaitNode) currentNode);
log.info("Handled long wait for current node");
} else if (currentNode instanceof DynamicDecisionNode) {
handleDecisionPoint(request, response, context, sequenceConfig, (DynamicDecisionNode) currentNode);
} else if (currentNode instanceof StepConfigGraphNode) {
Expand Down Expand Up @@ -254,10 +250,8 @@ private boolean handlePrompt(HttpServletRequest request, HttpServletResponse res
AuthenticationContext context, SequenceConfig sequenceConfig,
ShowPromptNode promptNode) throws FrameworkException {

log.info("Handle prompt invoked for context identifier: " + context.getContextIdentifier());
boolean isPromptToBeDisplayed = false;
if (context.isReturning()) {
log.info("Prompt is returning for context identifier: " + context.getContextIdentifier());
String action = PROMPT_DEFAULT_ACTION;
for (String s : request.getParameterMap().keySet()) {
if (s.startsWith(PROMPT_ACTION_PREFIX)) {
Expand All @@ -272,28 +266,19 @@ private boolean handlePrompt(HttpServletRequest request, HttpServletResponse res
context.setProperty(FrameworkConstants.JSAttributes.PROP_CURRENT_NODE, nextNode);
context.setReturning(false);
} else {
log.info("Prompt is starting for context identifier: " + context.getContextIdentifier());
if (promptNode.getHandlerMap().get(ShowPromptNode.PRE_HANDLER) != null) {
Object result = evaluateHandler(ShowPromptNode.PRE_HANDLER, promptNode, context, promptNode
.getParameters().get(STEP_IDENTIFIER_PARAM));
log.info("Result of prompt pre handler: " + result + " for context identifier: " + context
.getContextIdentifier());
if (Boolean.TRUE.equals(result)) {
executeFunction(SKIPPED_CALLBACK_NAME, promptNode, context);
AuthGraphNode nextNode = promptNode.getDefaultEdge();
log.info("Prompt pre handler returned true. Going to next node: " + nextNode
.getName() + " for context identifier: " + context.getContextIdentifier());
context.setProperty(FrameworkConstants.JSAttributes.PROP_CURRENT_NODE, nextNode);
} else {
log.info("Prompt pre handler returned false. Displaying prompt for context identifier: " + context
.getContextIdentifier());
displayPrompt(context, request, response, promptNode);
isPromptToBeDisplayed = true;
}
return isPromptToBeDisplayed;
}
log.info("Prompt pre handler is not defined. Displaying prompt for context identifier: " + context
.getContextIdentifier());
displayPrompt(context, request, response, promptNode);
isPromptToBeDisplayed = true;
}
Expand Down Expand Up @@ -611,7 +596,6 @@ private boolean handleLongWait(HttpServletRequest request, HttpServletResponse r
AuthenticationContext context, SequenceConfig sequenceConfig,
LongWaitNode longWaitNode) throws FrameworkException {

log.info("Started handling long wait for context identifier: " + context.getContextIdentifier());
boolean isWaiting;
LongWaitStatusStoreService longWaitStatusStoreService =
FrameworkServiceDataHolder.getInstance().getLongWaitStatusStoreService();
Expand Down Expand Up @@ -680,7 +664,6 @@ private boolean callExternalSystem(HttpServletRequest request, HttpServletRespon
}
AsyncCaller caller = asyncProcess.getAsyncCaller();

log.info("AsyncCaller is set for the long wait process: " + context.getContextIdentifier());
AsyncReturn asyncReturn = rethrowTriConsumer((authenticationContext, data, result) -> {
log.info("For session data key: " + context.getContextIdentifier() + " asyncReturn.accept() has been" +
" set by the async process flow of the custom function.");
Expand Down

0 comments on commit 763399e

Please sign in to comment.