Skip to Content
0
Former Member
Nov 16, 2009 at 09:51 AM

GP problem: gpActionInstance.getActualStartDate()

24 Views

Hi

We are developing a sign-off system (Java web application) and using SAP GP as our workflow engine.

(Java -> GP API -> GP) GP Version: SAP NetWeaver 7.0 SP14

One of the function in our system is to list all the unfinished Process Instance, Action Instance, WorkItems with Status(start date, end date...) in order to trace the progress of each Process Instance.

Of course, there are some filters as selection criteria, so we won't list all the Process Instance in GP.

Most of the time, this listing function works well.

However, errors occurred in the situations described below:

1. When we use this listing function and change the status of the workitem in the same time, some GP exceptions are thrown.

(For example: User A is using the listing function and User B is dealing with his/her workitems)

2. When we using this listing function frequently, some GP exceptions are thrown, too.

IGPActionInstance gpActionInstance 
        = rtm.getActionInstance(gpWorkItem.getProcessID(), gpWorkItem.getWorkitemID(), userContext); 
          //rtm is GP runtime Manager 

java.util.Date actualStartDate = gpActionInstance.getActualStartDate(); //<-- This line will cause exception.

The exception messages as following...

Caused by: com.sap.caf.eu.gp.base.exception.EngineException
at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.readActivityState(StatusWriter.java:634)
at com.sap.caf.eu.gp.model.pfw.wfc.local.impl.LocalWorkflowConnector.readActivityState(LocalWorkflowConnector.java:247)
at com.sap.caf.eu.gp.model.pfw.core.impl.ProcessRuntime.readActivityState(ProcessRuntime.java:879)
at com.sap.caf.eu.gp.process.rt.impl.GPRuntimeUtils.getActivityState(GPRuntimeUtils.java:195)
... 70 more


Caused by: java.lang.ClassCastException
at org.apache.xerces.parsers.DOMParser.<init>(DOMParser.java:153) 
at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:102)
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:88)
...
at com.sap.caf.eu.gp.model.structure.StructureFactory$StructurePersistence.readValue(StructureFactory.java:5646)
at com.sap.caf.eu.gp.model.structure.StructureFactory.readValue(StructureFactory.java:6962)
at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.readActivityState(StatusWriter.java:572)
... 73 more

Please suggests any solution for this problem.

Thanks,

wen