Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
Description
Problem Definition
While working with automation for confluence cloud we noticed that when we add an If condition with CQL query, it usually doesn't work and requires some delay.
Here is a test scenario:
- Create a workflow with trigger Page Publish
- Then add condition if CQL: label IN ("test-1", "test-2")
- Add the action as Restrict Page.
- Expected Result:
- When a page gets published with the label test-1 or test-2, it should get restricted to the users or groups defined in the automation.
- On a side note, we are using templates to add a label to the page.
- Actual Result:
- Nothing happens.
Suggested Solution
Introduce a way to add delay to the workflow for the indexing to help with CQL condition or something similar to “Re-fetch” from Jira.
Workaround
We have found the following 2 workarounds:
- Use if/else condition instead of CQL.
-
- Keep the trigger as it is.
- Then add the component If: Add a condition.
- Now select the if, else: Add a condition.
- Here you can define the conditions like
{{page.labels}} contains test-1
{{page.labels}} contains test-2
- Post that you can keep the same action of restricting the page
- Add a delay to the CQL condition using web request.
- Keep the trigger as it is.
- Add an action Send web request
- Add some web requests.
- We may need to add 2 or 3 depending on the time each takes.
- Then add condition if CQL: label IN ("test-1", "test-2")
- Add the action as Restrict Page.