Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix @kogito-apps/form-displayer issues when establishing the envelope connection #524

Closed
pefernan opened this issue Aug 30, 2023 · 0 comments · Fixed by apache/incubator-kie-kogito-apps#1859
Assignees
Labels
area:form-generation-tool area:tools Issues affecting Apache KIE tooling projects type:bug Something is behaving unexpectedly

Comments

@pefernan
Copy link

pefernan commented Aug 30, 2023

The @kogito-apps/form-displayer React component is the component in charge of displaying the custom forms generated by the form-generation-tool. This component is embedded by other components like @kogito-apps/task-form & @kogito-apps/form-details.

Due to some recent changes it cannot initialize its envelope accordingly and cannot display any form. Looking at the console there are some logs like:
Failed to execute 'postMessage' on 'Window': Invalid target origin 'null' in a call to 'postMessage'..

Apparently looks like the component isn't getting the right targetOrigin from the parent component that is embeding it.

This error makes the form not able to work fine and causes different issues in task-form and form-details component

Steps to reproduce (for form-details):

  1. Generate patternfly forms using form-generation-tool for any BPM Quarkus project in kogito-examples (for example process-usertasks-quarkus-with-console)
  2. In the project pom.xml add a dependency to the runtime-tools-quarkus-extension
  3. Start the Kogito project in dev mode (mvn clean quarkus:dev)
  4. Open the Dev ui (http://locahost:8080/q/dev) and click on the Forms link inside the Runtime Tools Quarkus Extension
  5. Once in the forms list, click in any form and you'll be brought to the form-details view, on the left side you'll se a monaco-editor and on the right side the form visualization.
  6. Open the console to see the error logs.

Steps to reproduce (for task-form):

  1. Generate patternfly forms using form-generation-tool for any BPM Quarkus project in kogito-examples (for example process-usertasks-quarkus-with-console)
  2. In the project pom.xml add a dependency to the runtime-tools-quarkus-extension
  3. Start the Kogito project in dev mode (mvn clean quarkus:dev)
  4. Open the Dev ui (http://locahost:8080/q/dev) and click on the Process Instances link inside the Runtime Tools Quarkus Extension and start a new process instance
  5. Jump into Tasks view and switch to the jdoe user to see the tasks assigned to the user.
  6. Click on the task... the task form will keep loading forever (same errors in the browser console)
@pefernan pefernan added type:bug Something is behaving unexpectedly area:tools Issues affecting Apache KIE tooling projects area:bpmn Related to BPMN labels Aug 30, 2023
@pefernan pefernan changed the title Fix @kogito-apps/form-displayer react component Fix @kogito-apps/form-displayer issues when establishing the envelope connection Aug 30, 2023
@jomarko jomarko self-assigned this Sep 1, 2023
@yesamer yesamer added area:form-generation-tool and removed area:bpmn Related to BPMN labels Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:form-generation-tool area:tools Issues affecting Apache KIE tooling projects type:bug Something is behaving unexpectedly
Projects
None yet
3 participants