Hi,
I have run into another issue with V4 which likely has to do with my current approach and I just need to find a new approach, I would appreciate if you could point me in the right direction.
The following is a simple example of where I am having a problem:
Old method:
Situation: I want to run a month-to-date report that is parametric. The report data has three filters
- Beginning date of the report (user selectable but default value is the first day of current month)
- End date of the report (user selectable but default value is the current date)
- Report data is filtered for LoggedInRegularUser.HomeOffice (not user selectable)
Solution: I typically create a non-persisted business object, let's call it Mtdreportparameters with BeginningDate and EndDate attributes. I then attach rules to that BO to push the default values into the fields and to call a process if the BO is new to call the report. The report is based on a query that has the following criteria
- AnotherBO.Date<=Mtdreportparameters.BeginningDate
- AnotherBO.Date>=Mtdreportparameters.EndDate
- AnotherBO.Office=LoggedInRegularUser.HomeOffice
So the user selects menu item called MTDReport which creates the Mtdreportparameters non persisted business object. When they hit submit the process is called which creates the mtd document which is based on a query that looks to the mtdreportparameters BO which is still in context for the criteria.
Problem:
This approach has always worked well but now with V4 I get the following error:
"The server may have started a process that requires interaction with the user. This is disallowed in the current context. Please check your configuration to make sure that there are no rules attached to an object that start a process requiring user interaction."
In searching the forum, I found this reponse to a similar issue:
"Thanks, Tom. We investigated this as well. There is a bug in version 4.0 that we will fix shortly - it does not allow you to start a process from rules attached to a business object.
BUT it is NOT a good idea to do this - while version 3.0 allows this and version 4.0 has a temporary bug in this area, you should AVOID running a process from within the rules attached to an object. This goes against the guidelines of Aware IM configuration.
In this particular case if you need a process then this process should control the creation of the object and the user should NOT be allowed to create an object other than going through the process.
Aware IM Suppport Team
Further to my previous reply - this only applies to processes that invoke user interface operations. Processes that do not require interactions with the user can be called from rules of an object.
Aware IM Suppport Team"
So...
I am fine with this restriction but it means that my current approach is unusable and so is the approach to use the 'use form' checkbox because I wouldn't be able to stipulate the LoggedInRegularUser.HomeOffice criteria.
The 'Ask at runtime' option would allow me to stipulate the above criteria but would not allow me to set the default values for the report beginning and end dates. (which are appreciated productivity enhancements for users)
This is just a simple example, but I have come to rely quite a bit on using non-persisted business objects to give me full control over presenting the parameters of reports and queries. I can add static or dynamic dropdown lists, run rules against their inputs etc...
Any idea how I can achieve the same results in V4.
Sorry for the long post but it hopefully will save a bunch of responses asking for more info.
Cheers,
Pete