Skip to Content
avatar image
Former Member

Mail based on event raise

Hi guys,

New to SAP CPS, but need help in setting up the mail alerting based on following scenario:

Job chain contains 3 jobs: job_a, job_b, job_c. Custom mail definition is job_mail.

Path flow job_a->job_b->job_c.

Now in the chain flow, let us assume job_a works fine, job_b fails, the customer scenario is such that even if the job_b fails, the job_c should run. But job_b on error status should raise event say “EV_SendEmail”. My custom defined job_mail runs on wait event "EV_SendEmail" should run on the raise of this event. The job currently runs, sends out the email, but sends the job log and the job id of this job “job_mail”. Not the job_b’s id or the job_b’s log file.

How do I make this scenario work?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 16, 2014 at 02:16 AM

    an easier way would be, create a small job chain:

    Step 1  - Job b

    Step 2 - mail_send on job b failure (relative job = setp 1, job 1; file = *)

    Now if step 1 fails, set the status handler to move to step 2, but if it completes, mark the job chain complete.

    Now add this small chain intead of job_b in the big job chain.

    In bigger job chain, the step where you added the small chain, set all the status handlers to move the Job_c, irrespective of whether small chain is success or error.

    Thanks

    Nanda

    Add comment
    10|10000 characters needed characters exceeded