Action and rule debugging with Agentry Test Environment
I am an Agentry developer. I recently had worked on a few customer tickets caused by incorrect customized action or rule definitions, so I’d like to share with our SAP Community about how the action and rule definitions could be debugged.
If you find your actions are not being executed as expected, you could debug your actions and their enabling rules by enabling debug logging for your Actions of interest and their enabling rules in the ATE.
Take attached documents in Out-of-Box Work manager as an example. If you tried to view a newly downloaded attached Word document, but the document is not being opened, you could follow the following steps to do some debugging.
1. Run the ATE and select “Select Logging” in the dropdown next to the bug icon.
If you are new to Agentry Test Environment, Please refer to the following documentation:
Agentry Test Environment View:
2. Enable the following actions and rules related to the viewing of attached documents:
Then open the Debug.xml file in the workspace of your application (in my case the Debug.xml is in C:\Users\xxxxxx\eclipse-workspace\<your app anem>\Test Environment), you’ll see that the values for the enabled actions and rules are true, while values for all of the unchecked actions and rules are false.
<Action InternalName=”DocumentLinkView” ID=”611″>true</Action>
<Action InternalName=”DocumentLinkAction” ID=”620″>true</Action>
<Action InternalName=”DocumentLinkViewDocument” ID=”1041″>true</Action>
<Action InternalName=”DocumentLinkActionWPF” ID=”1045″>true</Action>
<Action InternalName=”DocumentLinkActionWPFView” ID=”1047″>true</Action>
<Rule InternalName=”ExecuteDocumentLinkView” ID=”2540″>true</Rule>
<Rule InternalName=”EvalIsWin32Platform” ID=”3031″>true</Rule>
<Rule InternalName=”ExecuteIfDocument” ID=”3810″>true</Rule>
3. Click an already downloaded attached Word file to open it.
You’ll see some new debug logging entries written to the Debug.log file next to the Debug.xml file. Execution results are logged for all of the enabled Actions and their sub-actions, and for all of the enabled rules and their subrules.
The following is a snippet of the Debug.log file.
2022/01/07 17:48:39.405: + Sub-Action Step=’DocumentLinkViewDocument’
2022/01/07 17:48:39.405: (185) Info: Begin step execution.
2022/01/07 17:48:39.405: + Rule=ExecuteIfDocument
2022/01/07 17:48:39.405: + Function=@NOT
2022/01/07 17:48:39.405: + SubRuleTerm=ExecuteIfPicture
2022/01/07 17:48:39.405: + Rule=ExecuteIfPicture
2022/01/07 17:48:39.405: Result<Boolean>= false
2022/01/07 17:48:39.405: Result<Boolean>= true
This snippet tells us that the Execution rule “ExecuteIfDocument” for Sub-Acton step “DocumentLinkViewDocument” returned true, so the Sub-Action step “DocumentLinkViewDocument” got executed and I was able to open the attached document.
If you expect your action step to get executed but it was not, you should look at the execution result of its execution enabling rule, and the rule’s SubRuleTerms to see which part returned false.
Please follow the following link to get more detailed information about debugging an Agentry Application: