3 Replies Latest reply: Sep 25, 2013 11:40 AM by Z3uV4k RSS

    Can Human Task use the external/custom JSP file?

    771891
      Hi,

      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?

      Thanks
        • 1. Re: Can Human Task use the external/custom JSP file?
          681846
          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?
            771891
            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"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
            xmlns:c="http://java.sun.com/jsp/jstl/core"
            xmlns:trh="http://myfaces.apache.org/trinidad/html"
            xmlns:wf="http://xmlns.oracle.com/bpel/workflow/workflow-taglib.tld"
            xmlns:wlc="http://xmlns.oracle.com/bpel/workflow/worklist">
            <jsp:directive.page contentType="text/html;charset=UTF-8"/>
            <f:view locale="#{actionAvailable.userLocale}">

            <af:document id="d1" title="#{bindings.title.inputValue}"
            clientComponent="true">
            <af:clientListener method="reloadPage" type="load" />
            <f:loadBundle basename="oracle.bpel.services.workflow.worklist.resources.worklist"
            var="resources"/>
            <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"
            "http://www.w3.org/TR/html4/loose.dtd">
            <%@ page contentType="text/html;charset=UTF-8"%>
            <html>
            <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>hello</title>
            </head>
            <body>
            Testing from BPM to External Application<br>
            Task Number : <%=request.getParameter("tn")%>
            </body>
            </html>
            -----
            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?
              Z3uV4k

              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!!