Question

campaign listener to trigger action before or after a campaign execution

HI,

I have the requirement to signal an external system when the data produced from an outbound Pega campaign are ready.

I want to run a campaign every day, it will analyze 1000 customer and will stop when it found the first 200 eligible customers. Output should be written in a Table (preferred) or in a File. I need to inform external system as soon as the the data (in table or file) are ready, this should happen after each daily run.

I was wondering if there is any listeners on campaign execution I can customize to signal this.

signals could be run code/activity to accomplish one of the follow:

  • invoke an API (REST)
  • write a record on a table

what I can do?

Thanks

Comments

Keep up to date on this post and subscribe to comments

September 12, 2019 - 7:09am

Hi,

Could you provide your Pega version? There are some extension points in Pega 731 and above which you could potentially leverage. Please check the below link:

https://community1.pega.com/community/pega-support/question/notify-upon-every-campaign-execution

Thanks,

September 12, 2019 - 7:46am

Pega 8.3

I read about PostExecuteProgramRunExt also in this https://community1.pega.com/community/pega-support/question/monitoring-campaign-execution point #4

I am scared about this "there are precautions of using post processing - read the history of the rule for more documentation on that" but I am not able to find anything.

can you help me on that?

Thanks 

September 12, 2019 - 1:32pm
Response to PAOCAN11

Not too scary. When using this extension, you just need to be sure the primary page stays locked when your activity wraps up - which could not be the case if you perform commits. Also, you need to make sure you don't modify any value on this primary or embedded pages.

What they are calling attention to here is found in the history tab shown in this screenshot. 

The text from these two fields are as follows :

Description: Activity executed after every Multi-Channel and Outbound Campaign Run - specifically, post completion of the batch Data Flow. It is shipped empty out-of-the-box and may be overridden in the implementation layer.

Usage: When overriding this activity, be very careful not to impact the execution lifecycle of the run. Adhere to the following:

1. This activity executes in the context of a Flow and expects the primary page to be locked. Any commits in the call chain of this activity may impact this lock. If performing operations that require a commit, make sure to re-acquire the lock on the primary page by doing an Obj-Refresh-And-Lock at the end of this activity.

2. Subsequent run processing depends on the incoming configuration of out-of-the-box properties on the parameter page, the primary page, and embedded pages. Do not modify the values of any of these properties.