CA WA Soap Web Service Function (getApplicationStatus) returning incorrect response
search cancel

CA WA Soap Web Service Function (getApplicationStatus) returning incorrect response

book

Article ID: 248640

calendar_today

Updated On:

Products

CA Workload Automation DE

Issue/Introduction

We are calling CA Application soap Web services function called "getApplicationStatus()" to grab the status of current running Application. But for some cases we are getting incorrect response.

For example:
In our case for the application state "Trouble" we are getting state as  "Processing" while calling soap web service function(getApplicationStatus())  using SoapUI tool and Powershell. 


Environment

Release : 12.3

Component : CA WORKLOAD AUTOMATION DE (DSERIES)

Cause

Depending on whether the getApplicationStatus returns the values you want or not, have a look at the "Resolution" section below for alternative options. 

As noted in Application Web Services Functions, the following are the responses generated by this web service for application states:

  • Trouble/SUBERROR:   returns PROCESSING
  • Manual Intervention/MANHOLD: returns PROCESSING
  • ApplWait/ApplWait:   returns APPLWAIT
  • Waiting/PredWait:   returns PROCESSING
  • Complete/Complete:   returns COMPLETE

 

Resolution

Please see below for alternative solutions:

  1. executeclicommand web service api.
  2. ./cli command: 'listapplication application("297_LINUX_RESOURCE_ULIMIT") summary(true) gen(3)'
  3. enhancement/idea to add this capability to available REST API

 

executeclicommand web service api

The executeclicommand soap is that it behaves the exact same way as you would expect the cli.sh|bat and the CLI view in the Desktop Client. 

If you want to get more information about a certain cli, or just general help, you can send: 

  • <xsd:command>help</xsd:command>; or
  • <xsd:command>help listapplication</xsd:command>
  • <xsd:command>listapplication application("297_LINUX_RESOURCE_ULIMIT") summary(true) gen(3)</xsd:command>

The syntax for the "help listapplication" command is below. 

 

Output of <xsd:command>help listapplication</xsd:command>:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <xsd:executeCliCommandResponse xmlns:xsd="http://webservice.engine.wa.ca.com/xsd">
         <xsd:return>
            <xsd:commandResponse><![CDATA[Usage: 
LISTAPPLICATION APPLICATION("application") [SUMMARY(summary)] [GEN(gen)] [STATE("state")] [OLDEST(oldest)] [JOB(JOBLIST("joblist"))*] [SUBAPPL("subappl")] [CRITPATH(critpath)]

Display status information for an Application.
Example:
listapplication application("APPL1") summary(true) gen(1) state("complete") oldest(false) job("JOB0","JOB1","JOB2") subappl("SUBAPPLA") critpath(false)
listapplication application("APPL1") summary(true) gen(1) state("complete") oldest(false) job(joblist("JOB0,JOB1,JOB2")) subappl("SUBAPPLA") critpath(false)

application <string>
        The name of the Application to list.

summary <bool>
        List only a summary of the Application.
        Specify one of the following: summary, summary(true), summary(false).
        Specifying summary is equivalent to specifying summary(true).
        If not specified, the default is summary(false).

gen <int>
        The generation to list. If not specified, a summary of all active Applications is listed. 0 indicates the most recent generation should be displayed. A negative number indicates the generation previous to the current generation should be displayed. -1 indicates the previous generation should be displayed.

state <string>
        List active, complete or all generations of this Application. If not specified the default is "active".
        Specify one of the following: active, complete, all

oldest <bool>
        List the oldest incomplete generation.
        Specify one of the following: oldest, oldest(true), oldest(false).
        Specifying oldest is equivalent to specifying oldest(true).
        If not specified, the default is oldest(false).

JOB(JOBLIST("joblist"))*

        List a specific job in the application.

        joblist <string>
                A comma separated list can be provided to list more than one job.

subappl <string>
        Limit the listing to the specified subApplication.

critpath <bool>
        List jobs on the critical path. This parameter applies to active Applications only.
        Specify one of the following: critpath, critpath(true), critpath(false).
        Specifying critpath is equivalent to specifying critpath(true).
        If not specified, the default is critpath(false).]]></xsd:commandResponse>
            <xsd:standardResponse>
               <xsd:statusCompletionCode>SUCCESS</xsd:statusCompletionCode>
               <xsd:statusMessage/>
               <xsd:statusMessageId>0000</xsd:statusMessageId>
            </xsd:standardResponse>
         </xsd:return>
      </xsd:executeCliCommandResponse>
   </soapenv:Body>
</soapenv:Envelope>

 

 

./cli command: listapplication:

The CLI command offers the application status in-line with the application status reflected in the Desktop Client. Here is an example of the command that I've run and the output.

Command: 

./cli "hostname" 7500 "user" "mypass" 'listapplication application("297_LINUX_RESOURCE_ULIMIT") summary(true) gen(3)'

 

Output:

297_LINUX_RESOURCE_ULIMIT.3
 Application state: TROUBLE
 Completion percentage: 75.0
 Anticipated end time: N/A
 Event name: SCHED.297_LINUX_RESOURCE_ULIMIT
 Triggered by: MANUAL
 Started on: Fri Aug 05 16:40:58 UTC 2022
 Complete jobs: SLEEPDEAGENT, ULIMITDEAGENT_S, ULIMITROOT_H, ULIMITDEAGENT_H, ULIMITROOT_S, DEAGENTWHOAMI
 Incomplete jobs: ROOTWHOAMI, SLEEPROOT

 

Enhancement/idea to add this capability to available REST API

The following KB Article describes the process for submitting an enhancement request for dSeries: How to create Enhancement/Idea for ESP DSeries Workload Automation