fjtirado opened a new issue, #3809:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3809
### Description
Currently, when starting a workflow through http, you are expected to pass
your input model as body or in body wrapped into `workflowdata` property.
So, assuming your input is the following json:` {"name":"John"}`
The body of the post http request starting the worklow might be
`{"workflowdata": {"name":"John"}` or `{"name":"John"}`
This issue asked for the possitility, when using the first approach, to be
able to specify additional properties that are not part of the input schema of
the worfkow, but that will be visible on Data index, so it can be queries at
will. Once use case is the ability to group a set of workflow process instances
to an arbitrary key.
Therefore, the user should be able to specify
`{"workflowdata": {"name":"John"}, "groupKey": "follower"}`
`{"workflowdata": {"name":"Peter"}, "groupKey": follower"}`
groupKey will be completely ignored by runtimes, but passed to data index
process variables.
Therefore, when doing this query to DataIndex,
```
{
ProcessInstances {
id
variables
}
}
```
the user will see
"ProcessInstances": [
{
"id": "3b3a55f3-bdab-466a-b297-5cdc6fa38b96",
"variables": {
"workflowdata": {
"name": "John"
.....
},
"workflowdatainput": {
"name": "John"
},
"groupKey": follower"
}
},
{
"id": "33e613fe-d50f-480e-b16f-3feb96ba8a9c",
"variables": {
"workflowdata": {
"name": "Peter"
.....
},
"workflowdatainput": {
"name": "Peter"
},
"groupKey": follower"
}
}
}
### Implementation ideas
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]