cancel
Showing results for 
Search instead for 
Did you mean: 

Using Moinitored Jobs as triggers

Former Member
0 Kudos

Hi,

When monitoring SAP jobs not defined in Redwood but entered in the  XBP Job Control Rules, is it possible to start a step in a chain with the condition of having a suuccessful completion of one of the monitored SAP jobs. If so, how is this accomplished.

Thanks


Accepted Solutions (1)

Accepted Solutions (1)

gmblom
Active Contributor
0 Kudos

Hello,

There are a couple of options. With Alerting and Monitoring module it is straightforward to setup a monitor for incoming monitored jobs, you can use that to trigger an event or a chain.

You can also use a trigger to do that.

The question is: why are you only monitoring the SAP job and not starting it yourself?

Regards Gerben

Former Member
0 Kudos

Thanks Gerben for the reply.

These are old interface programs that have their own job logic.

The plan is to convert them to Redwood but in the meantime, we have to start Redwood jobs according to the jobs this program starts.

We are not licensed for Alerting (not that I can see).

We are on version M33.104-74500.

Can you elaborate on your trigger option?

Thanks again

Maurice

gmblom
Active Contributor
0 Kudos

Hello Maurice,

here is what you can do with a Trigger, go to Scripting->Triggers and create a new one of type JobPostRunning, add the following code, there will be a couple of places where you will have to put your context information. If you are not confident you can work that out I would suggest a training:


{

  if ("SAP_CcmsJob".equals(jcsJob.getJobDefinition().getName()) && JobStatus.Completed.equals(jcsJob.getNewStatus()))

  {

    JobParameter jp = jcsJob.getJobParameterByName("JOBNAME");

    if (jp != null && "<the intercepted job name to trigger for>".equals(jp.getInValueString()))

    {

      // now start a job, raise an event, what you need

    }

  }

}

Regards Gerben

Former Member
0 Kudos

Thank you ... much appreciated.

Answers (0)