Skip to Content
0

Does the @FILE_CHANGED Agentry Rule work in the WPF Client

Oct 24, 2016 at 07:37 PM

50

avatar image

I need to iterate through a collection of attached document objects using a looping subaction step. For each object in the collection that has been changed since it was downloaded, I need to execute an action and transaction that uploads that document back to the back end. The subaction step contains an execution rule that simply calls @FILE_CHANGED on the external data property of the document object. If it returns true, the subaction to upload the file is called. If it returns false, it skips that object.

Based on debugging in the ATE, the FILE_CHANGED function is always retuyrning false. I have verified the property being passed as a parameter to the function is an external data property type.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Mark Pe
Oct 24, 2016 at 09:09 PM
0

Jason,

Question: Is this an issue on the actual @FILE_CHANGED or just running the execution rule with a subaction? If you just try some other rule aside from @FILE_CHANGED would the subaction run?

Past issues on subaction not properly running (or ignoring) during the execution rule is tied to the following symptoms:

The execution rule is being used for add and edit actions. But the target object in the add and edit actions are different. So adding a new rule with the correct object property in the edit action should correct the issue.To summarize: the issue can be corrected by fixing the correct object property in the execution rule.

The statement above is on past Product dev issue complaint against the Agentry dev but the resolution is as shared above and no change was done on Agentry.

I do not see any changes regarding @FILE_CHANGED rule so far. So my speculation is tied to subaction and execution rule.

Best Regards,

Mark Pe
SAP Platinum Support Engineer

Share
10 |10000 characters needed characters left characters exceeded
Jason Micklevitz Oct 26, 2016 at 07:30 PM
0

The context in which the execution rule is being called is correct. This is not due to subaction execution. In additional testing looking for workarounds to this limitation, this is not limited to the FILE_CHANGED function either. It appears the file-related functions are not getting current information about the file being referenced. Rather, the behavior indicates the information about the file is based on an initial read of some sort. Subsquent changes to the file are not reflected in the function calls.

For example, the FILE_SIZE rule function, which returns the size of the referenced file in bytes, returns the same value each time it is called for the same file, regardless of the actual size of the file. The value it returns is the initial size the file was when the client started. It will not return the new value until the client is restarted. I have proven this out over several attempts.

Without wanting to speculate too much, it appears there is some sort of caching occurring when information is read about the metadata for these files and this is not refreshed or updated in any way by the client util the client itself is restarted.

Share
10 |10000 characters needed characters left characters exceeded
Jason Micklevitz Nov 08, 2016 at 02:30 PM
0

Just touching this thread to see if there is any further information. I have not received a reply to my response to your question.

Share
10 |10000 characters needed characters left characters exceeded
Mark Pe
Nov 08, 2016 at 07:31 PM
0

Jason,

One more thing I know about caching and rules. Now that you said it is not only for File but all File related rules. You stated that it does not refresh until you restart the client. The rule below is based on how the system protects itself from dynamically analyzing the rule all the time as it will degrade performance (This is how the Agentry team described it to us in the Jira).

Not sure if it will help you. https://launchpad.support.sap.com/#/notes/2189279 - Agentry Update rules refresh issue

"The definition of an Update rule and how it determines when it gets evaluated:
Update Rule References a rule definition evaluated in the context of the definition being displayed and expected to return a string value. This rule is evaluated each time the user interacts with any part of the detail screen. The value returned by the rule is displayed in the field. This rule does not change the value of the field if it returns the same value for two or more consecutive evaluations. The external field-OpenUI control edit type is defined to call out from a field to an OpenUI control.

For example did you interface with the screen at least two times (click on items) wherein the value of the field was the same for 2 or more clicks? Then this signals the system not to fire the update rule (as it already met the two interactions/touched the screen 2X and the value did not change) or others. To reset the interaction, you need to try to repaint the screen again (then make sure with not more than 2 clicks that the value should change or it will not change at all)."

Regards,

Mark Pe
SAP Platinum Support Engineer

Share
10 |10000 characters needed characters left characters exceeded