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

Generate input expression text, input/output typeRef #11

Open
bhoefman opened this issue Nov 9, 2018 · 5 comments
Open

Generate input expression text, input/output typeRef #11

bhoefman opened this issue Nov 9, 2018 · 5 comments

Comments

@bhoefman
Copy link

bhoefman commented Nov 9, 2018

Very interesting project! 👍

I am trying to generate a decision table, but I am having some trouble generating the following properties:

  • input expressions, e.g. "if then else":
    • However, as the same input value in the excel sheet is used for both input id and inputExpression text, this results in input id parsing exceptions
  • input/output typeRef

It looks like currently only the first row of the excel sheet is used to generate input/output properties.

row    
1 input/output  
2 rule id 1
3 rule id 2
4 rule id 3
5 rule id 4

It would be great if more than 1 top row would be dedicated to input/output properties.

e.g.

row    
1 input/output id
2 input/output label
3 inputExpression/output typeRef
4 inputExpression text
5 rule id 1
6 rule id 2
7 rule id 3
8 rule id 4
@ThorbenLindhauer
Copy link
Collaborator

Hi @bhoefman,

Thanks for giving this project a try. Your understanding is correct, the default conversion does not support type refs and input expressions.

We now have an advanced conversion algorithm that supports richer input/output descriptions. See an example spreadsheet of the supported format here: https://github.com/camunda/camunda-dmn-xlsx/blob/master/xlsx-dmn-converter/src/test/resources/test6.xlsx. This functionality is not yet released, but you could build a snapshot yourself and give it a try. On the command line, java -jar dmn-xlsx-cli.jar --advanced path/to/input/file.xlsx path/to/output is the syntax to use this algorithm.

In addition, I would like to make extensibility of the conversion a more central concept of the library, so that users can easily write an adapter for their custom excel format. This is the corresponding ticket: #15. However, as this is a side project, I cannot say when I will be able to work on this.

Cheers,
Thorben

@amanjmd
Copy link

amanjmd commented Apr 1, 2019

Issue While converting the Expression to DMN with latest repository

Hi Team ,

I am trying to test the sample with the latest repository as suggested in the previous post . Although to test the project I had to add the following dependencies to the POM to remove the build errors.

javax.xml.bind jaxb-api 2.1 org.glassfish.jaxb jaxb-core 2.3.0 com.sun.xml.bind jaxb-impl 2.3.1

I tried to execute the project(through main method) with sample excel provided in the above post . After execution , the attached sample Dmn was generated .

newSampleDmn.txt

I tried to open the file in Camunda Modeler to verify the content of the generated file. The following is the screenshot from the Camunda modeler.

image

As we can see that all the expressions are treated as simple input/output to the rules , but not as the expressions . I could see there was something wrong with the Dmn file generated as , for instance , the typeRef expressions were not the part of , but as input text.
Kindly suggest if there is some syntactical error in the excel file , or if there is fix required in the converter code . Also, kindly suggest a work around, as all the functionalities provided by the modeler including Hit policy ,typeRef etc are crucial for the project .

@amanjmd
Copy link

amanjmd commented Apr 1, 2019

Hi Team ,

WRT the above post , the sample excel worked well by using AdvancedSpreadsheetAdapter as ioSttrategy , as suggested in the original reply by @ThorbenLindhauer . Now the modeler displays the data properly.

Thanks
Aman Kapoor

@remimourgues
Copy link

remimourgues commented May 4, 2020

Hi everyone,

Thanks for the work you've done!
Is the Maven repository up to date with this GitHub content? I cannot find any AdvancedSpreadheetAdapter in my dependencies, as answered by @amanjmd , and there are some other differences. Or is there another workaround @ThorbenLindhauer ?
I am using https://mvnrepository.com/artifact/org.camunda.bpm.extension.dmn/dmn-xlsx-converter/0.2.0.

Thanks,
Rémi Mourgues

@ThorbenLindhauer
Copy link
Collaborator

@remimourgues we haven't built a release yet since the advanced adapter was added. I have created #30 to do that.

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

No branches or pull requests

4 participants