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

kie-issues#1466: A Decision Table with a single output column shouldn't have a name #2834

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Kusuma04-dev
Copy link
Contributor

closes apache/incubator-kie-issues#1466 - A Decision Table with a single output column shouldn't have a name

Before fix:
Screenshot 2025-01-03 at 7 07 52 PM
Screenshot 2025-01-03 at 7 08 28 PM

After fix:
Screenshot 2025-01-03 at 7 09 20 PM
Screenshot 2025-01-03 at 7 09 46 PM

@danielzhe
Copy link
Contributor

As discussed in the private chat, I think this PR is incorrect, but I'll clarify the issue better.

@jomarko jomarko requested review from danielzhe and jomarko January 6, 2025 09:12
Copy link
Contributor

@jomarko jomarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kusuma04-dev thank you for the PR. Currently, the failing tests are with high probability related to code changes you have introduced. But we need to wait for @danielzhe feedback before we fix the tests. It seems that @danielzhe will propose different solution and that may mean different or no tests failing.

@kbowers-ibm kbowers-ibm self-requested a review January 6, 2025 09:29
@danielzhe
Copy link
Contributor

@jomarko Yeah, we're working on it.

@danielzhe danielzhe added pr: DO NOT MERGE Draft PR, not ready for merging area:dmn pr: wip PR is still under development labels Jan 6, 2025
@Kusuma04-dev
Copy link
Contributor Author

Hi,
I did few changes in the code, could you please check and let me know?

@Kusuma04-dev Kusuma04-dev requested a review from jomarko January 8, 2025 04:11
Copy link
Contributor

@jomarko jomarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for changes @Kusuma04-dev

UI

I think we are fine on the UI side. There I see this behavior

Single output column

Is represented with single level column header. This column header informs about the decision ndoe name and the decision node data type.

Multiple output columns

Are represented by two level column header

| decision node name |
| - -col A - | - - col B - |

Backend

There I think we have still the issue that name attribute is present in the output tag. See:

  <dmn:decision name="bbb" id="_055202A8-C02C-4A75-AE67-CFA23080D2B3">
    <dmn:variable name="bbb" id="_E77AD5FF-91D7-4E03-84D8-87D82A8E002C" typeRef="boolean" />
    <dmn:decisionTable id="_31E8BF8C-BE7E-456C-B9D4-0F42D9B11572" typeRef="boolean" hitPolicy="UNIQUE" label="bbb">
      <dmn:input id="_A0628B74-A903-4833-B4FC-CD0DA4688E48">
        <dmn:inputExpression id="_2678C2CE-521B-4032-83F2-1760A14E20CB" typeRef="Any">
          <dmn:text>aaa</dmn:text>
        </dmn:inputExpression>
      </dmn:input>
      <dmn:output id="_2FB820B3-99DE-4709-B2CB-F88B196C5063" name="Output-2" />
      <dmn:annotation name="Annotations" />
      <dmn:rule id="_BF8CA92E-8BDA-43AB-AAD6-8CE7510F5D08">
        <dmn:inputEntry id="_92915712-1449-4D81-8354-43EC22F18B7A">
          <dmn:text>-</dmn:text>
        </dmn:inputEntry>
        <dmn:outputEntry id="_96A3DC02-EBD9-49A4-B9D9-43C2AD22666F">
          <dmn:text>false</dmn:text>
        </dmn:outputEntry>
        <dmn:annotationEntry>
          <dmn:text>// Your annotations here</dmn:text>
        </dmn:annotationEntry>
      </dmn:rule>
    </dmn:decisionTable>
  </dmn:decision>

That is source of:
Screenshot 2025-01-08 121143

and my understanding is name="Output-2" should not be produced in the source XML.

@danielzhe danielzhe removed pr: DO NOT MERGE Draft PR, not ready for merging pr: wip PR is still under development labels Jan 8, 2025
@Kusuma04-dev Kusuma04-dev requested a review from jomarko January 9, 2025 04:47
Copy link
Contributor

@jomarko jomarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for updates, some comments to code from my side. I postponed a manual check as there is a chance the code will change after posting my review.

@Kusuma04-dev Kusuma04-dev requested a review from jomarko January 9, 2025 11:52
@tiagobento tiagobento changed the title kie-issues#1466-A Decision Table with a single output column shouldn't have a name kie-issues#1466: A Decision Table with a single output column shouldn't have a name Jan 9, 2025
@yesamer
Copy link
Contributor

yesamer commented Jan 9, 2025

@Kusuma04-dev Can you please synchronize this PR with main? Thx

@danielzhe
Copy link
Contributor

Thanks for your PR, @Kusuma04-dev !

I did some review and found some issues:

Having only a single output column that is hidden (the default behavior):

  1. If you add a new output column, in the DMN file, only one column is named. Both should have names in this case.
  2. If you add a new output column, one column comes with the name "Expression name". I think it should be "Output-1" and "Output-2"
  3. I got the issue that @jomarko reported above, but I'm unable to reproduce it again. 😢
  4. I noticed that I got one output with an invalid typeref (typeRef="<Undefined>").

Let me know if you need more clarification.

Video bellow:
https://github.com/user-attachments/assets/3a55cbbe-7f2f-43de-976d-483b43dee0e5

@danielzhe
Copy link
Contributor

Btw, maybe the issue 4 is not related to your PR, @Kusuma04-dev .

@Kusuma04-dev
Copy link
Contributor Author

@Kusuma04-dev Can you please synchronize this PR with main? Thx

Hi Yeser, done.

@Kusuma04-dev
Copy link
Contributor Author

Btw, maybe the issue 4 is not related to your PR, @Kusuma04-dev .

Hi Daniel,Thanks for the

Thanks for your PR, @Kusuma04-dev !

I did some review and found some issues:

Having only a single output column that is hidden (the default behavior):

  1. If you add a new output column, in the DMN file, only one column is named. Both should have names in this case.
  2. If you add a new output column, one column comes with the name "Expression name". I think it should be "Output-1" and "Output-2"
  3. I got the issue that @jomarko reported above, but I'm unable to reproduce it again. 😢
  4. I noticed that I got one output with an invalid typeref (typeRef="").

Let me know if you need more clarification.

Video bellow: https://github.com/user-attachments/assets/3a55cbbe-7f2f-43de-976d-483b43dee0e5

Hi Daniel,Thanks for the review .I have modified the validation now and the above issues are resolved.Can you please confirm once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A Decision Table with a single output column shouldn't have a name
4 participants