Show batch class in task list


Sometimes running a batch job may depend on another one completing before it runs. To ensure that can happen, and to set it up involves some development work.

To add a batch job to an existing batch task list, lets first set up a batch job

imageFor this example i have created a batch job, and added the class InventTransferMultiPick (Transfer order – Picking list) to the list.

I have created my own batch job called MyBatchClass. This class needs to run only after the InventTransferMultiPick class has finished executing.

When I try to insert another record into the Batch tasks, it does not show this class there. For reasons, there is a setting required in the class called canGoBatchJournal. This method by default returns false, and needs to be explicitly overridden and set to true.

protected boolean canGoBatchJournal()
{
    /*
    boolean ret;
    ret = super();
    return ret;*/
    return true;
}

This then allows the batch to be added as a task manually:

image

You can set the parameters:

image

And set a condition in the “Has condition” group:

image

Advertisements

Leave a Reply / Comment

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s