-
Notifications
You must be signed in to change notification settings - Fork 15
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
Querying workflow instances by variables #16
Comments
Sounds interesting 👍 Do you have an idea of how the GraphQL query/schema should look like? |
it's a bit challenging with GraphQL as it requires static definitions of the args, maybe we can do something in the form of: {
variables(filter: "foo == \"bar\" and bar != null") {
name
value
}
} |
A query string sounds like a simple way. But passing a SQL/JPA query as filter argument feels not right 😅 What do you think about something like the following? {
variable(filter: { name: "foo", value_eq: "bar"}) {
name
value
}
} So, the workflow instances would be collected by the variables. {
variable(filter: { name: "foo", value_eq: "bar"}) {
name
value
scope {
workflowInstance {
key
}
}
}
} Does this work for you? |
@saig0 i think that this syntax restricts a single filter condition, i would make filter an array if possible for multi conditions |
Ok. Let's try to make it as simple as possible (because filtering can get complicated 😅). Which queries do you need exactly? |
@saig0 i don't have specific demands atm, it was more a suggestion for your project :) |
We can give it a try and see how it works out. We should start with a filter for variables first that allow filtering by a variable name and a value. The value must match exactly to make it easy. |
@saig0 @asaf any updates on this? We are looking for that feature too.
Now we want to find all processes created by the same customer. At this point we can't know how exact json of each order looks. What we need to do is to find them all using a filter like "order.customer.msisdn": "123456789". There is an example of how such GraphQL model can be implemented: https://chillicream.com/docs/hotchocolate/v12/integrations/mongodb#filtering
|
@aanodin no updates so far. Currently, I don't need this feature at the moment. So, I don't plan to implement something like this soon. Your request is also more complicated than the initial one. Instead of finding a variable based on a concrete value, you want to find a variable (i.e. the process instance) based on a partial JSON value. I'm not sure how we could implement this query based on JPA. ZeeQS is not bound to a specific database. Maybe, QueryDSL could help here, but not sure how far. |
We hit through this use case too. I am new to graphql a bit. @saig0 - could you please elaborate what would it mean to support such kind of filter queries in zeeqs? What kind of code changes are required? |
@shahamit you can have a look at the following examples:
From the code perspective, you would need to:
|
Support querying workflow instances by specific variables names & values.
The text was updated successfully, but these errors were encountered: