Good Day Devs,
Can someone please tell me if we can do 'Nested' IF statements in BO Rules? If not how do you accomplish the equivalent?
Thanks
Nested IF statements
-
- Posts: 1463
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Nested IF statements
Do you mean If a condition holds then does another condition apply?bwalk wrote:Good Day Devs,
Can someone please tell me if we can do 'Nested' IF statements in BO Rules? If not how do you accomplish the equivalent?
Thanks
Yes, but not in the same Process. What you can do is create sub processes to apply the additional conditions
Eg:
Process
Code: Select all
IF Condition = 'X’THEN SubProcessA ELSE...
Code: Select all
IF Condition2='1’THEN some action
Re: Nested IF statements
Thanks for the responce PointsWell.
This could lead to a very large # of processes couldn't it? 100s, 1000s?
And would it not be very difficult to read? To get the big picture of what you are building?
Probably just needing to learn how to think differently on my part but it seems like it would be difficult (for me that is)
Thanks again,
This could lead to a very large # of processes couldn't it? 100s, 1000s?
And would it not be very difficult to read? To get the big picture of what you are building?
Probably just needing to learn how to think differently on my part but it seems like it would be difficult (for me that is)
Thanks again,
-
- Posts: 1463
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Nested IF statements
Two views:bwalk wrote:Thanks for the responce PointsWell.
This could lead to a very large # of processes couldn't it? 100s, 1000s?
And would it not be very difficult to read? To get the big picture of what you are building?
Probably just needing to learn how to think differently on my part but it seems like it would be difficult (for me that is)
Thanks again,
Cons:
Fragmented processes
Lots of processes
Pros
Clearer code
Higher levels of reusability (potentially)
With regards to ease of identification and organisation there are a couple of things you can do:
- Use Categories to place related processes together. These can only be one level deep though
- Use the "Place under" to group related processes together
- Use a naming convention for your processes
Then I place all my contacts related processes in this category and then name them appropriately
eg
ContactsCreateNew_000Start
ContactsCreateNew_100AddressDetails
ContacsCrreateNew_200ProductAreas
etc etc.
This has the benefit of being highly visible within the Console when things are happening. I know that I have a process related to Contacts running and it is a Creation process and that it is at step x. Also it is self ordering (as long as you have a numeric element) when you add new processes within the gaps of the number sequences.
I would preface that by adding I spend some time using BPMN notation to build the process (Camunda is a decent open source modeller), so I have a clear view of how things are going to play out. I am very much looking forward to the next version of AIM being able to diagram those resulting processes out.
Also bear in mind that a process will affect ALL of the BOs in context. So sub processes are the way to isolate individual BOs when you have an array of them in context, e.g. FIND Contacts WHERE Contacts.Attribute='x' this will potentially return multiple BOs if you were able to use nested IFs then you have a challenge as to which instance of the BO you are affecting.
Re: Nested IF statements
Hello PointsWell,
This will help a great deal in keeping things organized and yes, I heard (but had forgotten) the next version of AwareIM would be able to do that. That will be a big help.
I will continue to try to learn my way around this very powerful development tool.
Thank you for the detailed guidance.
Bill Walker
This will help a great deal in keeping things organized and yes, I heard (but had forgotten) the next version of AwareIM would be able to do that. That will be a big help.
I will continue to try to learn my way around this very powerful development tool.
Thank you for the detailed guidance.
Bill Walker
-
- Posts: 1463
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Nested IF statements
My pleasure.bwalk wrote:Hello PointsWell,
This will help a great deal in keeping things organized and yes, I heard (but had forgotten) the next version of AwareIM would be able to do that. That will be a big help.
I will continue to try to learn my way around this very powerful development tool.
Thank you for the detailed guidance.
Bill Walker