Webservice connector with OAuth2 and Client credential getting After Rule exception

Hi all,
We have IdeneityIQ 7.3p7 version, configured for an application using Webservices connector, OAuth2 and Client credential Grand Type. The Test connection works fine Also I tested al use cases on Postman too. I set up the Account aggregation operation and getting NullPointerException when I run the account aggregation task.
I got before and After rules codes from( 7_3_SailPoint_Direct_Connectors_Admin_and_Config_Guide.pdf).
On the log file for The Current EndPoint object shows all attribute with values but on the second endpoint get Null value for those attributes like _fullUrl=null.
What should I add on After Rule codes to get fullUrl values?

Thanks for your help.
Massoud

What is the purpose of your before and after rules?
Both rules should have a return statement. For reference see Web Services Before/After Operation Rule

Thanks Paul for your reply.
Thanks for sharing the the Webservices Before/After operation rule link. What I did understand the purpose of my before and after rules are when running the Account aggregation task the before creates Map object with all attributes and passes to the After rule to send request for the second user records and this loop will continue until last records.
I changed the After Rule by using the document link that you shared. Now the Account aggregation task runs without any errors and the log shows that the after rule can grab users data and returns the updatedMapInfo map. Now I can see the accounts on the application but are not correlated.
Thanks,
Massoud

You can add a Correlation Config (simple attribute matching) or Correlation Rule (used when coding logic is required to find a match) to the Application for correlating the application account to their respective Identity.