This is a public Forum  publicRSS

Topic

    albert hua
    embed an interview in another applicationAnswered
    Topic posted May 11, 2018 by albert huaExplorer 
    40 Views, 2 Comments
    Title:
    embed an interview in another application
    Content:

    Hi there,

    We have created an interview called "FutureLearn_tst" and tried to embed it into an application. The iFrame approach is successful:

    <a href="https://murdoch-opa--tst1.custhelp.com/web-determinations/startsession/FutureLearn_tst">OPA interview</a><rn:widget path="custom/opa/OPAWidget/" policy_model="FutureLearn_tst" web_determinations_url="https://murdoch-opa--tst1.custhelp.com/web-determinations" height="1200px"/>

    Due to the limitation of using iFrame, we want to use div instead, but it shows error: "Unable to load interview". See code below.

    Any idea or help is deeply appreciated.

    Many thanks,

    Albert

    <script src="https://murdoch-opa--tst1.custhelp.com/web-determinations/staticresource/interviews.js"></script>
    <div style="display: inline-block; width:100%">
        <div id="future_learn" style="width: 100%; display: block; margin-left: auto; margin-right:auto; float: left"></div>
    </div>
    <script>
        var el = document.getElementById("future_learn");
        var webDeterminationsUrl = "https://murdoch-opa--tst1.custhelp.com/web-determinations";
        var deploymentName = "FutureLearn_tst";
        OraclePolicyAutomationEmbedded.StartInterview(el, webDeterminationsUrl, deploymentName );
    </script>

     

    Version:
    2017

    Best Answer

    Brad Tuckett

    This message is explained in the "Troubleshoot embedded interviews" topic in the OPA documentation, but most likely you need to add the server hosting this script as an authorised host (see "Configure security for embedded interviews")

    Answer