Clarity

Expand all | Collapse all

BPM-0704: An error occurred while executing custom script

System

SystemMay 24, 2013 10:54 AM

  • 1.  BPM-0704: An error occurred while executing custom script

    Posted May 23, 2013 02:03 AM
      |   view attached
    Hi there,

    We just upgraded from 12.1 to 13.1 (on a dev environment). A certain process that involves XOG has started giving the Clarity process error
    BPM-0704: An error occurred while executing custom script

    We have found out that the error comes only for processes where XOG is happening. In the current process (please see attached process gel xml), everything works fine until the below portion is included. As soon as you include this thing the whole process errors out.

    <soap:invoke endpoint="${V_WEBURL}/niku/xog" var="auth">
    <soap:message>
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
    <soapenv:Header/>
    <soapenv:Body>
    <xog:Login>
    <xog:Username>${V_XOG_ID}</xog:Username>
    <xog:Password>${V_XOG_PWD}</xog:Password>
    </xog:Login>
    </soapenv:Body>
    </soapenv:Envelope>
    </soap:message>
    </soap:invoke>

    Strange thing is once the above portion is included, process won't print any logs that were written even before the above.

    The process is, otherwise, very simple. We are fetching the Clarity URL/pwds etc from our constants table and building a project financial xml XOG file, to financially enable project (attached).

    Attachment(s)

    xml
    fin_enable_v13.xml   11 KB 1 version


  • 2.  RE: BPM-0704: An error occurred while executing custom script

    Posted May 23, 2013 05:58 AM
    I don't have any experience of XOG on v13 so this is a guess:

    - I notice in the Project Write part of your XML that you've got version="12.0.2.5101" - should that be referencing v13?

    What error messages do you get?


  • 3.  RE: BPM-0704: An error occurred while executing custom script

    Posted May 23, 2013 09:39 AM

    pankaj_navlekar wrote:



    Strange thing is once the above portion is included, process won't print any logs that were written even before the above.

    [...] We are fetching the Clarity URL/pwds etc from our constants table [...].
    Hi! For what you say and having read your xml, try the following on your developement v13 environment:

    First, try to execute the following queries:

    (1) select const_string from odf_ca_ut_constants where code in('WEBURL')
    (2) select const_string from odf_ca_ut_constants where code in('CLIENTID')
    (3) select const_string from odf_ca_ut_constants where code in('CLIENTNAME')
    (4) select const_string from odf_ca_ut_constants where code in('XOGUSERID')
    (5) select const_string from odf_ca_ut_constants where code in('XOGUSERPWD')

    Check the results, if any query doesn't show results you may have the answer to your questions.

    In particular, in order to get the XOG working you need V_WEBURL, V_XOG_ID and V_XOG_PWD

    Lets us know if you get it to work :)

    Regards.


  • 4.  RE: BPM-0704: An error occurred while executing custom script

    Posted May 23, 2013 09:51 AM
    I notice in your GEL you are "catching" exceptions everywhere with your[font=Courier New]<core:catch var="v_results">[font] code (this is good practice :grin: ), but you are not ever doing anything with the [font=Courier New]v_results[font] which will contain the details of your exception - perhaps you need to dump out v_results somewhere in order to be able to interrogate the errors!


  • 5.  RE: BPM-0704: An error occurred while executing custom script

    Posted May 23, 2013 10:11 PM
    Thank you all for you inputs.

    1. I have checked the code/sql queries etc and they are all fine. (N.B. the same process works fine in 12.1)

    2. As I said, in the same 13.1 environment, the Gel works fine until I put the SOAP invoke (and the subsequent) part, after which everything fails. I tested the URL that's formed in the below and it works. So not sure what is going wrong here.
    <soap:invoke endpoint="${V_WEBURL}/niku/xog" var="auth">
    <soap:message>
    <soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
    <soapenv:Header/>
    <soapenv:Body>
    <xog:Login>
    <xog:Username>${V_XOG_ID}</xog:Username>
    <xog:Password>${V_XOG_PWD}</xog:Password>
    </xog:Login>
    </soapenv:Body>
    </soapenv:Envelope>
    </soap:message>
    </soap:invoke>


  • 6.  RE: BPM-0704: An error occurred while executing custom script

    Posted May 24, 2013 03:46 AM

    pankaj_navlekar wrote:

    So not sure what is going wrong here.
    That block is one of the few that you are not "catching" exceptions for... perhaps you could wrap that in a catch and dump the exception-output somewhere you can read?

    Alternatively dump the values of all the variables that you "think" you are using at that stage out somewhere you can read?

    (Obviously there is nothing fundamentally wrong with your script/SQL since it was all working before; you need to be doing some low-level debugging to spot the problem I think)


  • 7.  RE: BPM-0704: An error occurred while executing custom script

    Posted May 26, 2013 11:18 PM
    Thanks Dave, Yeah have been trying to do that over Friday last week. Finally got the exception message at least.

    So, I put a catch block around the <soap:invoke> part and printed the v_results. Here is the error message that we are getting.

    [color=#f40909]org.apache.commons.jelly.JellyTagException: null:119:83: <soap:invoke> Failed to send a SOAP message generated to 'http://clarity_server/niku/xog'.HTTP Error: Status-Code: 302: Found[color]

    I can surely see there is some issue making SOAP calls.

    Also, now that we have got the error message right, I was able to get another related article. See this

    16507927

    Your comments are welcome.


  • 8.  RE: BPM-0704: An error occurred while executing custom script

    Posted May 30, 2013 06:08 AM
    hi pankaj,

    It seems that there is problem with your xog url.
    Please check that the XOG url is correct and also cross check the credentials.


  • 9.  RE: BPM-0704: An error occurred while executing custom script

    Posted Jun 03, 2013 01:32 AM
    Hi,

    I printed the XOG url in the gel logs. It's correct. I guess I have found something now. My issue is closely related to this one although we have not yet been able to find a solution.

    Any other suggestions are most welcome.

    16507927


  • 10.  RE: BPM-0704: An error occurred while executing custom script

    Posted Oct 31, 2013 10:33 PM

    I believe we may be experiencing the same issue after upgrading from 12.1 to 13.2.

    Any resoultion found yet?



  • 11.  RE: BPM-0704: An error occurred while executing custom script

    Posted Nov 01, 2013 05:11 AM
    ryan.erlandsen:

    I believe we may be experiencing the same issue after upgrading from 12.1 to 13.2.

    Any resoultion found yet?


    The "same issue" being "BPM-0704: An error occurred while executing custom script"? - unfortunately the cause of that message could be almost anything (so any solution "found" in this thread is probably not likely to be your solution).

    I would suggest starting a new thread with some more detail - error output from log files, output from the process log messages (in the application), description of what your process is doing (and how - is it just Clarity actions or GEL scripts - if its GEL scripts then the code that is "failing" would be useful).



  • 12.  RE: BPM-0704: An error occurred while executing custom script

    Posted Nov 04, 2013 01:13 AM

    Hi Dave,

    The reson i chose not to start a new topic is becuase the circumstances of this issue almost directly relate to mine. I thought i'd have a better chance of a response from the team already involved in this issue, rather than posing it to the general masses.

    Like Pankaj, we have a GEL script that calls SOAP to XOG into Clarity. This script was working without fail in 12.1, but now we only receive the BPM-0704 error in 13.2. Our script prints to the gel:log and gel:out any caught errors and debugging comments. However, now in v13.2, no debugging logs or errors are being produced, like Pankaj, including those before the SOAP operation.

    I'm happy to add logs etc but I thought i'd start to see if Pankaj has had any luck with this issue yet.

    Thanks,

    Ryan



  • 13.  RE: BPM-0704: An error occurred while executing custom script

    Posted Nov 04, 2013 05:12 AM

    OK fair enough!

    I think your impression that there might be a "team" looking at this is a little mis-guided - the original thread petered out a few months ago... smiley

    If I were facing this problem I would try to work out what was really going on - you say that you are getting no log files ; I would be testing that first - do any other GEL processes produce log files? (build a simple trivial one that ONLY writes to the log and doesn't try to do any XOG stuff). 

    If your trivial GEL script also produces no output then you need to work out why (get CA Support involved too with that simple GEL case).  Once that is resolved then go back to your original problem GEL script and see what log detail it is now reporting.

    If your trivial GEL script did produce output then I suspect it gets more tricky to debug, you'd perhaps need to be stripping out bits of your original GEL script until it stops "failing" and then you have something specific to test.

    Good luck!

     



  • 14.  RE: BPM-0704: An error occurred while executing custom script

    Posted Nov 04, 2013 05:06 PM

    Yeah, the team I refer to would be anyone who has replied to this thread and are now receiving a barage of new emails wink. So while not actively working on this issue, the 'team' may have some insight  that is helpful.

    I have tried this script in various forms including stripping out all of the XOG procedures, and can get the script to do something (ie print to the logs and alter a value in the database) once the SOAP calls are removed. In addition, all other scripts I have tested in v13 so far work as expected (including printing to logs). So this is leading me to the SOAP call being the issue, but for some reason is failing in a first pass over the script before it starts writing to logs.

    Seeing as though we upgraded java from 1.6 to 1.7 as part of the Clarity upgrade, there may be some certificate issue with the new version of java that is preventing the code from proceeding. I'm still hunting around and will keep posting any findings.

    Cheers.



  • 15.  RE: BPM-0704: An error occurred while executing custom script
    Best Answer

    Posted Nov 13, 2013 06:00 PM

    Hi guys,

    As an FYI, we have now been able to get this GEL script working. We worked out that during the upgrade of java and Clarity, a number of java libraries were removed (possibly anything not out-ofthe box). All we needed to do was conduct and audit of the jar files in the <clarity_home>\lib directory between the new and old versions and copy any missing libraries into the new.

    David, thanks for your suggestions. I hope this helps anyone else who gets random java errors after an upgrade.

    Cheers,

    Ryan



  • 16.  Moving to XOG/WSDL/GEL Board

     
    Posted May 24, 2013 10:54 AM
    Moving to XOG/WSDL/GEL Board