If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#50857 by PointsWell
Wed May 15, 2019 5:20 am
Not clear from the question how you are running the processes and what is happening to these selected items but...

If the activities in the selected objects are unique then you need to pass them into a sub Process one at a time. When you are finished with these then the next process will run

Code: Select allPICK ONE OR MORE from QUERY
SubProcessForEachBOFound
Next step


SubProcess will receive whatever BO user has selected and repeats one at a time until last one before moving on to NextStep.

You won’t know how many have been selected but it will process all before next step.
#50858 by swiftinitpvtltd
Wed May 15, 2019 6:17 am
Thanks PointsWell. Pick suggestion is good. Also I figured few things from process behavior. When you have a loop and Take Best 1 in FIND the behavior of process steps changes slightly. When you put second rule it becomes an end of the process when Applicable to multiple items is applied while calling it. In first rule step you call subprocess(20 times it will do) and in second rule you call the "good bye" meaning end process which only runs once irrespective of how many items are checked in grid(Applicable to multiple items). These processes have a peculiar pattern for each type of complex behavior and you will have to experiment to get the feel of it :) . Similarly in userguide its mentioned that there is no fix order in which all these rules in process run. I have not seen it behaving in different order each time multiple rules run in a single process but still...
#50859 by PointsWell
Wed May 15, 2019 8:38 am
swiftinitpvtltd wrote:Similarly in userguide its mentioned that there is no fix order in which all these rules in process run. I have not seen it behaving in different order each time multiple rules run in a single process but still...


There is no fixed order in which business rules run. Processes run in the order that they are written.
#50867 by swiftinitpvtltd
Thu May 16, 2019 5:55 am
Thanks.
I am trying to understand below from rules guide-
Overview of the Rule Engine Framework
Most rule collections in Aware IM are un-ordered, such as rule collections attached to
business objects and notifications as well as processes that have the “Maintain rule
order” flag turned off.
From the name of the rule collection it is clear that the order of
rules in the collection does not matter. So how does the rule engine in Aware IM decide
which rules to evaluate first, second and so on?
if we have a process and process has 20 steps(rules) in it are those getting executed 1 to 20?(from top to bottom)
#50868 by PointsWell
Thu May 16, 2019 8:06 am
swiftinitpvtltd wrote:Thanks.
I am trying to understand below from rules guide-
Overview of the Rule Engine Framework
Most rule collections in Aware IM are un-ordered, such as rule collections attached to
business objects and notifications as well as processes that have the “Maintain rule
order” flag turned off.
From the name of the rule collection it is clear that the order of
rules in the collection does not matter. So how does the rule engine in Aware IM decide
which rules to evaluate first, second and so on?
if we have a process and process has 20 steps(rules) in it are those getting executed 1 to 20?(from top to bottom)


Rules are a series of operations and functions that are applied to Business Objects and entered on the Update Rules and Deletion Rules tabs of the Business Object. There is no set order that they execute in.

Processes always execute in the order that they are written. Process steps are not Rules (capital R). It would be impossible to write code that you had no expectation of the order that it is executed.

If you have a Business Object in context and then call a sub process (that uses the BO as an input) then that BO will drop to the sub Process. If you have 20 BOs in context and then call a sub Process then that sub Process is called 20 times, once for each instance of the BO.

Therefore if you have a process to FIND all your Contacts where they live in the USA and then want to do one thing if they are in NY and another if they are in CA and then once you've finished set them all to processed it would look like this:

Code: Select allFIND Contact WHERE Contact.Country='USA'
ProcessStates
Contact.Compeleted=Yes


Where ProcessStates has INPUT Contact and does this:
Code: Select allIf Contact.State='NY' THEN DoSomething ELSE
IF Contact.State='CA' THEN DoADifferentThing


This will FIND all the Contacts in USA then go through the list of the Contacts that it has found and pass them one at a time into the ProcessStates sub Process. Once it has completed the ProcessStates for every Contact it has found it will set Contact.Completed to Yes for all of the Contacts at once.

It will execute in this order always.

** This is an example and not the most efficient way, you would probably want to have an IF statement on the ProcessStates to make sure you didn't needlessly run the ProcessStates for Contacts in the other 48 states.
#50871 by BobK
Thu May 16, 2019 1:08 pm
swiftinitpvtltd wrote:Most rule collections in Aware IM are un-ordered, such as rule collections attached to
business objects and notifications as well as processes that have the “Maintain rule
order” flag turned off.


This documentation is probably obsolete.

In old versions of AwareIM, on the General tab of a Process definition, there was a "Maintain rule order" option. This option was turned on by default. I never un-checked it (turned it off), but I assume doing so would allow AwareIM to run the Process rules in any order.

I do not see this option in the newest version of AwareIM
#50872 by ACDC
Thu May 16, 2019 6:40 pm
I am trying to understand below from rules guide-
Overview of the Rule Engine Framework


Deep down in the heart of the AwareIm system is a Rete Based rules engine, not much is said about this dynamic feature other than a brief mention of it somewhere in the technical specs. In my mind its the secret source and one of the main building blocks and success of the AwareIM system, not to mention numerous other features a well

If you read up about the Rete Algorithm it might give you a better insight as to what's happening under the hood when it comes to the behaviour of the AwareiM rules engine

https://en.wikipedia.org/wiki/Rete_algorithm

Who is online

Users browsing this forum: Google [Bot] and 9 guests