IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 20 replies
  • Latest Post - ‏2013-01-30T12:31:25Z by SystemAdmin
PoulomiGupta
PoulomiGupta
102 Posts

Pinned topic Workflow issue.

‏2013-01-28T08:57:40Z |
Hi,

I have executed one report which actually releases items from last step of a work flow.But some how the items are not getting released.The code is as follows


var colAreaName         =     
"Non-media BV Reclassification"; var npiObject           =     getColAreaByName(
"Non-media BV Reclassification"); var sStepName   =  
"SUCCESS"; var oEntrySet     =     npiObject.getEntriesInStep(sStepName); var aEntrySteps   =     []; var oEntry; var iItemID; var iCounter      =     0; forEachEntrySetElement(oEntrySet, oEntry) 
{ 

if(

null != oEntry) 
{ iCounter++; aEntrySteps =     npiObject.getStepsForEntry(oEntry); iItemID                           =                oEntry.getPrimaryKey(); 

if(aEntrySteps.containsValue(sStepName)) 
{ npiObject.releaseEntryInStep(oEntry,sStepName); npiObject.reserveEntryInStep(oEntry,sStepName); out.writeln(iItemID+
"|"+sStepName+
"|"); npiObject.moveEntryToNextStep(oEntry,sStepName,
"SUCCESS"); 
} 
} 
}

PFA the workflow diagram.

After execution of the report below logs gets updated.

under /opt/IBM/wpc/WPC/logs/workflowengine_sdc-pimApp1-dev2 .

Workflow.log

CheckinEvent CollaborationArea=Non-media BV Reclassification Source StepAtPath: SUCCESS(/412.840) Destination StepAtPath: null EntrySet size=1, Exception:Generic ErrorGeneric Error at com.ibm.ccd.workflow.common.events.CheckinEvent.process(CheckinEvent.java:81) at com.ibm.ccd.workflow.common.WorkflowRunnable.processNonStepScriptEventInTX(WorkflowRunnable.java:382) at com.ibm.ccd.workflow.common.WorkflowRunnable.processWorkflowEventDbRecord(WorkflowRunnable.java:149) at com.ibm.ccd.workflow.common.WorkflowRunnable.run(WorkflowRunnable.java:89) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732) at java.lang.Thread.run(Thread.java:534)Caused by: Generic Error at com.ibm.ccd.workflow.common.events.CheckinEvent.checkInEntries(CheckinEvent.java:457) at com.ibm.ccd.workflow.common.events.CheckinEvent.process(CheckinEvent.java:74) ... 5 moreCaused by: Generic Error at com.ibm.ccd.content.common.Item.toDB(Item.java:1890) at com.ibm.ccd.content.common.Item.toDB(Item.java:1788) at com.ibm.ccd.workflow.common.events.CheckinEvent.checkInEntries(CheckinEvent.java:204) ... 6 moreCaused by: java.lang.NullPointerException at com.ibm.ccd.element.common.EntryPopulator.populateEntryNodesFor(EntryPopulator.java:295) at com.ibm.ccd.element.common.EntryPopulator.populateEntry(EntryPopulator.java:169) at com.ibm.ccd.content.common.Item.prepareSave(Item.java:1991) at com.ibm.ccd.content.common.Item.toDB(Item.java:1864) ... 8 more (Logger.java:109)

exception.log
2013-01-22 09:04:01,653 WorkflowEventProcessorEventId21715997 ERROR com.ibm.ccd.common.error.AustinException - Generic Error, Exception:Generic Error at com.ibm.ccd.workflow.common.events.CheckinEvent.checkInEntries(CheckinEvent.java:457) at com.ibm.ccd.workflow.common.events.CheckinEvent.process(CheckinEvent.java:74) at com.ibm.ccd.workflow.common.WorkflowRunnable.processNonStepScriptEventInTX(WorkflowRunnable.java:382) at com.ibm.ccd.workflow.common.WorkflowRunnable.processWorkflowEventDbRecord(WorkflowRunnable.java:149) at com.ibm.ccd.workflow.common.WorkflowRunnable.run(WorkflowRunnable.java:89) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732) at java.lang.Thread.run(Thread.java:534)Caused by: Generic Error at com.ibm.ccd.content.common.Item.toDB(Item.java:1890) at com.ibm.ccd.content.common.Item.toDB(Item.java:1788) at com.ibm.ccd.workflow.common.events.CheckinEvent.checkInEntries(CheckinEvent.java:204) ... 6 moreCaused by: java.lang.NullPointerException at com.ibm.ccd.element.common.EntryPopulator.populateEntryNodesFor(EntryPopulator.java:295) at com.ibm.ccd.element.common.EntryPopulator.populateEntry(EntryPopulator.java:169) at com.ibm.ccd.content.common.Item.prepareSave(Item.java:1991) at com.ibm.ccd.content.common.Item.toDB(Item.java:1864) ... 8 more
Please tell me whats goig wrong?

Thanks
Poulomi
Updated on 2013-01-30T12:31:25Z at 2013-01-30T12:31:25Z by SystemAdmin
  • babinag
    babinag
    91 Posts

    Re: Workflow issue.

    ‏2013-01-28T09:07:20Z  
    Hi, PoulomiGupta.

    Can you tell, why you are trying to perform release/reserve operations on auto step, named SUCCESS? The only suitable operation within this step is moveEntryToNextStep(...).

    Check this.
  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: Workflow issue.

    ‏2013-01-28T09:29:05Z  
    Hi,
    Thanks a lot for your reply.

    I will try with only

    {Code} npiObject.moveEntryToNextStep(oEntry,sStepName,"SUCCESS");{Code}

    and will let you know the result.

    I am new in workflow that is why these things are new to me. One more question,
    why we do following things while moving an entry to next step

    releaseEntryInStep()
    Then again reserveEntryInStep()
    then moveEntryToNextStep()

    Thanks
    Poulomi.
  • babinag
    babinag
    91 Posts

    Re: Workflow issue.

    ‏2013-01-28T10:29:09Z  
    Hi,
    Thanks a lot for your reply.

    I will try with only

    {Code} npiObject.moveEntryToNextStep(oEntry,sStepName,"SUCCESS");{Code}

    and will let you know the result.

    I am new in workflow that is why these things are new to me. One more question,
    why we do following things while moving an entry to next step

    releaseEntryInStep()
    Then again reserveEntryInStep()
    then moveEntryToNextStep()

    Thanks
    Poulomi.
    General "workflow step" have option, named "Reserve to Edit". This means, that any user, even an admin, needs to reserve that item for performing any operations, e.g. editing attributes, moving item to another step.

    If you are an admin, and want to do operations, mentioned above, on "general" step with enabled "Reserve to Edit" option, you have to:
    1. Unreserve (release) item by executing releaseEntryInStep(...) operation or
    
    com.ibm.pim.collaboration.CollaborationStep 
    
    boolean release(CollaborationObject reservedObject)
    

    This is a defensive operation, if item is reserved by any other user, you wil can not perform operations on that item.
    2. Reserve item by executing reserveEntryInStep(...) operation or
    
    com.ibm.pim.collaboration.CollaborationStep 
    
    boolean reserve(CollaborationObject object)
    

    At this point, item will be reserved by current user, that performs reservation, and this will allow moveEntryToNextStep(...) operation or corresponding ItemCollaborationArea method
    
    
    
    boolean moveToNextStep(CollaborationItem item,CollaborationStep currentStep,java.lang.String exitValue)
    
  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: Workflow issue.

    ‏2013-01-28T11:50:36Z  
    Thank You so Much... I will update you soon regarding my issue.
  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: Workflow issue.

    ‏2013-01-29T07:26:20Z  
    Hi,
    I have executed my script posted previously without releaseEntryInStep() and reserveEntryInStep() ,only moveEntryToNextStep() was there but still facing same issue.
    in workflow.log i am getting Exception like

    CheckinEvent[
    CollaborationArea=Non-media BV Reclassification
    Source StepAtPath:
    SUCCESS(/412.840)
    Destination StepAtPath: null
    EntrySet size=1
    ]

    Exception:Generic Error
    Generic Error
    at com.ibm.ccd.workflow.common.events.CheckinEvent.process(CheckinEvent.java:81)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.processNonStepScriptEventInTX(WorkflowRunnable.java:382)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.processWorkflowEventDbRecord(WorkflowRunnable.java:149)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.run(WorkflowRunnable.java:89)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: Generic Error
    at com.ibm.ccd.workflow.common.events.CheckinEvent.checkInEntries(CheckinEvent.java:457)
    at com.ibm.ccd.workflow.common.events.CheckinEvent.process(CheckinEvent.java:74)
    ... 5 more
    Caused by: Generic Error
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1890)
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1788)
    at com.ibm.ccd.workflow.common.events.CheckinEvent.checkInEntries(CheckinEvent.java:204)
    ... 6 more
    Caused by: java.lang.NullPointerException
    at com.ibm.ccd.element.common.EntryPopulator.populateEntryNodesFor(EntryPopulator.java:295)
    at com.ibm.ccd.element.common.EntryPopulator.populateEntry(EntryPopulator.java:169)
    at com.ibm.ccd.content.common.Item.prepareSave(Item.java:1991)
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1864)
    ... 8 more
    (Logger.java:109)
    ERROR 2013-01-28 22:13:04,773 Critical Exception caught in checkInEntries, Exception:Generic Error
    Generic Error
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1890)
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1788)
    at com.ibm.ccd.workflow.common.events.CheckinEvent.checkInEntries(CheckinEvent.java:204)
    at com.ibm.ccd.workflow.common.events.CheckinEvent.process(CheckinEvent.java:74)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.processNonStepScriptEventInTX(WorkflowRunnable.java:382)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.processWorkflowEventDbRecord(WorkflowRunnable.java:149)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.run(WorkflowRunnable.java:89)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.NullPointerException
    at com.ibm.ccd.element.common.EntryPopulator.populateEntryNodesFor(EntryPopulator.java:295)
    at com.ibm.ccd.element.common.EntryPopulator.populateEntry(EntryPopulator.java:169)
    at com.ibm.ccd.content.common.Item.prepareSave(Item.java:1991)
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1864)
    ... 8 more
    (Logger.java:109)
    ERROR 2013-01-28 22:13:04,782 Exception in CheckinEvent event handler=Generic Error (Logger.java:122)
    ERROR 2013-01-28 22:13:04,791 Failed to handle event
    may be this is the root cause of the issue..can you tell me what's going wrong?
    Screent shot of the workflow given in my first mail.
    Thanks
    Poulomi
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Workflow issue.

    ‏2013-01-29T07:42:51Z  
    Hi,
    I have executed my script posted previously without releaseEntryInStep() and reserveEntryInStep() ,only moveEntryToNextStep() was there but still facing same issue.
    in workflow.log i am getting Exception like

    CheckinEvent[
    CollaborationArea=Non-media BV Reclassification
    Source StepAtPath:
    SUCCESS(/412.840)
    Destination StepAtPath: null
    EntrySet size=1
    ]

    Exception:Generic Error
    Generic Error
    at com.ibm.ccd.workflow.common.events.CheckinEvent.process(CheckinEvent.java:81)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.processNonStepScriptEventInTX(WorkflowRunnable.java:382)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.processWorkflowEventDbRecord(WorkflowRunnable.java:149)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.run(WorkflowRunnable.java:89)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: Generic Error
    at com.ibm.ccd.workflow.common.events.CheckinEvent.checkInEntries(CheckinEvent.java:457)
    at com.ibm.ccd.workflow.common.events.CheckinEvent.process(CheckinEvent.java:74)
    ... 5 more
    Caused by: Generic Error
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1890)
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1788)
    at com.ibm.ccd.workflow.common.events.CheckinEvent.checkInEntries(CheckinEvent.java:204)
    ... 6 more
    Caused by: java.lang.NullPointerException
    at com.ibm.ccd.element.common.EntryPopulator.populateEntryNodesFor(EntryPopulator.java:295)
    at com.ibm.ccd.element.common.EntryPopulator.populateEntry(EntryPopulator.java:169)
    at com.ibm.ccd.content.common.Item.prepareSave(Item.java:1991)
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1864)
    ... 8 more
    (Logger.java:109)
    ERROR 2013-01-28 22:13:04,773 Critical Exception caught in checkInEntries, Exception:Generic Error
    Generic Error
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1890)
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1788)
    at com.ibm.ccd.workflow.common.events.CheckinEvent.checkInEntries(CheckinEvent.java:204)
    at com.ibm.ccd.workflow.common.events.CheckinEvent.process(CheckinEvent.java:74)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.processNonStepScriptEventInTX(WorkflowRunnable.java:382)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.processWorkflowEventDbRecord(WorkflowRunnable.java:149)
    at com.ibm.ccd.workflow.common.WorkflowRunnable.run(WorkflowRunnable.java:89)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.NullPointerException
    at com.ibm.ccd.element.common.EntryPopulator.populateEntryNodesFor(EntryPopulator.java:295)
    at com.ibm.ccd.element.common.EntryPopulator.populateEntry(EntryPopulator.java:169)
    at com.ibm.ccd.content.common.Item.prepareSave(Item.java:1991)
    at com.ibm.ccd.content.common.Item.toDB(Item.java:1864)
    ... 8 more
    (Logger.java:109)
    ERROR 2013-01-28 22:13:04,782 Exception in CheckinEvent event handler=Generic Error (Logger.java:122)
    ERROR 2013-01-28 22:13:04,791 Failed to handle event
    may be this is the root cause of the issue..can you tell me what's going wrong?
    Screent shot of the workflow given in my first mail.
    Thanks
    Poulomi
    Hi,

    try to move one item manually from the Success step and look if there are exceptions in logs (check logs of all services). I think the issue is at a database level. Or you will see an error message in GUI.
  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: Workflow issue.

    ‏2013-01-29T08:16:16Z  
    Hi,

    try to move one item manually from the Success step and look if there are exceptions in logs (check logs of all services). I think the issue is at a database level. Or you will see an error message in GUI.
    Hi,

    I have tried to move one item manually from the Success step and db.log gets updated .exception is

    2013-01-29 00:14:04,232 wfl_root DEBUG com.ibm.ccd.common.db.DbConnectionBroker - Freed connection 23438274
    2013-01-29 00:14:04,235 wfl_completion INFO com.ibm.ccd.common.db.DbConnectionBroker - Handing out connection 26697745
    2013-01-29 00:14:04,262 wfl_completion DEBUG com.ibm.ccd.common.db.Query - Time: (26 ms)
    Static Query name: GEN_WFL_CAE_COLL_AREA_ENTRY_GETBYDEADLINE
    id: 1170
    SELECT *
    FROM twfl_cae_coll_area_entry
    WHERE cae_deadline <= TO_DATE('29-JAN-2013 00:14:04', 'DD-MON-RRRR HH24:MI:SS','NLS_DATE_LANGUAGE = AMERICAN')
    2013-01-29 00:14:04,263 wfl_completion INFO com.ibm.ccd.common.db.DbConnectionBroker - Handing out connection 26596606
    2013-01-29 00:14:04,266 wfl_completion DEBUG com.ibm.ccd.common.db.Query - Time: (3 ms)
    Static Query name: GET_CA_COMPLETED_STEP_JOBS
    id: 1687
    select distinct scc_company_id, scc_schedule_id, scc_status, scc_return_value, csj_ca_id, csj_step_path_id
    from csj, scc
    where csj_cmp_id = scc_company_id
    and csj_schedule_id = scc_schedule_id
    2013-01-29 00:14:04,267 wfl_completion DEBUG com.ibm.ccd.common.db.DbConnectionBroker - Freed connection 26596606
    2013-01-29 00:14:04,268 wfl_completion DEBUG com.ibm.ccd.common.db.DbConnectionBroker - Freed connection 26697745
    2013-01-29 00:14:05,232 wfl_root INFO com.ibm.ccd.common.db.DbConnectionBroker - Handing out connection 29056009
    2013-01-29 00:14:05,238 wfl_root DEBUG com.ibm.ccd.common.db.Query - Time: (5 ms)
    Static Query name: GET_NEXT_WORKFLOW_EVENT
    id: 1718
    select * from twfl_wfe_workflow_event
    where wfe_id =
    (select min(wfe_id) from twfl_wfe_workflow_event where wfe_event_status= 'NEW' )
    and wfe_event_status= 'NEW'
    2013-01-29 00:14:05,239 wfl_root DEBUG com.ibm.ccd.common.db.DbConnectionBroker - Freed connection 29056009
    2013-01-29 00:14:06,239 wfl_root INFO com.ibm.ccd.common.db.DbConnectionBroker - Handing out connection 30584859
    2013-01-29 00:14:06,245 wfl_root DEBUG com.ibm.ccd.common.db.Query - Time: (6 ms)
    Static Query name: GET_NEXT_WORKFLOW_EVENT
    id: 1718
    select * from twfl_wfe_workflow_event
    where wfe_id =
    (select min(wfe_id) from twfl_wfe_workflow_event where wfe_event_status= 'NEW' )
    and wfe_event_status= 'NEW'
    2013-01-29 00:14:06,246 wfl_root DEBUG com.ibm.ccd.common.db.DbConnectionBroker - Freed connection 30584859

    Can you tell me whats going wrong?

    Thanks
    Poulomi.
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Workflow issue.

    ‏2013-01-29T08:40:12Z  
    Hi,

    I have tried to move one item manually from the Success step and db.log gets updated .exception is

    2013-01-29 00:14:04,232 wfl_root DEBUG com.ibm.ccd.common.db.DbConnectionBroker - Freed connection 23438274
    2013-01-29 00:14:04,235 wfl_completion INFO com.ibm.ccd.common.db.DbConnectionBroker - Handing out connection 26697745
    2013-01-29 00:14:04,262 wfl_completion DEBUG com.ibm.ccd.common.db.Query - Time: (26 ms)
    Static Query name: GEN_WFL_CAE_COLL_AREA_ENTRY_GETBYDEADLINE
    id: 1170
    SELECT *
    FROM twfl_cae_coll_area_entry
    WHERE cae_deadline <= TO_DATE('29-JAN-2013 00:14:04', 'DD-MON-RRRR HH24:MI:SS','NLS_DATE_LANGUAGE = AMERICAN')
    2013-01-29 00:14:04,263 wfl_completion INFO com.ibm.ccd.common.db.DbConnectionBroker - Handing out connection 26596606
    2013-01-29 00:14:04,266 wfl_completion DEBUG com.ibm.ccd.common.db.Query - Time: (3 ms)
    Static Query name: GET_CA_COMPLETED_STEP_JOBS
    id: 1687
    select distinct scc_company_id, scc_schedule_id, scc_status, scc_return_value, csj_ca_id, csj_step_path_id
    from csj, scc
    where csj_cmp_id = scc_company_id
    and csj_schedule_id = scc_schedule_id
    2013-01-29 00:14:04,267 wfl_completion DEBUG com.ibm.ccd.common.db.DbConnectionBroker - Freed connection 26596606
    2013-01-29 00:14:04,268 wfl_completion DEBUG com.ibm.ccd.common.db.DbConnectionBroker - Freed connection 26697745
    2013-01-29 00:14:05,232 wfl_root INFO com.ibm.ccd.common.db.DbConnectionBroker - Handing out connection 29056009
    2013-01-29 00:14:05,238 wfl_root DEBUG com.ibm.ccd.common.db.Query - Time: (5 ms)
    Static Query name: GET_NEXT_WORKFLOW_EVENT
    id: 1718
    select * from twfl_wfe_workflow_event
    where wfe_id =
    (select min(wfe_id) from twfl_wfe_workflow_event where wfe_event_status= 'NEW' )
    and wfe_event_status= 'NEW'
    2013-01-29 00:14:05,239 wfl_root DEBUG com.ibm.ccd.common.db.DbConnectionBroker - Freed connection 29056009
    2013-01-29 00:14:06,239 wfl_root INFO com.ibm.ccd.common.db.DbConnectionBroker - Handing out connection 30584859
    2013-01-29 00:14:06,245 wfl_root DEBUG com.ibm.ccd.common.db.Query - Time: (6 ms)
    Static Query name: GET_NEXT_WORKFLOW_EVENT
    id: 1718
    select * from twfl_wfe_workflow_event
    where wfe_id =
    (select min(wfe_id) from twfl_wfe_workflow_event where wfe_event_status= 'NEW' )
    and wfe_event_status= 'NEW'
    2013-01-29 00:14:06,246 wfl_root DEBUG com.ibm.ccd.common.db.DbConnectionBroker - Freed connection 30584859

    Can you tell me whats going wrong?

    Thanks
    Poulomi.
    There is no an exception in log you provided. Look at exception.log file.
    Did the item move into the catalog or one stuck in the step?
  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: Workflow issue.

    ‏2013-01-29T08:49:27Z  
    There is no an exception in log you provided. Look at exception.log file.
    Did the item move into the catalog or one stuck in the step?
    I think item has moved to the catalog because in success step no item is there and at that time only DB log gets updated..My question is why through script the item did not moved to the catalog? whats wrong in the script?
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Workflow issue.

    ‏2013-01-29T08:54:03Z  
    I think item has moved to the catalog because in success step no item is there and at that time only DB log gets updated..My question is why through script the item did not moved to the catalog? whats wrong in the script?
    I think, it is better to think why items are sticking in the Success step.
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Workflow issue.

    ‏2013-01-29T09:13:28Z  
    I think item has moved to the catalog because in success step no item is there and at that time only DB log gets updated..My question is why through script the item did not moved to the catalog? whats wrong in the script?
    My suggestion:
    1) Change the name of the step to "Success"
    2) Examine a return value of moveEntryToNextStep()
  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: Workflow issue.

    ‏2013-01-29T10:23:00Z  
    My suggestion:
    1) Change the name of the step to "Success"
    2) Examine a return value of moveEntryToNextStep()
    Hi,

    I have tried with changed Step path as "Success" but getting nullpointer exception.
    Also aEntrySteps = npiObject.getStepsForEntry(oEntry); returning step name as "SUCCESS".

    But i did not get any step with "SUCCESS" name in workflow.Please see the attachment.

    npiObject.moveEntryToNextStep(oEntry,sStepName,"SUCCESS"); is returning blank hashmap.
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Workflow issue.

    ‏2013-01-29T10:46:30Z  
    Hi,

    I have tried with changed Step path as "Success" but getting nullpointer exception.
    Also aEntrySteps = npiObject.getStepsForEntry(oEntry); returning step name as "SUCCESS".

    But i did not get any step with "SUCCESS" name in workflow.Please see the attachment.

    npiObject.moveEntryToNextStep(oEntry,sStepName,"SUCCESS"); is returning blank hashmap.
    add catchError block to your code to see where exactly the exception rises
  • babinag
    babinag
    91 Posts

    Re: Workflow issue.

    ‏2013-01-29T10:54:29Z  
    Hi,

    I have tried with changed Step path as "Success" but getting nullpointer exception.
    Also aEntrySteps = npiObject.getStepsForEntry(oEntry); returning step name as "SUCCESS".

    But i did not get any step with "SUCCESS" name in workflow.Please see the attachment.

    npiObject.moveEntryToNextStep(oEntry,sStepName,"SUCCESS"); is returning blank hashmap.
    I think that if NPE occurs in script, there must be other log, where this exception logged.

    Maybe check this

    pim/logs/workflowengine

    default.log
    svc.err
  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: Workflow issue.

    ‏2013-01-29T11:28:32Z  
    • babinag
    • ‏2013-01-29T10:54:29Z
    I think that if NPE occurs in script, there must be other log, where this exception logged.

    Maybe check this

    pim/logs/workflowengine

    default.log
    svc.err
    Hi

    Details of the exception given below... and exception is occuring while executing

    forEachEntrySetElement(oEntrySet, oEntry)

    exception.log

    2013-01-29 03:13:39,889 sch_worker_0 ERROR com.ibm.ccd.common.error.AustinException JOB_ID:37204- Script execution failed (java.lang.NullPointerException) Exception:java.lang.NullPointerException
    at WPCAutomoveFromImageryStep13594580179980.run(WPCAutomoveFromImageryStep13594580179980.java:47)
    at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510)
    at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452)
    at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294)
    at com.ibm.ccd.report.common.Report.generate(Report.java:273)
    at com.ibm.ccd.report.common.ReportExe.execute(ReportExe.java:111)
    at com.ibm.ccd.scheduler.threads.SchedulerThread.fuzaoRun(SchedulerThread.java:270)
    at com.ibm.ccd.common.util.FuzaoRunnableAdapter.run(FuzaoRunnableAdapter.java:49)
    at com.ibm.ccd.common.util.FuzaoThread.run(FuzaoThread.java:100)
    , Exception:java.lang.NullPointerException
    at WPCAutomoveFromImageryStep13594580179980.run(WPCAutomoveFromImageryStep13594580179980.java:47)
    at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510)
    at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452)
    at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294)
    at com.ibm.ccd.report.common.Report.generate(Report.java:273)
    at com.ibm.ccd.report.common.ReportExe.execute(ReportExe.java:111)
    at com.ibm.ccd.scheduler.threads.SchedulerThread.fuzaoRun(SchedulerThread.java:270)
    at com.ibm.ccd.common.util.FuzaoRunnableAdapter.run(FuzaoRunnableAdapter.java:49)
    at com.ibm.ccd.common.util.FuzaoThread.run(FuzaoThread.java:100)

    custom_tool.log

    2013-01-29 03:13:12,921 ERROR JOB_ID:37217:: ItemTrackerStatusUpdate Report::_main --- Exception:java.lang.NullPointerException
    at com.ibm.ccd.search.ast.SearchDataSource.getItem(SearchDataSource.java:169)
    at com.ibm.ccd.search.query.SearchResultRow.getItem(SearchResultRow.java:150)
    at com.ibm.ccd.search.query.SearchResultSet.getItem(SearchResultSet.java:321)
    at com.ibm.ccd.common.interpreter.operation.generated.GenGetItemOperation.execute(GenGetItemOperation.java:69)
    at WPCItemTrackingCatalogStatusUpdate13594579899200.run(WPCItemTrackingCatalogStatusUpdate13594579899200.java:205)
    at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510)
    at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452)
    at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294)
    at com.ibm.ccd.report.common.Report.generate(Report.java:273)
    at com.ibm.ccd.report.common.ReportExe.execute(ReportExe.java:111)
    at com.ibm.ccd.scheduler.threads.SchedulerThread.fuzaoRun(SchedulerThread.java:270)
    at com.ibm.ccd.common.util.FuzaoRunnableAdapter.run(FuzaoRunnableAdapter.java:49)
    at com.ibm.ccd.common.util.FuzaoThread.run(FuzaoThread.java:100)
    svc.out

    Script execution failed (java.lang.NullPointerException) Exception:java.lang.NullPointerException
    at WPCAutomoveFromImageryStep13594580179980.run(WPCAutomoveFromImageryStep13594580179980.java:47)
    at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510)
    at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452)
    at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294)
    at com.ibm.ccd.report.common.Report.generate(Report.java:273)
    at com.ibm.ccd.report.common.ReportExe.execute(ReportExe.java:111)
    at com.ibm.ccd.scheduler.threads.SchedulerThread.fuzaoRun(SchedulerThread.java:270)
    at com.ibm.ccd.common.util.FuzaoRunnableAdapter.run(FuzaoRunnableAdapter.java:49)
    at com.ibm.ccd.common.util.FuzaoThread.run(FuzaoThread.java:100)

    at WPCAutomoveFromImageryStep13594580179980.run(WPCAutomoveFromImageryStep13594580179980.java:106)
    at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510)
    at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452)
    at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294)
    at com.ibm.ccd.report.common.Report.generate(Report.java:273)
    at com.ibm.ccd.report.common.ReportExe.execute(ReportExe.java:111)
    at com.ibm.ccd.scheduler.threads.SchedulerThread.fuzaoRun(SchedulerThread.java:270)
    at com.ibm.ccd.common.util.FuzaoRunnableAdapter.run(FuzaoRunnableAdapter.java:49)
    at com.ibm.ccd.common.util.FuzaoThread.run(FuzaoThread.java:100)
    Caused by: java.lang.NullPointerException
    at WPCAutomoveFromImageryStep13594580179980.run(WPCAutomoveFromImageryStep13594580179980.java:47)
    ... 8 more
    Tue Jan 29 03:13:45 PST 2013 - Looking for job..
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Workflow issue.

    ‏2013-01-29T11:41:25Z  
    Hi

    Details of the exception given below... and exception is occuring while executing

    forEachEntrySetElement(oEntrySet, oEntry)

    exception.log

    2013-01-29 03:13:39,889 sch_worker_0 ERROR com.ibm.ccd.common.error.AustinException JOB_ID:37204- Script execution failed (java.lang.NullPointerException) Exception:java.lang.NullPointerException
    at WPCAutomoveFromImageryStep13594580179980.run(WPCAutomoveFromImageryStep13594580179980.java:47)
    at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510)
    at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452)
    at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294)
    at com.ibm.ccd.report.common.Report.generate(Report.java:273)
    at com.ibm.ccd.report.common.ReportExe.execute(ReportExe.java:111)
    at com.ibm.ccd.scheduler.threads.SchedulerThread.fuzaoRun(SchedulerThread.java:270)
    at com.ibm.ccd.common.util.FuzaoRunnableAdapter.run(FuzaoRunnableAdapter.java:49)
    at com.ibm.ccd.common.util.FuzaoThread.run(FuzaoThread.java:100)
    , Exception:java.lang.NullPointerException
    at WPCAutomoveFromImageryStep13594580179980.run(WPCAutomoveFromImageryStep13594580179980.java:47)
    at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510)
    at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452)
    at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294)
    at com.ibm.ccd.report.common.Report.generate(Report.java:273)
    at com.ibm.ccd.report.common.ReportExe.execute(ReportExe.java:111)
    at com.ibm.ccd.scheduler.threads.SchedulerThread.fuzaoRun(SchedulerThread.java:270)
    at com.ibm.ccd.common.util.FuzaoRunnableAdapter.run(FuzaoRunnableAdapter.java:49)
    at com.ibm.ccd.common.util.FuzaoThread.run(FuzaoThread.java:100)

    custom_tool.log

    2013-01-29 03:13:12,921 ERROR JOB_ID:37217:: ItemTrackerStatusUpdate Report::_main --- Exception:java.lang.NullPointerException
    at com.ibm.ccd.search.ast.SearchDataSource.getItem(SearchDataSource.java:169)
    at com.ibm.ccd.search.query.SearchResultRow.getItem(SearchResultRow.java:150)
    at com.ibm.ccd.search.query.SearchResultSet.getItem(SearchResultSet.java:321)
    at com.ibm.ccd.common.interpreter.operation.generated.GenGetItemOperation.execute(GenGetItemOperation.java:69)
    at WPCItemTrackingCatalogStatusUpdate13594579899200.run(WPCItemTrackingCatalogStatusUpdate13594579899200.java:205)
    at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510)
    at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452)
    at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294)
    at com.ibm.ccd.report.common.Report.generate(Report.java:273)
    at com.ibm.ccd.report.common.ReportExe.execute(ReportExe.java:111)
    at com.ibm.ccd.scheduler.threads.SchedulerThread.fuzaoRun(SchedulerThread.java:270)
    at com.ibm.ccd.common.util.FuzaoRunnableAdapter.run(FuzaoRunnableAdapter.java:49)
    at com.ibm.ccd.common.util.FuzaoThread.run(FuzaoThread.java:100)
    svc.out

    Script execution failed (java.lang.NullPointerException) Exception:java.lang.NullPointerException
    at WPCAutomoveFromImageryStep13594580179980.run(WPCAutomoveFromImageryStep13594580179980.java:47)
    at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510)
    at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452)
    at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294)
    at com.ibm.ccd.report.common.Report.generate(Report.java:273)
    at com.ibm.ccd.report.common.ReportExe.execute(ReportExe.java:111)
    at com.ibm.ccd.scheduler.threads.SchedulerThread.fuzaoRun(SchedulerThread.java:270)
    at com.ibm.ccd.common.util.FuzaoRunnableAdapter.run(FuzaoRunnableAdapter.java:49)
    at com.ibm.ccd.common.util.FuzaoThread.run(FuzaoThread.java:100)

    at WPCAutomoveFromImageryStep13594580179980.run(WPCAutomoveFromImageryStep13594580179980.java:106)
    at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510)
    at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452)
    at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294)
    at com.ibm.ccd.report.common.Report.generate(Report.java:273)
    at com.ibm.ccd.report.common.ReportExe.execute(ReportExe.java:111)
    at com.ibm.ccd.scheduler.threads.SchedulerThread.fuzaoRun(SchedulerThread.java:270)
    at com.ibm.ccd.common.util.FuzaoRunnableAdapter.run(FuzaoRunnableAdapter.java:49)
    at com.ibm.ccd.common.util.FuzaoThread.run(FuzaoThread.java:100)
    Caused by: java.lang.NullPointerException
    at WPCAutomoveFromImageryStep13594580179980.run(WPCAutomoveFromImageryStep13594580179980.java:47)
    ... 8 more
    Tue Jan 29 03:13:45 PST 2013 - Looking for job..
    1) please add catchError block to your code and write an exception message into out. Then give the content of report.out of your report
    2) What are WPCAutomoveFromImageryStep and WPCItemTrackingCatalogStatusUpdate modules?
    3) Provide a code around of line 47 in WPCAutomoveFromImageryStep13594580179980.java:47
    4) Provide a code around of line 205 in WPCItemTrackingCatalogStatusUpdate13594579899200.java
  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: Workflow issue.

    ‏2013-01-29T13:08:35Z  
    1) please add catchError block to your code and write an exception message into out. Then give the content of report.out of your report
    2) What are WPCAutomoveFromImageryStep and WPCItemTrackingCatalogStatusUpdate modules?
    3) Provide a code around of line 47 in WPCAutomoveFromImageryStep13594580179980.java:47
    4) Provide a code around of line 205 in WPCItemTrackingCatalogStatusUpdate13594579899200.java
    Report.out contains bwlow error

    err is Exception:java.lang.NullPointerException at WPCScriptSandboxPath13594646395990.run(WPCScriptSandboxPath13594646395990.java:53) at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510) at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452) at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294) at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:260) at administration.adm_script_sandbox._jspService(Unknown Source) at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:102) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:762) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3174) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:253) at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:229) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1970) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:114) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)

    I did not get any script as
    WPCAutomoveFromImageryStep.java
    WPCItemTrackingCatalogStatusUpdate.java

    In our project.
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Workflow issue.

    ‏2013-01-30T05:35:30Z  
    Report.out contains bwlow error

    err is Exception:java.lang.NullPointerException at WPCScriptSandboxPath13594646395990.run(WPCScriptSandboxPath13594646395990.java:53) at com.ibm.ccd.common.interpreter.engine.Script.runFunction(Script.java:510) at com.ibm.ccd.common.interpreter.engine.Script.execute(Script.java:452) at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:294) at com.ibm.ccd.common.interpreter.engine.Script.run(Script.java:260) at administration.adm_script_sandbox._jspService(Unknown Source) at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:102) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:762) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3174) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:253) at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:229) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1970) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:114) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)

    I did not get any script as
    WPCAutomoveFromImageryStep.java
    WPCItemTrackingCatalogStatusUpdate.java

    In our project.
    Ok. let start from begining
    1) Are you running the code in SandBox or as a job (report)?
    2) Are all items sticking in Success step? Under which conditions are items are sticking in the step?
    3) Clear all log files before running the code
  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: Workflow issue.

    ‏2013-01-30T10:45:07Z  
    Ok. let start from begining
    1) Are you running the code in SandBox or as a job (report)?
    2) Are all items sticking in Success step? Under which conditions are items are sticking in the step?
    3) Clear all log files before running the code
    We have written a script to release all the items from last step of a workflow.
    Step Name is : SUCCESS

    All items from the previous step (Approve B-V Group Reclass)are stucking in this last step.

    From Workflow.log ia m getting

    CheckinEvent CollaborationArea=Non-media BV Reclassification Source StepAtPath: SUCCESS(/412.840) Destination StepAtPath: null EntrySet size=1

    I think This is the Main reason of the Issue.

    PFA Workflow.jpg

    I ran the code in Sand box.
    Is it possible that the Workflow step is corrupted? Or the issue is for same step name and exit value?
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Workflow issue.

    ‏2013-01-30T12:31:25Z  
    We have written a script to release all the items from last step of a workflow.
    Step Name is : SUCCESS

    All items from the previous step (Approve B-V Group Reclass)are stucking in this last step.

    From Workflow.log ia m getting

    CheckinEvent CollaborationArea=Non-media BV Reclassification Source StepAtPath: SUCCESS(/412.840) Destination StepAtPath: null EntrySet size=1

    I think This is the Main reason of the Issue.

    PFA Workflow.jpg

    I ran the code in Sand box.
    Is it possible that the Workflow step is corrupted? Or the issue is for same step name and exit value?
    Well,

    As I see there are two problems:
    1) Items are sticking in Success step (what should not happen)
    2) The script issue

    To find issue in the script as I said before you need to add catchError block in your code as below
    
    var errMsg = 
    
    null; catchError(errMsg) 
    { 
    // your code here 
    } 
    
    if(errMsg != 
    
    null) 
    { out.writeln(errMsg); 
    }
    


    If an exception occur in your code you will see an error message in output of Sandbox
    Next check if there is a script for Success step. Also you can update workflow (maybe you right and there is a corruption in it), it could help.

    And clear the log files before running the script.