-
Notifications
You must be signed in to change notification settings - Fork 213
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 #3415] Allow constant values in user task assignments #3416
Conversation
PR job Reproducerbuild-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3416 --skipParallelCheckout NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3416/1/display/redirect Test results:
Those are the test failures: org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[25]Value <#{person.name}> is not valid for datatype: org.jbpm.process.core.datatype.impl.type.ObjectDataType@4fffe3d1org.kie.kogito.codegen.tests.UserTaskIT.testUserTaskWithIOexpressionProcessValue <#{person.name}> is not valid for datatype: org.jbpm.process.core.datatype.impl.type.ObjectDataType@4fffe3d1 |
PR job Reproducerbuild-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3416 --skipParallelCheckout NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3416/2/display/redirect Test results:
Those are the test failures: org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[117]Value <#{person.name}> is not valid for datatype: org.jbpm.process.core.datatype.impl.type.ObjectDataType@4fffe3d1org.kie.kogito.codegen.tests.UserTaskIT.testUserTaskWithIOexpressionProcessValue <#{person.name}> is not valid for datatype: org.jbpm.process.core.datatype.impl.type.ObjectDataType@4fffe3d1 |
PR job Reproducerbuild-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3416 --skipParallelCheckout NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3416/3/display/redirect Test results:
Those are the test failures: org.kie.kogito.codegen.process.ProcessGenerationIT.testProcessGeneration(String)[25]Value <#{person.name}> is not valid for datatype: org.jbpm.process.core.datatype.impl.type.ObjectDataType@4fffe3d1org.kie.kogito.codegen.tests.UserTaskIT.testUserTaskWithIOexpressionProcessValue <#{person.name}> is not valid for datatype: org.jbpm.process.core.datatype.impl.type.ObjectDataType@4fffe3d1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expressions are something we cannot removed as they are used. You can add constants if you like in other way. not very sure what is the feedback that triggers removing this feature.
I am not against to support constants as such but you might need to find another way.
@elguardian We are not removing anything, we are allowing setting constants but adding the variable in the case the value is not an expression. If case it is an expression, the code behaves as before. Maybe my initial description was not precise, sorry about that, if you check the code, you will see that the check was moved. If the value is an expression (match the regular expression) the value is not set. The previous position of the check was preventing constant values to be added (it rejected any value that is not an expression, hence the impossibility to use anything that was not an expression as value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just add a test at ActivityGenerationModelTest#testUserTaskProcessWithTaskModels
in jbpm-bpmn2, modifying the BPMN2-UserTask.bpmn2
to check that the constant is treated correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for adding the test, nice! @fjtirado
…che#3416) * [Fix apache#3415] Allow constant values in user task assignments * [Fix apache#3415] Gonzalos comments
Fix #3415
The older regular expression check does not longer makes sense, It prevents variables in user task model generated classes to be assigned to constant values.