Workflow criteria AND/OR conditions
I'm not sure how to configure a workflow condition where
Status is not equal to Resolved
AND
Status is not equal to Closed
The UI automatically puts an OR between the two clauses and I can't see how to change this to AND. It seems to me that using an OR in this case would cause the condition to always be True, so it is useless to me ? What am I missing ?
Best Answers
-
Adam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭If I'm not mistaken, you should be able to open up the XML of the management pack and edit this criteria and change the OR to an AND.
I had to perform something to this effect when modifying when emails go out on a Resolution workflow.5 -
Tom_Hendricks Customer Super IT Monkey ✭✭✭✭✭The management packs are intimidating at first, but they are XML and XML is nothing if not strict about its patterns. Since there is a pattern, it can be learned.
After having spent some time with them (no comment about the first few times I tried to work with one!) I would prefer messing with a management pack over any form of dental work.
Changing an AND to an OR is as simple as finding an <And> tag (and of course its closing </And>) and changing it to <Or> and </Or>. You can look at the tags inside and around it to be sure you are changing the right one. This is actually a great way to start figuring them out--start with something like this, and look at the context around it. It is very difficult to learn most things unless you have a goal in mind to accomplish with it, and this is a good simple edit you could start with.
There are a number of things that simply cannot be done in the SCSM console for whatever reason, and criteria expressions that are the slightest bit useful would be one of them. Overriding hidden, undocumented, system-killing jobs is another (if you have active users at 2:00 a.m. server time due to supporting other parts of the world, then you know what I'm talking about...).
To Adam's point, if you cannot open up the exact management pack that you wish to edit, you could always copy it, give it another name, and upload that new MP alongside it. But only if you're willing to work with the management packs. Microsoft would be smart to provide an easier way of accomplishing this, but I would not expect them to make any changes here. In the meantime, just know that it is not as bad as a root canal if you start small with a simple, focused task and build some knowledge from there. If you try to author one in a blank Notepad window without any prior experience, then I'm in full agreement about preferring the root canal, and I give it better chances for success, too.
Good luck in either case!6
Answers
I had to perform something to this effect when modifying when emails go out on a Resolution workflow.
After having spent some time with them (no comment about the first few times I tried to work with one!) I would prefer messing with a management pack over any form of dental work.
Changing an AND to an OR is as simple as finding an <And> tag (and of course its closing </And>) and changing it to <Or> and </Or>. You can look at the tags inside and around it to be sure you are changing the right one. This is actually a great way to start figuring them out--start with something like this, and look at the context around it. It is very difficult to learn most things unless you have a goal in mind to accomplish with it, and this is a good simple edit you could start with.
There are a number of things that simply cannot be done in the SCSM console for whatever reason, and criteria expressions that are the slightest bit useful would be one of them. Overriding hidden, undocumented, system-killing jobs is another (if you have active users at 2:00 a.m. server time due to supporting other parts of the world, then you know what I'm talking about...).
To Adam's point, if you cannot open up the exact management pack that you wish to edit, you could always copy it, give it another name, and upload that new MP alongside it. But only if you're willing to work with the management packs. Microsoft would be smart to provide an easier way of accomplishing this, but I would not expect them to make any changes here. In the meantime, just know that it is not as bad as a root canal if you start small with a simple, focused task and build some knowledge from there. If you try to author one in a blank Notepad window without any prior experience, then I'm in full agreement about preferring the root canal, and I give it better chances for success, too.
Good luck in either case!
Nevertheless, as a community we should'nt be too accepting of this type of glaring omission, and I really think that changing And to Or should be part of the UI. I see an opportunity for Cireson to make our lives easier...