tendenc
Elite Observer

Complex Workflow Filters

Jump to solution

I am trying to create a workflow where depending on a metadata field content and which group you are apart of, it will satisfy the condition thus continuing/starting a workflow.

See Screenshot below.

So if the user is apart of the HR Author Group and the Content Metadata for Business_Area is HR, it succeeds.

This works so long as the last entry is not in the list.  Even though I am not in the TEST group, it always succeeds no matter what the Business_Area is (ie. asdfasf).

If I remove the last condition, it seems to work fine.

I don't know if it is the OR/AND order of operations or what.   

Also what does the less than 1 means vs something like equals 1

 

Thanks!

Capture.PNG

0 Kudos
1 Solution

Accepted Solutions

After a follow up with the Support team... it is impossible to do what the above with the workflow filters.  When mixing two types [Group ...] and metadata in a filter it is handled differently.  One will need to use permissions on content to achieve this.

View solution in original post

0 Kudos
4 Replies
kensnyder
Head of Support

The "And" and "Or" operators need to be switched.  The filter should be

business_area equals HR

OR

Group HR Approvers Clicks less than 1

AND

business_area equals FINANCE

OR

Group Finance Approvers Clicks less than 1

 

The UI is a little confusing in how it was built vs the logic behind the scenes so it will read a little backwards but that is the settings you will need to use.  This was ported from the original "Classic" UI and will be upgraded sometime in the future.  If you look at more common filters based on group membership only you will always see it as

Group A

AND

Group B

Which actually means group A or group B.

Regading "less than 1" this dates back to the original implementation where there were scenarios where you would need to have two different people to click on it before it would change workflow steps.  This was actually built for other CMS type scenarios besides web sites.  Over time it has remained but is never really used anymore.  I would recommend using less than 1, which really means that user clicked on the workflow command (being zero based).

If there are further issues I would recommend submitting to support  Complex workflow filters are not that common.

 

 

--


Ken Snyder
VP, Customer Support & Cloud Operations

## If I’ve helped, accept this response as a solution so that other’s can find is more quickly in the future.
## Have thoughts on Crownpeak products? We'd love to hear them. Speak with the Crownpeak Product Team..

0 Kudos

Thanks for the reply.  

Unfortunately that completely fails.  The front end AND and OR seem to be the correct logical BOOLEAN AND and OR.  The simple Group HR Approvers Clicks less than 1 OR business_area equals HR always returns true for me if either is satisfied.  Group HR Approvers Clicks less than 1 AND business_area equals HR works perfectly. 

I also tried to get it to work with the following logic:

Group HR Approvers Clicks less than 1 AND business_area equals HR

OR

Group FINANCE Approvers Clicks less than 1 AND business_area equals FINANCE

OR

Group SCR Approvers Clicks less than 1 AND business_area equals SCR

OR

Group COMMS Approvers Clicks less than 1 AND business_area equals COMMS OR business_area equals COMMS OR business_area equals COMMS OR business_area equals SCR

This almost worked except that if the user is only part of HR and the business_area is COMMS, it lets them publish.

So I suspect there may be a bug somewhere in the logic handling of the workflow filters.  I will have to create a support ticket.

 

I had tried to create 4 workflow filters separating the above and then having 4 paths in the workflow, but unfortunately the CMS workflow interface pull-down shows all the paths, so on one of the steps I ended up having 20 options, most grayed out, instead of 5, and it went off the screen and was un-scrollable, so I could not go that route.

If anything, at least someone else can see this post and save time. 😀

Thanks

0 Kudos

After a follow up with the Support team... it is impossible to do what the above with the workflow filters.  When mixing two types [Group ...] and metadata in a filter it is handled differently.  One will need to use permissions on content to achieve this.

0 Kudos

Thanks for the follow up @tendenc 

Much appreciated!

0 Kudos