IFCnX 2.32 IFCnX 2.31 IFCnX 2.30 IFCnX 2.29 IFCnX 2.28 IFCnX 2.27 2.26 2.25 2.24 2.23 2.22 German English
IFCnX 2.32 IFCnX 2.31 IFCnX 2.30 IFCnX 2.29 IFCnX 2.28 IFCnX 2.27 2.26 2.25 2.24 2.23 2.22 German English

Force execution

An implemented error workflow can be tested with a real error by running the following CRON job.

A JavaScript file has to be created on the Windchill server with the following content:


Nashorn:

var WTException = Java.type("wt.util.WTException");
throw new WTException("BOOM");

MVEL:

import wt.util.WTException;
throw new WTException("BOOM");


Now, a JavaScript CRON job has to be configured.

  1. Template JAVASCRIPT has to be chosen

  2. Expression has to be set to '* * * * *'

  3. The number of runs has to be limited to 1

  4. Error workflow has to be set for the workflow template to be tested.

  5. Path to the Javascript file has to be set as a parameter.


After creating the CRON job, the administrators receive the following e-mail:

image2022-9-24_23-32-13.png