Clarity

Expand all | Collapse all

Processes - simultaneous runs

  • 1.  Processes - simultaneous runs

    Posted 07-24-2014 04:46 PM

    Hello All,

     

    Has anybody seen issues with instances of a Process that spawn off at the same time ? This is what's happening in our case. There are few processes which spawn off on object update based on certain criteria as process start condition. When the user sets attribute values using list view edit, n number of instances spawn off and then some instances fail others complete. Sometimes, they don't show consistent values in the process logs too! We have seen this for more than 3 instances running at the same time. Is there a potential concurrency issue in play here ?

     

    Regards,

    AK



  • 2.  Re: Processes - simultaneous runs

    Posted 09-16-2014 03:40 PM

    Finally, CA Support was able to reproduce this issue and it's a defect - CLRT-75753

     

    Regards,

    AK



  • 3.  Re: Processes - simultaneous runs

    Posted 10-05-2014 06:16 PM

    I have seen this and reported it from at least 3 different client sites and have always been blown off by support because they can't reproduce it.

    Glad to see they have finally acknowledged it is a defect!!



  • 4.  Re: Processes - simultaneous runs

    Posted 07-24-2014 05:07 PM

    What do you see in the logs ? Have you checked with support on this ?

     

    NJ



  • 5.  Re: Processes - simultaneous runs

    Posted 05-11-2015 06:13 AM

    Hi AK,

     

    Can you give me more details on this defect CLRT-75753 ? A link to the defect page will be ideal. Is this fixed? If so, in which version of Clarity?

     

    I searched CA communities and support site with this defect ID. Got absolutely nothing

     

    Regards,

    Georgy



  • 6.  Re: Processes - simultaneous runs

    Posted 07-24-2014 05:17 PM

    In the process instance that failed , I saw this

     

    org.apache.commons.jelly.JellyTagException: null:48:77: <gel:persist> com.niku.bpm.BpmException: callPMD - Cannot execute statement: bpm.updateCustomScriptProperty_set
    at com.niku.union.gel.tags.PersistTag.doTag(PersistTag.java:99)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
    at com.niku.union.gel.tags.ScriptTag.doTag(ScriptTag.java:20)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
    at com.niku.union.gel.GELScript.run(GELScript.java:48)
    at com.niku.union.gel.GELController.invoke(GELController.java:74)
    at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:207)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
    Caused by: com.niku.union.bpm.CustomScriptException: com.niku.bpm.BpmException: callPMD - Cannot execute statement: bpm.updateCustomScriptProperty_set
    at com.niku.bpm.customaction.CustomScriptPropertyControllerImpl.persistProperty(CustomScriptPropertyControllerImpl.java:270)
    at com.niku.union.gel.tags.PersistTag.doTag(PersistTag.java:95)
    ... 11 more
    Caused by: com.niku.bpm.BpmException: callPMD - Cannot execute statement: bpm.updateCustomScriptProperty_set
    at com.niku.bpm.customaction.persistence.CustomActionPersistenceUtils.callPMD(CustomActionPersistenceUtils.java:677)
    at com.niku.bpm.customaction.CustomScriptPropertyControllerImpl.persistProperty(CustomScriptPropertyControllerImpl.java:252)
    ... 12 more
    Caused by: com.niku.union.persistence.PersistenceException:
    SQL error code: 0
    Error message: [CA Clarity][Oracle JDBC Driver]Object has been closed.
    Executed:
    UPDATE bpm_custom_script_props
          SET   property_value =?,
                LAST_UPDATED_DATE =?,
              LAST_UPDATED_BY =?
           WHERE process_id = ?
           AND process_version_id = ?
              AND property_name = ?
              AND scope_type = ?
    Derived from statement:
    <?xml version="1.0" encoding="UTF-8"?>
    <statement batchable="true" sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" inputSource="map" xmlns="http://schemas.niku.com/2002/pmd">
      <sql dbVendor="all">
        <text>
          UPDATE bpm_custom_script_props
          SET   property_value =?,
                LAST_UPDATED_DATE =?,
              LAST_UPDATED_BY =?
           WHERE process_id = ?
           AND process_version_id = ?
              AND property_name = ?
              AND scope_type = ?
            </text>
        <param name="property_value" type="string" direction="IN" expressionListDelimiter=","/>
        <param replace="timestamp" direction="IN" expressionListDelimiter=","/>
        <param replace="userId" direction="IN" expressionListDelimiter=","/>
        <param name="process_id" type="long" direction="IN" expressionListDelimiter=","/>
        <param name="process_version_id" type="long" direction="IN" expressionListDelimiter=","/>
        <param name="property_name" type="string" direction="IN" expressionListDelimiter=","/>
        <param name="scope_type" type="string" direction="IN" expressionListDelimiter=","/>
      </sql>
    </statement>

    Referenced by:
    <?xml version="1.0" encoding="UTF-8"?>
    <statementRef id="bpm.updateCustomScriptProperty_set_nested_0" inputSource="map" inputMapIndex="0" sortColumnPath="/data/header/sortInfo/@sortColumn" sortDirectionPath="/data/header/sortInfo/@sortDirection" slicePath="/data/header/pagination/sliceInfo/@slice" sliceSizePath="/data/header/pagination/sliceInfo/@sliceSize" defaultSliceSize="20" ignoreIfError="false" hideResultSets="false" xmlns="http://schemas.niku.com/2002/pmd"/>

    Using input:
    {property_value=6858101, process_id=5113657, process_version_id=6858101, prope...

     

     

    CA support does not let choose CA Clarity PPM under list of products , so I cannot open CA support ticket.

     

    Regards,

    AK



  • 7.  Re: Processes - simultaneous runs

    Posted 07-24-2014 05:16 PM

    Have you done a check for the process orphans ?

     

    select count(*) from bpm_run_processes where process_version_id not in (select id from bpm_def_process_versions)

     

    To delete

     

    delete from bpm_run_processes where process_version_id not in (select id from bpm_def_process_versions)

     

    NJ



  • 8.  Re: Processes - simultaneous runs

    Posted 07-24-2014 05:27 PM

    Its zero. So no orphan process instances.

     

    Regards,

    AK



  • 9.  Re: Processes - simultaneous runs

    Posted 05-11-2015 02:13 PM

    It is currently described as follows:

     

    CLRT-75753 Intermittent Bpm Error not capturing the session information or some other required variable attributes causing a SOAP failure

     

    Description:
    A user-defined BPM process is triggered on record update action. Users will have a list of records showing on the list view and will update multiple records at one time. When multiple records are updated in this manner, some of the processes will execute as expected and sometimes, intermittently, the process will encounter an error, not capturing the session information or some other required variable attributes causing a SOAP failure.

     

    Steps to Reproduce:
    1. Xog in the object concurrency_object_write.xml
    2. On the Concurrency Object list view add the field 'Boolean Check'
    2. Xog in the process Process_Concurrency_test_write.xml
    3. Validate and Activate the process
    4. Create several instances of the Concurrency Object (at least six at a a time)
    5. Using in-line editing change the Boolean field from 'No' to 'Yes' (see ConcurrencyObjectList.jpg)
    6. Save in list view

     

    Expected Result: All instances initiated have sessionID, myObjectId and myProcessId 
    Actual Result: Some instances will have NO sessionID, myObjectId and myProcessId

     

     

    It was first reported against version Clarity 13.3.0 and has been reproduced on higher versions too; at the time of writing the defect is in an open state and not fixed in any version.

     

    The concurrency_object_write.xml just created a custom object 'concreator' with Boolean attribute 'bcheck' and string attribute 'tr'.

     

    The process_concurrency_test_write.xml file contained a process with this start condition: concreator.bcheck == 1 &&  concreator.bcheck != concreator.bcheck__oldValue

     

    It also contains a gel script but that script is using some unsupported calls through <core:new> and <core:invokeStatic> to try and generate additional sessions - I'm not sure how relevant the script is to the ability to reproduce the defect, as it appears to affect unrelated variable values in the script too.  The main essence seems to be the persisting of variables in one script, and retrieving them from a second step and script, and examining the values produced.

     

    Hope that helps.



  • 10.  Re: Processes - simultaneous runs

    Posted 07-24-2014 05:37 PM

    And what did you see in the bg logs ?


    "Error message: [CA Clarity][Oracle JDBC Driver]Object has been closed." suggests db connection issue


    NJ



  • 11.  Re: Processes - simultaneous runs

    Posted 07-24-2014 05:44 PM

    Also, have you enabled "Do not start a new process if one is already running " ?

     

    NJ



  • 12.  Re: Processes - simultaneous runs

    Posted 07-24-2014 05:50 PM

    Good point.



  • 13.  Re: Processes - simultaneous runs

    Posted 05-12-2015 02:10 AM

    Hi Nick,

     

    Thanks a lot for providing the details

     

    Regards,

    Georgy



  • 14.  Re: Processes - simultaneous runs

    Posted 05-12-2015 02:34 AM

    Thanks for sharing this, Nick

     

    Regards

    NJ



  • 15.  Re: Processes - simultaneous runs

    Posted 07-24-2014 05:51 PM

    Yes. That doesn't matter. With or without that checkbox, I have seen inconsistent process errors. First we found it in process using INSTANCE scope variables.