1 Reply Latest reply on Mar 23, 2017 2:37 PM by Manuel Castro

    jbpm-forms-rest-integration.js postMessage problem

    Michele Pagliaro Newbie


      I have a problem with the postMessage invocation of the method completeTask.

      I have a ZK web application that invokes the REST API of JBPM to get the task list from JBPM. I would to integrate the showForm and the task operations provided by the jbpm-forms-rest-integration.js.

      After initial problems of Cross Origin solved adding the header in standalone configuration of Wildfly now  I have a problem to call the postMessage method for the iframe containing the form.

      In my ZK page I include a JSP that invokes the showTask form and has a button that calls the completeTask method.

      The method is invoked but without effects or exceptions. I've seen that the call of contextWindow returns an object and not a window. I believe that this is the problem, how can i solve it?

      Or what is the solution for my problem?


      Thank you

        • 1. Re: jbpm-forms-rest-integration.js postMessage problem
          Manuel Castro Newbie

          You have to handle de 'opener' parameter you receive in formURL parameter in order to hack it or change it from origin..


          This parameter can be changed from origin handling standalone-XXX.xml

          Or can be hacked using some apache tricks with rewrite module, or using javascript in order to replace de value it comes (usually -> opener=localhost:8080) with your actual window.location.host or similar.