Posted: 17 Feb 2016 4:05 EST Last activity: 17 Feb 2016 8:17 EST
7.1.9 How to execute an activity after ANY and EACH flow action execution without being defined as post action
I wanted to execute an activity after ANY and EACH flow action execution without specifying the activity as the post action of a flow action, a generic way to intercept flow action in other words, like the OOTB audit log does.
Is there any extension point or engine API that helps?
Message was edited by: Chunzhi Hong Re-worded question to avoid misunderstanding.
You can create a declare trigger on the class of flow actions and select "saved" as trigger condition and provide the activity you want to run in there. This will run every time the workobject is saved which basically happens after every flow action execution.
To find out if any extensions exist, trace a flow from one assignment shape through a flow action to the next assignment shape and only turn on "activity enters" and "activity exits" in the tracer so you don't get too much data. Then peruse the tracer results and look at each activity called. If an extension exists, it will be one of those activities and it will not be marked "final", and it will probably mention in its history or usage info (see the activity's rule form) that it is an extension. /Eric
having exposed columns in history table helps in performance (with no blob column)
also please refer: RULE-OBJ-ACTIVITY WORK- PYADDWORKHISTORYDEFAULTS if works.
Custom activity/data transform
custom datatransform rule to add '@(Pega-RULES:DateTime).CurrentDateTime()' before and after each interaction as StartTime & EndTime noting the lapsed time using @(Pega-RULES:DateTime).DateTimeDifference maintained in a page list with use case name
Log-Message/oLog.InfoForced with DSS allowing to write filtered by user ID