'Change Phase' through web services
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?
But it does not seem to work. there is an error 'No (more) records found' whenever this action is called through web services.
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
GUI Option: 777
Text Option: 777
Text Alternative: Chg Phase
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
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.
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.
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.
Hi, Thanks for your response.
Here is the SOAP Response:
<faultstring>A CXmlApiException was raised in native code : error 19 : scxmlapi(19) - Doc Engine call failed with cc -1</faultstring>
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">