Dkumar13
(Deena Kumar)
December 18, 2024, 4:22pm
1
I need to display form submitted successful message when my custom form is submitted in the quicklink
<entry key="workflowSuccess" value="Form submitted Successfully"/>
I added this in my quicklink object, but this message keeps displaying even if we click on cancel/back and get out of the form without submitting.
How to fix that?
anagha
(Anagha PK)
December 18, 2024, 4:30pm
2
Hello,
This entry key in your quicklink will display the message once the workflow is successfully launched. Even when you click on cancel/back, the workflow launch will be successful. That probably why you are getting the message.
Another way to display the message you want is to try adding httpSession variable
4 Likes
you can add the httpSession entry in QuickLink
<entry key="httpSession">
<value>
<Script>
<Source>
import org.apache.log4j.Logger;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;
log.info("BEGIN Test Connection Quicklink");
FacesContext fc = FacesContext.getCurrentInstance();
HttpSession session = fc.getExternalContext().getSession(true);
return session;
</Source>
</Script>
</value>
</entry>
and then use httpSession in workflow to add message
import java.util.ArrayList;
import java.util.List;
import javax.faces.application.FacesMessage;
try {
List currentMessages = httpSession.getAttribute("sailpoint.web.PageCodeBase.sessionMessages");
FacesMessage myMessage = null;
myMessage = new FacesMessage("Process Halted.");
javax.faces.context.FacesContext fc = javax.faces.context.FacesContext.getCurrentInstance();
List myMessages = new ArrayList();
myMessages.add(myMessage);
httpSession.setAttribute("sailpoint.web.PageCodeBase.sessionMessages", myMessages);
} catch (Exception ex) {
}
3 Likes
system
(system)
Closed
February 16, 2025, 5:34pm
4
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.