3 Replies Latest reply on Sep 25, 2013 4:40 PM by Z3uV4k

    Can Human Task use the external/custom JSP file?


      For Oracle BPM 11g, Is there any way to configure the Human Task to use or open the external/customl JSP file instead of ADF Task Flow?

      After I created the Human Task in composite.xml, I have to generate the ADF Task Form to be used when user opens the work item. So, if I have develop the custom JSP file which implementing the Workflow Service API or PAPI to deal with the BPM engine directly. Is it possible to do that?

        • 1. Re: Can Human Task use the external/custom JSP file?
          I am also looking for same kind of integration .....can some one pls reply to this thread...
          • 2. Re: Can Human Task use the external/custom JSP file?
            I've got the answer from Oracle that this can be done by calling javascript on the ADF page is loading.
            For example: Suppose I want to open the hello.jsp and pass the taskNumber as a parameter to it, I've modified the generated ADF file as following,

            <?xml version='1.0' encoding='UTF-8'?>
            <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
            <jsp:directive.page contentType="text/html;charset=UTF-8"/>
            <f:view locale="#{actionAvailable.userLocale}">

            <af:document id="d1" title="#{bindings.title.inputValue}"
            <af:clientListener method="reloadPage" type="load" />
            <f:loadBundle basename="oracle.bpel.services.workflow.worklist.resources.worklist"
            <trh:script id="script1" source="/jsLibs/taskDetails.js"></trh:script>
            *<trh:script id="script_bpm" source="/js/bpm.js"></trh:script>*
            <af:form id="f1" usesUpload="true">
            <af:inputText id="tn_hidden" value="#{bindings.taskNumber.inputValue}" label="*tn*"></af:inputText>
            The content of file "bpm.js" is as following
            function reloadPage(event) {

            var taskNoObj = document.getElementById('tn_hidden::content');
            alert("Value: " + taskNoObj.value);

            document.location.href = "http://localhost:8001/demobpm-extapp-context-root/hello.jsp?tn=" + taskNoObj.value;

            The content of file "hellp.jsp" is as following
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            <%@ page contentType="text/html;charset=UTF-8"%>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            Testing from BPM to External Application<br>
            Task Number : <%=request.getParameter("tn")%>
            Pls note that you can only pass parameter/information that is displayed in the generated UI, which include the instance information and the payload.

            Hope this helps
            • 3. Re: Can Human Task use the external/custom JSP file?

              Hi!, thank you very much for this answer, i´ve been searching for this like moths , I just have one question... where do I place the "bpm.js" file?


              thanks in advance!!