Liberty Batch not throwing exception when job launched with same input parameter where as spring batch...





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I am developing batch job in java-ee-7 on top of liberty server. using the REST API to launch the batch job. The issue here is when I tried to launch the batch job for the same input parameter, new job instance getting created. Whereas spring batch process, throws an error saying JobInstanceAlreadyExistsException. I am expecting something like this to avoid new job been created for the same input parameter



The input parameter and batch status has been stored in persistent storage in Oracle database using the liberty server tables (WLPJOBINSTANCE, WLPSTEPTHREADINSTANCE, wlpjobparameter etc).



<job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd"
id="my-batch-job" restartable="true" version="1.0">
</job>


Expected: Job should throw an exception if the same input parameter is passed.
Actual: Its creating new job instance for the same input parameter










share|improve this question































    1















    I am developing batch job in java-ee-7 on top of liberty server. using the REST API to launch the batch job. The issue here is when I tried to launch the batch job for the same input parameter, new job instance getting created. Whereas spring batch process, throws an error saying JobInstanceAlreadyExistsException. I am expecting something like this to avoid new job been created for the same input parameter



    The input parameter and batch status has been stored in persistent storage in Oracle database using the liberty server tables (WLPJOBINSTANCE, WLPSTEPTHREADINSTANCE, wlpjobparameter etc).



    <job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd"
    id="my-batch-job" restartable="true" version="1.0">
    </job>


    Expected: Job should throw an exception if the same input parameter is passed.
    Actual: Its creating new job instance for the same input parameter










    share|improve this question



























      1












      1








      1








      I am developing batch job in java-ee-7 on top of liberty server. using the REST API to launch the batch job. The issue here is when I tried to launch the batch job for the same input parameter, new job instance getting created. Whereas spring batch process, throws an error saying JobInstanceAlreadyExistsException. I am expecting something like this to avoid new job been created for the same input parameter



      The input parameter and batch status has been stored in persistent storage in Oracle database using the liberty server tables (WLPJOBINSTANCE, WLPSTEPTHREADINSTANCE, wlpjobparameter etc).



      <job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://xmlns.jcp.org/xml/ns/javaee"
      xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd"
      id="my-batch-job" restartable="true" version="1.0">
      </job>


      Expected: Job should throw an exception if the same input parameter is passed.
      Actual: Its creating new job instance for the same input parameter










      share|improve this question
















      I am developing batch job in java-ee-7 on top of liberty server. using the REST API to launch the batch job. The issue here is when I tried to launch the batch job for the same input parameter, new job instance getting created. Whereas spring batch process, throws an error saying JobInstanceAlreadyExistsException. I am expecting something like this to avoid new job been created for the same input parameter



      The input parameter and batch status has been stored in persistent storage in Oracle database using the liberty server tables (WLPJOBINSTANCE, WLPSTEPTHREADINSTANCE, wlpjobparameter etc).



      <job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://xmlns.jcp.org/xml/ns/javaee"
      xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd"
      id="my-batch-job" restartable="true" version="1.0">
      </job>


      Expected: Job should throw an exception if the same input parameter is passed.
      Actual: Its creating new job instance for the same input parameter







      java java-ee websphere-liberty java-ee-7 jsr352






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 6 at 13:11









      Ralf

      1,308312




      1,308312










      asked Jan 4 at 17:01









      user3540722user3540722

      306




      306
























          2 Answers
          2






          active

          oldest

          votes


















          1














          Using Liberty Batch REST API to see if matching job instance already exists



          I'm going to give a second, completely different answer here. The other answer justified why Liberty Batch, and more generally the JSR 352 specification, will never consider it an error case to submit a second job with the same job parameters as an earlier one.



          But if you really wanted to prevent this, you can do this in Liberty Batch by using the REST API to query, before submission, if a matching job instance already exists. At this point, it will be up to you to abort/prevent the job submission, however.



          Say I wanted to match jobName of BonusPayout, with job parameter parm1 of value 1000 and job parameter parm2 matching 500* (with glob/wildcard).



          I could do this via URL:




          https:///ibm/api/batch/v4/jobinstances?jobName=BonusPayout&jobParameter.parm1=1000&jobParameter.parm2=500*




          Note in the doc there are various other options like ignoring case (or not).



          So if I get a match, I can choose to NOT go ahead and submit the job (again).






          share|improve this answer
























          • Thanks Scott.. That's the best way. Using the GET call on the REST API to get the instance list and if matches, then I can choose to not submit the job again.

            – user3540722
            Jan 14 at 19:15



















          1














          The Liberty Batch implementation is working as designed, in accordance with the JSR 352 specification.



          There is no way in Liberty Batch (or the JSR 352 spec) to prevent you from creating any number of Job Instances from a given job definition, and you would have to create your own mechanism for doing so.



          The conceptual starting point in JSR 352 is a job definition for a job that typically will be run repeatedly according to some schedule: daily, monthly, quarterly, etc.



          There is nothing in Liberty Batch or the spec to prevent you from starting a new job instance via the JobOperator start() method, or, using the Liberty Batch REST API, via a POST /ibm/api/batch/jobinstances/ because some similar job instance already exists.



          You are prevented from restarting a job instance that has already completed but never from creating new job instances.



          This is phrased another way in this answer and you'll find the spec concepts discussed in more detail here.



          So whatever Spring Batch provides here is unique to its implementation.






          share|improve this answer
























          • Having said all that, I'd be interested to hear more about your use case (the motivation) in a comment. Thanks.

            – Scott Kurz
            Jan 5 at 4:33











          • Agreed. How we can prevent the job being launched again for the same input parameter.

            – user3540722
            Jan 8 at 18:57











          • Agreed. How we can prevent the job being launched again for the same input parameter (Assuming previous launch still running). For Ex: At 2pm, Launching a job for parameters ( "startDate" : "04/20/2017", "endDate" : "04/21/2017") At 2.02pm again Launching a job for the same input parameters (Note: previous job still running). In this case, I'm expecting Batch should have not started the new instance, because its already created an instance for the given parameters and its still running. I believe in this case, spring batch throws an exception like JobInstanceAlreadyExistsException.

            – user3540722
            Jan 8 at 19:07











          • So the conceptual background explains why we didn't consider this a "primary" use case with built-in support in our spec and REST APIs. So I suppose the best way to do this if you still really wanted to would be to use the REST API to do a search ahead of time before submitting the new job instance (since as mentioned, we will never fail the submission because some other job instance already exists). I'll give a second, different answer then, explaining how you might do this.

            – Scott Kurz
            Jan 8 at 20:35












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54043192%2fliberty-batch-not-throwing-exception-when-job-launched-with-same-input-parameter%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Using Liberty Batch REST API to see if matching job instance already exists



          I'm going to give a second, completely different answer here. The other answer justified why Liberty Batch, and more generally the JSR 352 specification, will never consider it an error case to submit a second job with the same job parameters as an earlier one.



          But if you really wanted to prevent this, you can do this in Liberty Batch by using the REST API to query, before submission, if a matching job instance already exists. At this point, it will be up to you to abort/prevent the job submission, however.



          Say I wanted to match jobName of BonusPayout, with job parameter parm1 of value 1000 and job parameter parm2 matching 500* (with glob/wildcard).



          I could do this via URL:




          https:///ibm/api/batch/v4/jobinstances?jobName=BonusPayout&jobParameter.parm1=1000&jobParameter.parm2=500*




          Note in the doc there are various other options like ignoring case (or not).



          So if I get a match, I can choose to NOT go ahead and submit the job (again).






          share|improve this answer
























          • Thanks Scott.. That's the best way. Using the GET call on the REST API to get the instance list and if matches, then I can choose to not submit the job again.

            – user3540722
            Jan 14 at 19:15
















          1














          Using Liberty Batch REST API to see if matching job instance already exists



          I'm going to give a second, completely different answer here. The other answer justified why Liberty Batch, and more generally the JSR 352 specification, will never consider it an error case to submit a second job with the same job parameters as an earlier one.



          But if you really wanted to prevent this, you can do this in Liberty Batch by using the REST API to query, before submission, if a matching job instance already exists. At this point, it will be up to you to abort/prevent the job submission, however.



          Say I wanted to match jobName of BonusPayout, with job parameter parm1 of value 1000 and job parameter parm2 matching 500* (with glob/wildcard).



          I could do this via URL:




          https:///ibm/api/batch/v4/jobinstances?jobName=BonusPayout&jobParameter.parm1=1000&jobParameter.parm2=500*




          Note in the doc there are various other options like ignoring case (or not).



          So if I get a match, I can choose to NOT go ahead and submit the job (again).






          share|improve this answer
























          • Thanks Scott.. That's the best way. Using the GET call on the REST API to get the instance list and if matches, then I can choose to not submit the job again.

            – user3540722
            Jan 14 at 19:15














          1












          1








          1







          Using Liberty Batch REST API to see if matching job instance already exists



          I'm going to give a second, completely different answer here. The other answer justified why Liberty Batch, and more generally the JSR 352 specification, will never consider it an error case to submit a second job with the same job parameters as an earlier one.



          But if you really wanted to prevent this, you can do this in Liberty Batch by using the REST API to query, before submission, if a matching job instance already exists. At this point, it will be up to you to abort/prevent the job submission, however.



          Say I wanted to match jobName of BonusPayout, with job parameter parm1 of value 1000 and job parameter parm2 matching 500* (with glob/wildcard).



          I could do this via URL:




          https:///ibm/api/batch/v4/jobinstances?jobName=BonusPayout&jobParameter.parm1=1000&jobParameter.parm2=500*




          Note in the doc there are various other options like ignoring case (or not).



          So if I get a match, I can choose to NOT go ahead and submit the job (again).






          share|improve this answer













          Using Liberty Batch REST API to see if matching job instance already exists



          I'm going to give a second, completely different answer here. The other answer justified why Liberty Batch, and more generally the JSR 352 specification, will never consider it an error case to submit a second job with the same job parameters as an earlier one.



          But if you really wanted to prevent this, you can do this in Liberty Batch by using the REST API to query, before submission, if a matching job instance already exists. At this point, it will be up to you to abort/prevent the job submission, however.



          Say I wanted to match jobName of BonusPayout, with job parameter parm1 of value 1000 and job parameter parm2 matching 500* (with glob/wildcard).



          I could do this via URL:




          https:///ibm/api/batch/v4/jobinstances?jobName=BonusPayout&jobParameter.parm1=1000&jobParameter.parm2=500*




          Note in the doc there are various other options like ignoring case (or not).



          So if I get a match, I can choose to NOT go ahead and submit the job (again).







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 8 at 20:55









          Scott KurzScott Kurz

          3,23611028




          3,23611028













          • Thanks Scott.. That's the best way. Using the GET call on the REST API to get the instance list and if matches, then I can choose to not submit the job again.

            – user3540722
            Jan 14 at 19:15



















          • Thanks Scott.. That's the best way. Using the GET call on the REST API to get the instance list and if matches, then I can choose to not submit the job again.

            – user3540722
            Jan 14 at 19:15

















          Thanks Scott.. That's the best way. Using the GET call on the REST API to get the instance list and if matches, then I can choose to not submit the job again.

          – user3540722
          Jan 14 at 19:15





          Thanks Scott.. That's the best way. Using the GET call on the REST API to get the instance list and if matches, then I can choose to not submit the job again.

          – user3540722
          Jan 14 at 19:15













          1














          The Liberty Batch implementation is working as designed, in accordance with the JSR 352 specification.



          There is no way in Liberty Batch (or the JSR 352 spec) to prevent you from creating any number of Job Instances from a given job definition, and you would have to create your own mechanism for doing so.



          The conceptual starting point in JSR 352 is a job definition for a job that typically will be run repeatedly according to some schedule: daily, monthly, quarterly, etc.



          There is nothing in Liberty Batch or the spec to prevent you from starting a new job instance via the JobOperator start() method, or, using the Liberty Batch REST API, via a POST /ibm/api/batch/jobinstances/ because some similar job instance already exists.



          You are prevented from restarting a job instance that has already completed but never from creating new job instances.



          This is phrased another way in this answer and you'll find the spec concepts discussed in more detail here.



          So whatever Spring Batch provides here is unique to its implementation.






          share|improve this answer
























          • Having said all that, I'd be interested to hear more about your use case (the motivation) in a comment. Thanks.

            – Scott Kurz
            Jan 5 at 4:33











          • Agreed. How we can prevent the job being launched again for the same input parameter.

            – user3540722
            Jan 8 at 18:57











          • Agreed. How we can prevent the job being launched again for the same input parameter (Assuming previous launch still running). For Ex: At 2pm, Launching a job for parameters ( "startDate" : "04/20/2017", "endDate" : "04/21/2017") At 2.02pm again Launching a job for the same input parameters (Note: previous job still running). In this case, I'm expecting Batch should have not started the new instance, because its already created an instance for the given parameters and its still running. I believe in this case, spring batch throws an exception like JobInstanceAlreadyExistsException.

            – user3540722
            Jan 8 at 19:07











          • So the conceptual background explains why we didn't consider this a "primary" use case with built-in support in our spec and REST APIs. So I suppose the best way to do this if you still really wanted to would be to use the REST API to do a search ahead of time before submitting the new job instance (since as mentioned, we will never fail the submission because some other job instance already exists). I'll give a second, different answer then, explaining how you might do this.

            – Scott Kurz
            Jan 8 at 20:35
















          1














          The Liberty Batch implementation is working as designed, in accordance with the JSR 352 specification.



          There is no way in Liberty Batch (or the JSR 352 spec) to prevent you from creating any number of Job Instances from a given job definition, and you would have to create your own mechanism for doing so.



          The conceptual starting point in JSR 352 is a job definition for a job that typically will be run repeatedly according to some schedule: daily, monthly, quarterly, etc.



          There is nothing in Liberty Batch or the spec to prevent you from starting a new job instance via the JobOperator start() method, or, using the Liberty Batch REST API, via a POST /ibm/api/batch/jobinstances/ because some similar job instance already exists.



          You are prevented from restarting a job instance that has already completed but never from creating new job instances.



          This is phrased another way in this answer and you'll find the spec concepts discussed in more detail here.



          So whatever Spring Batch provides here is unique to its implementation.






          share|improve this answer
























          • Having said all that, I'd be interested to hear more about your use case (the motivation) in a comment. Thanks.

            – Scott Kurz
            Jan 5 at 4:33











          • Agreed. How we can prevent the job being launched again for the same input parameter.

            – user3540722
            Jan 8 at 18:57











          • Agreed. How we can prevent the job being launched again for the same input parameter (Assuming previous launch still running). For Ex: At 2pm, Launching a job for parameters ( "startDate" : "04/20/2017", "endDate" : "04/21/2017") At 2.02pm again Launching a job for the same input parameters (Note: previous job still running). In this case, I'm expecting Batch should have not started the new instance, because its already created an instance for the given parameters and its still running. I believe in this case, spring batch throws an exception like JobInstanceAlreadyExistsException.

            – user3540722
            Jan 8 at 19:07











          • So the conceptual background explains why we didn't consider this a "primary" use case with built-in support in our spec and REST APIs. So I suppose the best way to do this if you still really wanted to would be to use the REST API to do a search ahead of time before submitting the new job instance (since as mentioned, we will never fail the submission because some other job instance already exists). I'll give a second, different answer then, explaining how you might do this.

            – Scott Kurz
            Jan 8 at 20:35














          1












          1








          1







          The Liberty Batch implementation is working as designed, in accordance with the JSR 352 specification.



          There is no way in Liberty Batch (or the JSR 352 spec) to prevent you from creating any number of Job Instances from a given job definition, and you would have to create your own mechanism for doing so.



          The conceptual starting point in JSR 352 is a job definition for a job that typically will be run repeatedly according to some schedule: daily, monthly, quarterly, etc.



          There is nothing in Liberty Batch or the spec to prevent you from starting a new job instance via the JobOperator start() method, or, using the Liberty Batch REST API, via a POST /ibm/api/batch/jobinstances/ because some similar job instance already exists.



          You are prevented from restarting a job instance that has already completed but never from creating new job instances.



          This is phrased another way in this answer and you'll find the spec concepts discussed in more detail here.



          So whatever Spring Batch provides here is unique to its implementation.






          share|improve this answer













          The Liberty Batch implementation is working as designed, in accordance with the JSR 352 specification.



          There is no way in Liberty Batch (or the JSR 352 spec) to prevent you from creating any number of Job Instances from a given job definition, and you would have to create your own mechanism for doing so.



          The conceptual starting point in JSR 352 is a job definition for a job that typically will be run repeatedly according to some schedule: daily, monthly, quarterly, etc.



          There is nothing in Liberty Batch or the spec to prevent you from starting a new job instance via the JobOperator start() method, or, using the Liberty Batch REST API, via a POST /ibm/api/batch/jobinstances/ because some similar job instance already exists.



          You are prevented from restarting a job instance that has already completed but never from creating new job instances.



          This is phrased another way in this answer and you'll find the spec concepts discussed in more detail here.



          So whatever Spring Batch provides here is unique to its implementation.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 5 at 4:33









          Scott KurzScott Kurz

          3,23611028




          3,23611028













          • Having said all that, I'd be interested to hear more about your use case (the motivation) in a comment. Thanks.

            – Scott Kurz
            Jan 5 at 4:33











          • Agreed. How we can prevent the job being launched again for the same input parameter.

            – user3540722
            Jan 8 at 18:57











          • Agreed. How we can prevent the job being launched again for the same input parameter (Assuming previous launch still running). For Ex: At 2pm, Launching a job for parameters ( "startDate" : "04/20/2017", "endDate" : "04/21/2017") At 2.02pm again Launching a job for the same input parameters (Note: previous job still running). In this case, I'm expecting Batch should have not started the new instance, because its already created an instance for the given parameters and its still running. I believe in this case, spring batch throws an exception like JobInstanceAlreadyExistsException.

            – user3540722
            Jan 8 at 19:07











          • So the conceptual background explains why we didn't consider this a "primary" use case with built-in support in our spec and REST APIs. So I suppose the best way to do this if you still really wanted to would be to use the REST API to do a search ahead of time before submitting the new job instance (since as mentioned, we will never fail the submission because some other job instance already exists). I'll give a second, different answer then, explaining how you might do this.

            – Scott Kurz
            Jan 8 at 20:35



















          • Having said all that, I'd be interested to hear more about your use case (the motivation) in a comment. Thanks.

            – Scott Kurz
            Jan 5 at 4:33











          • Agreed. How we can prevent the job being launched again for the same input parameter.

            – user3540722
            Jan 8 at 18:57











          • Agreed. How we can prevent the job being launched again for the same input parameter (Assuming previous launch still running). For Ex: At 2pm, Launching a job for parameters ( "startDate" : "04/20/2017", "endDate" : "04/21/2017") At 2.02pm again Launching a job for the same input parameters (Note: previous job still running). In this case, I'm expecting Batch should have not started the new instance, because its already created an instance for the given parameters and its still running. I believe in this case, spring batch throws an exception like JobInstanceAlreadyExistsException.

            – user3540722
            Jan 8 at 19:07











          • So the conceptual background explains why we didn't consider this a "primary" use case with built-in support in our spec and REST APIs. So I suppose the best way to do this if you still really wanted to would be to use the REST API to do a search ahead of time before submitting the new job instance (since as mentioned, we will never fail the submission because some other job instance already exists). I'll give a second, different answer then, explaining how you might do this.

            – Scott Kurz
            Jan 8 at 20:35

















          Having said all that, I'd be interested to hear more about your use case (the motivation) in a comment. Thanks.

          – Scott Kurz
          Jan 5 at 4:33





          Having said all that, I'd be interested to hear more about your use case (the motivation) in a comment. Thanks.

          – Scott Kurz
          Jan 5 at 4:33













          Agreed. How we can prevent the job being launched again for the same input parameter.

          – user3540722
          Jan 8 at 18:57





          Agreed. How we can prevent the job being launched again for the same input parameter.

          – user3540722
          Jan 8 at 18:57













          Agreed. How we can prevent the job being launched again for the same input parameter (Assuming previous launch still running). For Ex: At 2pm, Launching a job for parameters ( "startDate" : "04/20/2017", "endDate" : "04/21/2017") At 2.02pm again Launching a job for the same input parameters (Note: previous job still running). In this case, I'm expecting Batch should have not started the new instance, because its already created an instance for the given parameters and its still running. I believe in this case, spring batch throws an exception like JobInstanceAlreadyExistsException.

          – user3540722
          Jan 8 at 19:07





          Agreed. How we can prevent the job being launched again for the same input parameter (Assuming previous launch still running). For Ex: At 2pm, Launching a job for parameters ( "startDate" : "04/20/2017", "endDate" : "04/21/2017") At 2.02pm again Launching a job for the same input parameters (Note: previous job still running). In this case, I'm expecting Batch should have not started the new instance, because its already created an instance for the given parameters and its still running. I believe in this case, spring batch throws an exception like JobInstanceAlreadyExistsException.

          – user3540722
          Jan 8 at 19:07













          So the conceptual background explains why we didn't consider this a "primary" use case with built-in support in our spec and REST APIs. So I suppose the best way to do this if you still really wanted to would be to use the REST API to do a search ahead of time before submitting the new job instance (since as mentioned, we will never fail the submission because some other job instance already exists). I'll give a second, different answer then, explaining how you might do this.

          – Scott Kurz
          Jan 8 at 20:35





          So the conceptual background explains why we didn't consider this a "primary" use case with built-in support in our spec and REST APIs. So I suppose the best way to do this if you still really wanted to would be to use the REST API to do a search ahead of time before submitting the new job instance (since as mentioned, we will never fail the submission because some other job instance already exists). I'll give a second, different answer then, explaining how you might do this.

          – Scott Kurz
          Jan 8 at 20:35


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54043192%2fliberty-batch-not-throwing-exception-when-job-launched-with-same-input-parameter%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas