Automic Workload Automation

Expand all | Collapse all

Java API - index out of bounds error on simple call

  • 1.  Java API - index out of bounds error on simple call

    Posted Mar 23, 2018 07:56 PM
    I'm having a strange issue with the Java API calling to get JobHeaders. 
    Here is my code
    OpenObject openObject = new OpenObject(new UC4ObjectName(jobName), true, true)
    connectionService.sendRequestAndWait(openObject)
    UC4Object uc4_object = openObject.getUC4Object()

    connectionService.sendRequestAndWait(new CloseObject(uc4_object))

    and here is my stack trace
    java.lang.IndexOutOfBoundsException: Index: 12, Size: 4
            at java.util.ArrayList.rangeCheck(ArrayList.java:657)
            at java.util.ArrayList.get(ArrayList.java:433)
            at com.uc4.api.objects.WorkflowTasks.getTask(WorkflowTasks.java:97)
            at com.uc4.api.objects.WorkflowTasks.<init>(WorkflowTasks.java:66)
            at com.uc4.api.objects.JobPlan.loadContent(JobPlan.java:43)
            at com.uc4.api.objects.UC4Object.load(UC4Object.java:166)
            at com.uc4.communication.requests.OpenObject.handleContent(OpenObject.java:179)
            at com.uc4.communication.requests.XMLRequest.handleResponse(XMLRequest.java:75)
            at com.uc4.communication.Connection.sendRequestAndWait(Connection.java:1180)

    This function works for hundreds/thousands of other jobs/workflows, but this workflow is giving this error. The header tab is valid when you open it via the client, and the workflow is running without issue.


  • 2.  Java API - index out of bounds error on simple call

    Posted Mar 23, 2018 08:24 PM
    I made a duplicate of this workflow and I still get the same error, but I can't see anything special about this workflow.