Clarity

Expand all | Collapse all

BPM-0546: Custom script has completed.

  • 1.  BPM-0546: Custom script has completed.

    Posted Sep 14, 2009 07:09 AM
    Hello expertsI have a process and the action for each step are Custom Scripts. Everything is running fine but in the screen "Initiated Processes" the process has a information message for each step. The message say:  BPM-0546: Custom script has completed.java.lang.Exception
    at com.niku.bpm.utilities.BpmErrors.setRuntimeMessage(BpmErrors.java:251)
    at com.niku.bpm.utilities.BusinessProcessUtilsImpl.setProcessInstanceMessage(BusinessProcessUtilsImpl.java:537)
    at com.niku.bpm.services.ExecuteCustomAction.actionCompleted(ExecuteCustomAction.java:316)
    at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:234)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
    at java.lang.Thread.run(Thread.java:595)   What's wrong with my process?[left]Why all the steps have this exception, no matter what the Custom Script have?


  • 2.  Re: BPM-0546: Custom script has completed.

    Posted Sep 14, 2009 08:32 AM
    Hi,     Can you please post the custom script what you have implemented in the process?    Thanks,Senthil


  • 3.  Re: BPM-0546: Custom script has completed.

    Posted Sep 14, 2009 09:02 AM
    Here is one of them    
       
     
     
     
     
     


  • 4.  Re: BPM-0546: Custom script has completed.

    Posted Sep 14, 2009 09:12 AM
    Hi,       Where you have mentioned XOG URL, XOG User name and XOG Password? I have some sample custom script which we have already implemented in our system. You will be get some idea about gel script.  When you use tag, No need to provide URL, User Name and password. System is automatically taken this iformation from process. just use this tag.    
        

     DELETE FROM ODF_MULTI_VALUED_LOOKUPS WHERE ATTRIBUTE='approver_name' AND PK_ID ='${gel_objectInstanceId}'
                  SELECT CASE WHEN SUBSTR(RES_COSTCENTER,1,2) IN ('MY','IN') THEN 0 ELSE 1 END   CST_VAL
       FROM ODF_CA_REQUISITION WHERE ID=${gel_objectInstanceId}  
                  ${CSTVAL.rows[0].CST_VAL}     
      update ODF_CA_REQUISITION
          SET STATUS_REQUISITION='await_domainhead',CST_VALIDATION='${CST_VAL}' WHERE ID='${gel_objectInstanceId}'
        
                  SELECT DOMAIN_HEAD DH_ID FROM ODF_CA_COSTCENTER_ERRF A,
                                          ODF_CA_REQUISITION B WHERE A.CST_CENTER=B.RES_COSTCENTER AND B.ID=${gel_objectInstanceId}
                  ${DOMAINHEAD.rows[0].DH_ID} 
     INSERT INTO ODF_MULTI_VALUED_LOOKUPS VALUES('requisition',${gel_objectInstanceId},'approver_name',0,${DH_ID})    ThanksSenthil.


  • 5.  Re: BPM-0546: Custom script has completed.

    Posted Sep 14, 2009 09:27 AM
    I use those parameters in other steps where I XOG-in and XOG-out objects, that's why I need it.I just sent you one of the scripts that is throwing the exception. Any idea why is doing that?


  • 6.  Re: BPM-0546: Custom script has completed.

    Posted Sep 14, 2009 11:53 AM
    Hi,  You can set the NSA-->logs-->Log viewer  to debug mode in NSA for process and re-produce the issue.Add this in NSA --Logs after doing that pls set it back to  Info or error  Mode otherwise Log size will grow like any thing.     com.niku.bpm - for process engine related stuff. In some older versions of the product (Clarity 7.5.3 certainly, if not also some newer releases), you need to also enable the JVM 'asserts' parameter on your bg and app as follows (including the '...' elipsis at the end) specifically and only for this category: -ea:com.niku...  If you don't enable this, check your logs after enabling it, and it will probably tell you if it needs this parameter or not anyway.  sundar


  • 7.  Re: BPM-0546: Custom script has completed.

    Posted Sep 16, 2009 04:48 AM
    SundarHow can I do that?What do I have to look for after change the log?  Ivan


  • 8.  Re: BPM-0546: Custom script has completed.

    Posted Sep 16, 2009 05:00 AM
    there are (or should be) KB articles on how to setup debug


  • 9.  Re: BPM-0546: Custom script has completed.

    Posted Sep 16, 2009 01:29 PM
    One of them is   Document ID :     TEC435611[left][left] Tech Document[left] Title:     Debugging in Clarity[left]
    Generally speaking, if you are getting an error and it's in a category code that isn't giving you enough detail, then log that category at a deeper level (ERROR -> INFO -> DEBUG).Timeslicing, for example, will fail in category code 'niku.blobcrack', so you can put INFO level logging on ' com.niku.blobcrack ' (add it in the 'Other Name' column then save, even though it's not in the default list), and try again to reproduce the problem after saving this config and restarting the services.Putting the same thing on 'com.niku' would give you too much data probably, as it will capture everything 'com.niku', 'com.niku.blobcrack' and so effectively 'com.niku.*'. This can be as detrimental as it can be beneficial, as you'll flood yourself with irrelevant data. Sometimes this is true even if you filter down to a single category on DEBUG, so try INFO first to see if it gives what you need.You may also need to adjust (by hand) the $NIKU_HOME/config/logger.xml file as 3x 5MB isn't enough to prevent the information you want from being flooded out too quickly. Re-deploy and restart the services following a direct change to the logger.xml (see http://wiki.apache.org/logging-log4j/Log4jXmlFormat for some info on the format and capability). com.niku.security - can give information related to login/logout problems, including ldap connectivity problems. com.niku.union.* - part of the app's inner engine, touches on a lot of the framework that holds the different technologies together: rarely needed when logging IMO though as failings tend to occur at the higher level (you'll almost always see references to com.niku.union in stack traces of error messages, but nearer the top of the function call stack, it usually moves into a more specific product area that you can focus on, in my experience). org.logicalcobwebs.proxool - is the 'connection pool' library we use for Orion/Tomcat app servers to both Oracle and SQL Server (proxool = "proxy pool", or how to implement a connection pool by proxy, so your code is written without needing to know that a pool exists). org.jgroups - used for multicasting. Consider using it if any reference to jgroups or multicast was mentioned to try and glean more data, though it would be guess work. com.niku.bpm - for process engine related stuff. In some older versions of the product (Clarity 7.5.3 certainly, if not also some newer releases), you need to also enable the JVM 'asserts' parameter on your bg and app as follows (including the '...' elipsis at the end) specifically and only for this category: -ea:com.niku...If you don't enable this, check your logs after enabling it, and it will probably tell you if it needs this parameter or not anyway. com.niku.njs - deserves a mention, this is for the 'background' jobs scheduler, if you experience problems in that area. com.niku.schedulers - this is for the server-side interactions with the OWB/MSP project scheduler apps and their area of functionalities.It is almost always suggested to add to the default config rather than change the existing lines/entries. You may want DEBUG detail on a specific category, but probably not at the cost of losing WARN detail level on 'com.niku' itself.  You go to NSA and Logs to Edit Configuration.Make a note what you already have.Click addSelect com.niku.bpmSet the level at what you need.  Martti K.[left][left][left][left]  [left]  


  • 10.  Re: BPM-0546: Custom script has completed.

    Posted Sep 17, 2009 07:38 AM
      |   view attached
    ThanksI did all your instructions but I can't understand the logs. I attached the log and the exception I'm geting for every step on my process.Please help me to read the log file.  

    Attachment(s)

    zip
    bg-niku.zip   469 KB 1 version


  • 11.  Re: BPM-0546: Custom script has completed.

    Posted Sep 17, 2009 09:33 AM
    Hi,                 You got the same error for all process which you have applied the same logic. Please create one test process and  create a simple custom script and check, if any error will come or not. if error came, some problem, in process,  to execute the custom script while running a process. if not, some problem in your custom script.    ThanksSenthil.


  • 12.  Re: BPM-0546: Custom script has completed.

    Posted Sep 17, 2009 11:15 AM
    That sounds like a good thing to do. Another thing to try is an OOTB process if there is one.Interpreting this log is outside my skill, too.  The entries are typically likeDEBUG 2009-09-17 11:24:54,306 [Pre Condition Pipeline 0] bpm.expr (process_admin:6661440__-2a37ec89:none) ----> Expression Evaluator out - Result: true
    DEBUG 2009-09-17 11:24:54,306 [Pre Condition Pipeline 0] bpm.engine (process_admin:6661440__-2a37ec89:none) ----> Adding Step Instance to ActionStepQueue: com.niku.bpm.engine.objects.StepInstance@15750e4 [Id: 5187023 Process Instance Id: 5081001 Step Id: 5000305 State: BPM_SIS_READY_TO_EXEC_ACTION Step Name: null Start Date: 2009-09-17 11:24:54.26 Expected End Date: null Percent Complete: 0.676471 Warned: false Retry Count: 0 No of Pre Conditions: 1 No of Post Conditions: -1 Last Condition Eval Time: 1253201094306 Pre Condition Wait Events: null Post Condition Wait Events: null Pass Conditions: null Error Id: -1
     Process Thread: com.niku.bpm.engine.objects.ProcessThread@a1373f [Id: 5081001 Parent Step Instance Id: -1 Join Step Instance Id: -1]
     Split Threads: null
     Join Threads:null]  There are no lines that start ERROR 2009-09-17 which would be easier to interpreteJust quessing it looks like the expression is evaluated OK.The specific process step is added to the queue ready for action, but then the nulls start coming. Only the start date is OK as if there was no step at all.  Is the process engine running with the bg or app  Martti K.


  • 13.  Re: BPM-0546: Custom script has completed.

    Posted Sep 17, 2009 01:14 PM
    Hi,  The process errors are stored in this table BPM_ERRORS.You pass the Process version id ,that is -1 .Pls check the output.This table will not be mentioned in the Tech Guide and how to know what column is meant for what.(Only they will mention in the Database Schema Changes).It is very strange why CA is Hiding this?       SELECT
                      e.ID,
                      e.PROCESS_VERSION_ID,
                      e.STEP_ID,
                      S.NAME as STEP_NAME,
                      e.STEP_ACTION_ID,
                      e.STEP_CONDITION_ID,
                      e.TYPE_CODE,
                      e.MESSAGE_CODE,
                      e.ATTRIBUTE1,
                      e.ATTRIBUTE2
                  FROM
                      BPM_ERRORS     e,
                    bpm_def_steps_v s
                  WHERE                        PROCESS_VERSION_ID = ?
                        e.STEP_ID = s.ID AND
                      s.LANGUAGE_CODE = 'en'
                 
                  UNION
                 
                  SELECT
                      ID,
                      PROCESS_VERSION_ID,
                      STEP_ID,
                      '-1' as STEP_NAME,
                      STEP_ACTION_ID,
                      STEP_CONDITION_ID,
                      TYPE_CODE,
                      MESSAGE_CODE,
                      ATTRIBUTE1,
                      ATTRIBUTE2
                  FROM
                      BPM_ERRORS
                  WHERE
                  PROCESS_VERSION_ID = ?        AND
                    (STEP_ID = -1)