batchee-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reinhard Sandtner (JIRA)" <>
Subject [jira] [Updated] (BATCHEE-117) Restart after a Decision Stop is not getting called
Date Mon, 20 Mar 2017 18:49:41 GMT


Reinhard Sandtner updated BATCHEE-117:
    Docs Text:   (was: Maven Dependency:


<?xml version="1.0" encoding="UTF-8"?>
<job id="bigbangdecision" xmlns="" xmlns:xsi=""
    <step id="step1" next="decider1">
        <batchlet ref="myBatchlet1"/>
    <decision id="decider1" ref="myDecider">
        <fail on="fail" exit-status="Failed on decider1"/>
        <end on="end" exit-status="Completed on decider1"/>
        <stop on="stop" exit-status="Stopped on decider1" restart="step3"/>
        <next on="*" to="step3"/>
    <step id="step2">
        <batchlet ref="myBatchlet2"/>
    <step id="step3">
        <batchlet ref="myBatchlet3"/>

Decide Class:

import javax.batch.api.Decider;
import javax.batch.runtime.StepExecution;
import javax.inject.Named;

public class MyDecider implements Decider {

    public String decide(StepExecution[] ses) throws Exception {
    	String decision = "stop";
        for (StepExecution se : ses) {
            System.out.println(se.getStepName() + " " + se.getBatchStatus().toString() + "
" + se.getExitStatus());
    	System.out.println("Returning Decision: " + decision);
        return decision;

MyBatchlet3 (Step 3) class:

import javax.batch.api.AbstractBatchlet;
import javax.inject.Named;

public class MyBatchlet3 extends AbstractBatchlet {

    public String process() {
        System.out.println("Running inside a batchlet 3");

        return "COMPLETED";

> Restart after a Decision Stop is not getting called
> ---------------------------------------------------
>                 Key: BATCHEE-117
>                 URL:
>             Project: BatchEE
>          Issue Type: Bug
>            Reporter: Ashwanth
> I am using It looks like when the decider class returns a String that should result in
a "Stop", the exit status on the stop condition is getting set correctly but the restart step
is not getting called by the framework. 
> In my example, MyDecider class returns "stop", the exit status is successfully set to
"Stopped on decider1" but step3 is not getting invoked. My understanding is that step3 will
be invoked automatically by the batch implementation. 
> If my understanding on the functionality is incorrect, please reject this jira.

This message was sent by Atlassian JIRA

View raw message