Tasklist Graphql - selecting tasks from multiple states

HI there,

Another Camunda Tasklist Graphql question. How can I query for all tasks in taskState COMPLETED and CREATED? From the documentation I can see a primitive example on how to query based on a single state, but I want to pull back all tasks that fit in both states.

{
  tasks(query: { state: COMPLETED }) {
    id
    name
    taskState
  }
}

Hi @joe_schmo ,

Have you checked the examples page?

It looks like you can use

{
   tasks(query: { state: COMPLETED | CREATED }) {
      id
      name
      taskState
   }
}

Now that looks like an OR, and though it’s not in the docs, you might try an & for an AND.

HTH,
dg

Thanks @davidgs but doesnt seem to work, see my screenshot from graphiql… does not like that syntax at all. I have my doubts that example you showed me works either.

I am not sure who is best placed in Camunda to be the expert on Tasklist API for C8 but many of the problems I have encountered with platform 8 self hosted are revolving around authentication not working beyond basic auth, graphql seeming to be very limited in what can be done with the tasks(query definition and assigning a task to another user

Hi there!

Ok, so I am not (currently) an expert with the C8 GraphQL Task List API, though I am about to write some code to interact with it. I won’t have an answer for you right away, but I’ll test this out soon and get back to you with any results.

Note: I’ll be using Camunda Platform 8 SaaS, not self-hosted, so our mileage may vary somewhat. :slight_smile:

I can certainly say that the Task List APIs are not exposed in the Community version of the Self-Hosted product. You can refer to this excellent blog post by Bernd for more information.

Best Regards,
dg

Thanks @davidgs I have had a look at the article its pretty clear Camunda is pointing to more users using the SaaS offering in the coming years, as a free tier is more important than free software (which is a fair enough assertion) however there will be customers, like my current company, that are willing to pay for the service but will seek to host it themselves for varying reasons depending on the industry and data domiciling restrictions etc.

Doing the assessment on C8, locally running with docker-compose, we would love to use it going forward but I just see too many issues with the Tasklist API as it currently stands, I have created 3 topics on this forum. This ticket is only a minor annoyance, the assignment of tasks to other users is a bit of a bigger issue but the real blocker is this one.

Hi Joe,

That’s an absolutely fair request. It is possible to run the full Camunda Platform 8 stack, self-hosted, with full access to the Task List API, etc. You’ll need to contact sales to find out pricing on that options, but I’m also sure that they can get you set up with a temporary license for the self-hosted side of things.

Best Regards,
dg