Highlighted
Absent Member.. Absent Member..
Absent Member..
1383 views

'Change Phase' through web services

Hello,

 

The change ticket can be moved to any phase using the button 'Change Phase '.

 

The action 'newphase' when called through web services throws an error 'A CXmlApiException was raised in native code : error 19 : scxmlapi(19) - Doc Engine call failed with cc -1'.

It expects the user input for the prompt (confirmation box with Yes/No which you can see from gui()).

 

Can you please let me know how to correct this?

As a work around, I created a new action and wrote a javascript to move the phase pointer back.

But it does not seem to work. there is an error 'No (more) records found' whenever this action is called through web services.

 

Regards,

Viji

0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

Error: A CXmlApiException was raised in native code : error 19 : scxmlapi(19) - Doc Engine call failed with cc -1

The se.external.action RAD Application is responsible for the application work-flow executed from a Web Services SOAP Request. This error will be returned if the exit code does not match a predefined set of values. Here are some common exits: cancel, error, locked, badval, no auth, and normal. The complete list can be found on the exit.normal panel of the se.external.action RAD Application.

 

Task # 1: Create the Display Option

Screen ID: cm.view.display

Action: chgphase

GUI Option: 777

Text Option: 777

Bank: 1

Text Alternative: Chg Phase

Condition: true

 

Task # 2: Create the Process record

Process Name: cm.chg.phase.bg

Next Process: cm.update.save (Condition = true)

Note: If desired, the sc.activity RAD Application could be called in this custom Process record (see Process = cm.chg.phase)

 

Task # 3: Modify the cm.update.save Process record

Final Expressions (end): if ($L.action="chgphase" and $L.exit="newcat") then ($L.exit="normal")

Note: This is the key change to avoid the thrown error. It is also the change that needs to be thoroughly tested before implementing in Production.

 

Task # 4: Modify the cm.view States record

Display Action: chgphase

Process Name: cm.chg.phase.bg

Condition: true

 

Task # 5: Modify the cm3r extaccess record

Allowed Actions: chgphase

Action Names: ChangePhase

 

Note: This solution was tested against an OOB 7.11 system, but the concept should apply to other versions.

Highlighted
Absent Member.. Absent Member..
Absent Member..

Thanks for your suggestions.

I did the above steps. Change ticket is updated wtih the respective phase provided, but the SOAP response throws the Doc Engine error still.

I had the same issue when i created a new action with java script as well.

Initially i was getting 'No (more) records found'. I fixed this error.

later ended up with Doc Engine error though the cm3r update is successful.

 

0 Likes
Highlighted
Absent Member.
Absent Member.

This indicates the condition in the custom expression to set $L.exit = "normal" is not evaluating to true. Add the following as the last expresssion (directly after the custom expression) to the Final Expressions tab of the cm.update.save Process record...

 

$L.void=rtecall("log", $L.code, "Vg_2 DEBUG: "+nullsub($L.exit, "empty"))

 

Execute the Web Service (send the SOAP Response) and then check the sm.log file for the "Vg_2 DEBUG" message.

 

If the value is "newcat", then this implies the condition did not evaluate to true.

If the value is something else, then there is another issue/scenario that needs to be investigated.

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Hi, Thanks for your response.

 

Here is the SOAP Response:

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Server</faultcode>
         <faultstring>A CXmlApiException was raised in native code : error 19 : scxmlapi(19) - Doc Engine call failed with cc -1</faultstring>
         <faultactor>Server</faultactor>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

Here is the sm.log entry:

I get 2 values for vg_2DEBUG: normal and newcat.

 

   832(  1840) 02/01/2012 08:53:10  RTE D sendXML response = <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><executeResponse xmlns="http://openview.hp.com/xmlns/SM/1"><threads><thread type="clientRequest">5</thread></threads><clientRequest name="message"><messages><message id="1" module="evmsg" severity="1">Change R0000393432 Phase RL Assess and Approve Updated by viji.rohan.</message></messages></clientRequest></executeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
   832(  1840) 02/01/2012 08:53:10  RAD I Vg_2 DEBUG: normal


832(  5440) 02/01/2012 08:53:40  RAD I Vg_2 DEBUG: newcat
   832(  5440) 02/01/2012 08:53:40  RTE D CallRAD returned 0 for docEngine invocation
   832(  5440) 02/01/2012 08:53:40  RTE D se.external.action returned -1 in parameter one
   832(  5440) 02/01/2012 08:53:40  RTE D docEngine call returned internal cc=-1 for action ChangePhase on file cm3r
   832(  5440) 02/01/2012 08:53:40  RTE W Exception occurred for method ChangePhase and XML request <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:com="http://schemas.hp.com/SM/7/Common" xmlns:ns="http://schemas.hp.com/SM/7" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xm="http://www.w3.org/2005/05/xmlmime">

 

 

0 Likes
Highlighted
Absent Member.
Absent Member.

The log entries are from the same process (PID 832) but from different threads (TIDs 1840 and 5440). The "2nd" entry confirms the condition did not evaluate to true. Consider enabling tracing (RTM:3, debugdbquery:999, and debughttp:1) and using the "log" rtecall in strategic places to track changes to $L.action.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.