|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.ode.bpel.engine.BpelRuntimeContextImpl
public class BpelRuntimeContextImpl
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.ode.bpel.runtime.BpelRuntimeContext |
|---|
BpelRuntimeContext.ValueReferencePair |
| Field Summary | |
|---|---|
protected BpelProcess |
_bpelProcess
|
protected org.apache.ode.bpel.dao.ProcessInstanceDAO |
_dao
Data-access object for process instance. |
protected IMAManager |
_imaManager
|
protected OutstandingRequestManager |
_outstandingRequests
|
protected org.apache.ode.jacob.vpu.ExecutionQueueImpl |
_soup
JACOB ExecutionQueue (state) |
protected org.apache.ode.jacob.vpu.JacobVPU |
_vpu
JACOB VPU |
| Constructor Summary | |
|---|---|
BpelRuntimeContextImpl(BpelProcess bpelProcess,
org.apache.ode.bpel.dao.ProcessInstanceDAO dao,
PROCESS PROCESS,
MyRoleMessageExchangeImpl instantiatingMessageExchange)
|
|
| Method Summary | |
|---|---|
protected void |
buildOutgoingMessage(org.apache.ode.bpel.dao.MessageDAO message,
org.w3c.dom.Element outgoingElmt)
|
void |
cancel(TimerResponseChannel timerResponseChannel)
Cancel a timer, or pick. |
void |
cancelOutstandingRequests(java.lang.String channelId)
|
void |
checkInvokeExternalPermission()
|
void |
completedFault(FaultData faultData)
Should be invoked by process template, signalling process completion with fault. |
void |
completedOk()
Should be invoked by process template, signalling process completion with no faults. |
org.w3c.dom.Node |
convertEndpointReference(org.w3c.dom.Element sourceNode,
org.w3c.dom.Node targetNode)
|
protected PartnerRoleMessageExchangeImpl |
createPartnerRoleMessageExchangeImpl(org.apache.ode.bpel.dao.MessageExchangeDAO mexDao,
PartnerLinkInstance partnerLink,
javax.wsdl.Operation operation,
org.apache.ode.bpel.iapi.EndpointReference partnerEpr,
org.apache.ode.bpel.iapi.EndpointReference myRoleEndpoint)
|
java.lang.Long |
createScopeInstance(java.lang.Long parentScopeId,
org.apache.ode.bpel.o.OScope scope)
Create a scope instance object. |
protected void |
doAsyncReply(MyRoleMessageExchangeImpl m)
|
void |
execute()
|
java.lang.String |
fetchEndpointSessionId(PartnerLinkInstance pLink,
boolean isMyEPR)
|
org.w3c.dom.Element |
fetchMyRoleEndpointReferenceData(PartnerLinkInstance pLink)
Fetches the my-role endpoint reference data. |
java.lang.String |
fetchMySessionId(PartnerLinkInstance pLink)
Fetch the session-identifier for the partner link from the database. |
protected org.apache.ode.bpel.dao.PartnerLinkDAO |
fetchPartnerLinkDAO(PartnerLinkInstance pLink)
|
org.w3c.dom.Element |
fetchPartnerRoleEndpointReferenceData(PartnerLinkInstance pLink)
|
java.lang.String |
fetchPartnersSessionId(PartnerLinkInstance pLink)
Fetches the partner's session id associated with the partner link instance. |
long |
genId()
Generate a unique (and monotonic) ID in the context of this instance. |
java.net.URI |
getBaseResourceURI()
Retrieves the base URI that this BPEL Process instance is running relative to. |
protected BpelProcess |
getBpelProcess()
|
org.apache.ode.bpel.iapi.ProcessConf.PartnerRoleConfig |
getConfigForPartnerLink(org.apache.ode.bpel.o.OPartnerLink pLink)
Retrieve failure handling info for invoke |
java.util.Date |
getCurrentEventDateTime()
|
ExpressionLanguageRuntimeRegistry |
getExpLangRuntime()
|
org.w3c.dom.Element |
getMyRequest(java.lang.String mexId)
|
javax.xml.namespace.QName |
getPartnerFault(java.lang.String mexId)
|
java.lang.String |
getPartnerFaultExplanation(java.lang.String mexId)
|
org.w3c.dom.Element |
getPartnerResponse(java.lang.String mexId)
|
javax.xml.namespace.QName |
getPartnerResponseType(java.lang.String mexId)
|
java.lang.Long |
getPid()
|
java.lang.ClassLoader |
getProcessClassLoader()
|
org.w3c.dom.Node |
getProcessProperty(javax.xml.namespace.QName propertyName)
Retrieves the property value that has been defined for this BPEL Process type. |
javax.xml.namespace.QName |
getProcessQName()
|
org.w3c.dom.Element |
getSourceEPR(java.lang.String mexId)
|
java.lang.String |
getSourceSessionId(java.lang.String mexId)
|
void |
initializeCorrelation(CorrelationSetInstance cset,
VariableInstance variable)
Common functionality to initialize a correlation set based on data available in a variable. |
void |
initializePartnerLinks(java.lang.Long parentScopeId,
java.util.Collection<org.apache.ode.bpel.o.OPartnerLink> partnerLinks)
Initializes endpoint references for partner links inside a scope. |
void |
initializePartnersSessionId(PartnerLinkInstance pLink,
java.lang.String session)
Initialize the partner's session id for this partner link instance. |
void |
inputMsgMatch(java.lang.String responsechannel,
int idx,
MyRoleMessageExchangeImpl mex)
|
void |
invocationResponse(java.lang.String mexid,
java.lang.String responseChannelId)
|
java.lang.String |
invoke(int aid,
PartnerLinkInstance partnerLink,
javax.wsdl.Operation operation,
org.w3c.dom.Element outgoingMessage,
InvokeResponseChannel channel)
Called back when the process executes an invokation. |
boolean |
isCorrelationInitialized(CorrelationSetInstance correlationSet)
|
boolean |
isPartnerRoleEndpointInitialized(PartnerLinkInstance pLink)
Determine if the partner role of an endpoint has been initialized (either explicitly throug assginment or via the deployment descriptor) |
boolean |
isVariableInitialized(VariableInstance var)
Checks for variable initialization, i.e. has had a 'write' |
void |
matcherEvent(java.lang.String correlatorId,
org.apache.ode.bpel.common.CorrelationKeySet ckeySet)
Attempt to match message exchanges on a correlator. |
void |
processOutstandingRequest(PartnerLinkInstance partnerLink,
java.lang.String opName,
java.lang.String bpelMexId,
java.lang.String odeMexId)
|
org.apache.ode.bpel.common.CorrelationKey |
readCorrelation(CorrelationSetInstance cset)
|
org.w3c.dom.Node |
readExtVar(org.apache.ode.bpel.o.OScope.Variable variable,
org.w3c.dom.Node reference)
Read an external variable. |
java.lang.String |
readProperty(VariableInstance variable,
org.apache.ode.bpel.o.OProcess.OProperty property)
Evaluate a property alias query expression against a variable, returning the normalized String representation of the property value. |
org.w3c.dom.Node |
readVariable(java.lang.Long scopeInstanceId,
java.lang.String varname,
boolean forWriting)
|
void |
recoverActivity(java.lang.String channel,
long activityId,
java.lang.String action,
FaultData fault)
|
void |
registerActivityForRecovery(ActivityRecoveryChannel channel,
long activityId,
java.lang.String reason,
java.util.Date dateTime,
org.w3c.dom.Element details,
java.lang.String[] actions,
int retries)
|
void |
registerTimer(TimerResponseChannel timerChannel,
java.util.Date timeToFire)
Registers a timer for future notification. |
void |
releasePartnerMex(java.lang.String mexId,
boolean instanceSucceeded)
|
void |
reply(PartnerLinkInstance plinkInstnace,
java.lang.String opName,
java.lang.String mexId,
org.w3c.dom.Element msg,
javax.xml.namespace.QName fault)
Send a reply to an open message-exchange. |
void |
reply2(PartnerLinkInstance plinkInstnace,
java.lang.String opName,
java.lang.String mexId,
org.w3c.dom.Element msg,
javax.xml.namespace.QName fault,
boolean failure,
java.lang.String mexRef)
|
void |
select(PickResponseChannel pickResponseChannel,
java.util.Date timeout,
boolean createInstance,
Selector[] selectors)
Non-deterministic selection on incoming message-exchanges. |
void |
sendEvent(org.apache.ode.bpel.evt.ProcessInstanceEvent event)
Sends the bpel event. |
void |
setCurrentEventDateTime(java.util.Date eventDateTime)
|
void |
terminate()
Terminates the process / sets state flag to terminate and ceases all processing on the VPU. |
protected void |
timerEvent(java.lang.String timerResponseChannel)
|
void |
unregisterActivityForRecovery(ActivityRecoveryChannel channel)
|
void |
writeCorrelation(CorrelationSetInstance cset,
org.apache.ode.bpel.common.CorrelationKey correlation)
|
void |
writeEndpointReference(PartnerLinkInstance variable,
org.w3c.dom.Element data)
Writes a partner EPR. |
BpelRuntimeContext.ValueReferencePair |
writeExtVar(org.apache.ode.bpel.o.OScope.Variable variable,
org.w3c.dom.Node reference,
org.w3c.dom.Node value)
Write an external variable. |
org.w3c.dom.Node |
writeVariable(VariableInstance variable,
org.w3c.dom.Node changes)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.ode.bpel.dao.ProcessInstanceDAO _dao
protected org.apache.ode.jacob.vpu.JacobVPU _vpu
protected org.apache.ode.jacob.vpu.ExecutionQueueImpl _soup
protected OutstandingRequestManager _outstandingRequests
protected IMAManager _imaManager
protected BpelProcess _bpelProcess
| Constructor Detail |
|---|
public BpelRuntimeContextImpl(BpelProcess bpelProcess,
org.apache.ode.bpel.dao.ProcessInstanceDAO dao,
PROCESS PROCESS,
MyRoleMessageExchangeImpl instantiatingMessageExchange)
| Method Detail |
|---|
public java.lang.Long getPid()
getPid in interface BpelRuntimeContextpublic long genId()
BpelRuntimeContext
genId in interface BpelRuntimeContextpublic boolean isCorrelationInitialized(CorrelationSetInstance correlationSet)
isCorrelationInitialized in interface BpelRuntimeContextBpelRuntimeContext.isCorrelationInitialized(org.apache.ode.bpel.runtime.CorrelationSetInstance)public boolean isVariableInitialized(VariableInstance var)
BpelRuntimeContext
isVariableInitialized in interface BpelRuntimeContextvar - variable
true if initializedBpelRuntimeContext.isVariableInitialized(org.apache.ode.bpel.runtime.VariableInstance)public boolean isPartnerRoleEndpointInitialized(PartnerLinkInstance pLink)
BpelRuntimeContext
isPartnerRoleEndpointInitialized in interface BpelRuntimeContextpLink - partner link
public void completedFault(FaultData faultData)
BpelRuntimeContext
completedFault in interface BpelRuntimeContextBpelRuntimeContext.completedFault(org.apache.ode.bpel.runtime.channels.FaultData)public void completedOk()
BpelRuntimeContext
completedOk in interface BpelRuntimeContextBpelRuntimeContext.completedOk()
public java.lang.Long createScopeInstance(java.lang.Long parentScopeId,
org.apache.ode.bpel.o.OScope scope)
BpelRuntimeContext
createScopeInstance in interface BpelRuntimeContextparentScopeId - _id of parent scope (null if root scope)scope - the type of scope, i.e. the name of the scope
BpelRuntimeContext.createScopeInstance(Long,
org.apache.ode.bpel.o.OScope)
public void initializePartnerLinks(java.lang.Long parentScopeId,
java.util.Collection<org.apache.ode.bpel.o.OPartnerLink> partnerLinks)
BpelRuntimeContext
initializePartnerLinks in interface BpelRuntimeContext
public void select(PickResponseChannel pickResponseChannel,
java.util.Date timeout,
boolean createInstance,
Selector[] selectors)
throws org.apache.ode.bpel.common.FaultException
BpelRuntimeContext
select in interface BpelRuntimeContextorg.apache.ode.bpel.common.FaultExceptionpublic org.apache.ode.bpel.common.CorrelationKey readCorrelation(CorrelationSetInstance cset)
readCorrelation in interface BpelRuntimeContextBpelRuntimeContext.readCorrelation(org.apache.ode.bpel.runtime.CorrelationSetInstance)
public org.w3c.dom.Element fetchPartnerRoleEndpointReferenceData(PartnerLinkInstance pLink)
throws org.apache.ode.bpel.common.FaultException
fetchPartnerRoleEndpointReferenceData in interface BpelRuntimeContextorg.apache.ode.bpel.common.FaultExceptionpublic org.w3c.dom.Element fetchMyRoleEndpointReferenceData(PartnerLinkInstance pLink)
BpelRuntimeContext
fetchMyRoleEndpointReferenceData in interface BpelRuntimeContextprotected org.apache.ode.bpel.dao.PartnerLinkDAO fetchPartnerLinkDAO(PartnerLinkInstance pLink)
public java.lang.String readProperty(VariableInstance variable,
org.apache.ode.bpel.o.OProcess.OProperty property)
throws org.apache.ode.bpel.common.FaultException
String representation of the property value.
readProperty in interface BpelRuntimeContextvariable - variable to readproperty - property to read
org.apache.ode.bpel.common.FaultException - in case of selection or other fault
public void writeEndpointReference(PartnerLinkInstance variable,
org.w3c.dom.Element data)
throws org.apache.ode.bpel.common.FaultException
BpelRuntimeContext
writeEndpointReference in interface BpelRuntimeContextorg.apache.ode.bpel.common.FaultException
public java.lang.String fetchEndpointSessionId(PartnerLinkInstance pLink,
boolean isMyEPR)
throws org.apache.ode.bpel.common.FaultException
org.apache.ode.bpel.common.FaultException
public org.w3c.dom.Node convertEndpointReference(org.w3c.dom.Element sourceNode,
org.w3c.dom.Node targetNode)
convertEndpointReference in interface BpelRuntimeContext
public org.w3c.dom.Node readVariable(java.lang.Long scopeInstanceId,
java.lang.String varname,
boolean forWriting)
throws org.apache.ode.bpel.common.FaultException
readVariable in interface BpelRuntimeContextorg.apache.ode.bpel.common.FaultException
public org.w3c.dom.Node writeVariable(VariableInstance variable,
org.w3c.dom.Node changes)
writeVariable in interface BpelRuntimeContextpublic void cancelOutstandingRequests(java.lang.String channelId)
cancelOutstandingRequests in interface BpelRuntimeContext
public void processOutstandingRequest(PartnerLinkInstance partnerLink,
java.lang.String opName,
java.lang.String bpelMexId,
java.lang.String odeMexId)
throws org.apache.ode.bpel.common.FaultException
processOutstandingRequest in interface BpelRuntimeContextorg.apache.ode.bpel.common.FaultExceptionprotected void doAsyncReply(MyRoleMessageExchangeImpl m)
public void reply(PartnerLinkInstance plinkInstnace,
java.lang.String opName,
java.lang.String mexId,
org.w3c.dom.Element msg,
javax.xml.namespace.QName fault)
throws org.apache.ode.bpel.common.FaultException
BpelRuntimeContext
reply in interface BpelRuntimeContextmsg - response messagefault - fault name, if this is a fault reply, otherwise null
org.apache.ode.bpel.common.FaultException
public void reply2(PartnerLinkInstance plinkInstnace,
java.lang.String opName,
java.lang.String mexId,
org.w3c.dom.Element msg,
javax.xml.namespace.QName fault,
boolean failure,
java.lang.String mexRef)
throws org.apache.ode.bpel.common.FaultException
org.apache.ode.bpel.common.FaultException
public void writeCorrelation(CorrelationSetInstance cset,
org.apache.ode.bpel.common.CorrelationKey correlation)
writeCorrelation in interface BpelRuntimeContextBpelRuntimeContext.writeCorrelation(org.apache.ode.bpel.runtime.CorrelationSetInstance,
org.apache.ode.bpel.common.CorrelationKey)
public void initializeCorrelation(CorrelationSetInstance cset,
VariableInstance variable)
throws org.apache.ode.bpel.common.FaultException
cset - the correlation set instancevariable - variable instance
java.lang.IllegalStateException - DOCUMENTME
org.apache.ode.bpel.common.FaultExceptionpublic ExpressionLanguageRuntimeRegistry getExpLangRuntime()
getExpLangRuntime in interface BpelRuntimeContextpublic void terminate()
BpelRuntimeContext
terminate in interface BpelRuntimeContextBpelRuntimeContext.terminate()
public void registerTimer(TimerResponseChannel timerChannel,
java.util.Date timeToFire)
BpelRuntimeContext
registerTimer in interface BpelRuntimeContexttimerChannel - channel for timer notificationtimeToFire - future time to fire timer notificationpublic void checkInvokeExternalPermission()
public java.lang.String invoke(int aid,
PartnerLinkInstance partnerLink,
javax.wsdl.Operation operation,
org.w3c.dom.Element outgoingMessage,
InvokeResponseChannel channel)
throws org.apache.ode.bpel.common.FaultException
invoke in interface BpelRuntimeContextactivityId - The activity id in the process definition (id of OInvoke)partnerLinkInstance - The partner link variable instanceoperation - The wsdl operation.outboundMsg - The message sent outside as a DOMinvokeResponseChannel - Object called back when the response is received.
org.apache.ode.bpel.common.FaultException - When the response is a fault or when the invoke could not be executed
in which case it is one of the bpel standard fault.
protected PartnerRoleMessageExchangeImpl createPartnerRoleMessageExchangeImpl(org.apache.ode.bpel.dao.MessageExchangeDAO mexDao,
PartnerLinkInstance partnerLink,
javax.wsdl.Operation operation,
org.apache.ode.bpel.iapi.EndpointReference partnerEpr,
org.apache.ode.bpel.iapi.EndpointReference myRoleEndpoint)
protected BpelProcess getBpelProcess()
protected void buildOutgoingMessage(org.apache.ode.bpel.dao.MessageDAO message,
org.w3c.dom.Element outgoingElmt)
public void execute()
public void inputMsgMatch(java.lang.String responsechannel,
int idx,
MyRoleMessageExchangeImpl mex)
protected void timerEvent(java.lang.String timerResponseChannel)
public void cancel(TimerResponseChannel timerResponseChannel)
BpelRuntimeContext
cancel in interface BpelRuntimeContext
public void invocationResponse(java.lang.String mexid,
java.lang.String responseChannelId)
public void sendEvent(org.apache.ode.bpel.evt.ProcessInstanceEvent event)
BpelRuntimeContext
sendEvent in interface BpelRuntimeContextBpelRuntimeContext.sendEvent(org.apache.ode.bpel.evt.ProcessInstanceEvent)public org.w3c.dom.Element getPartnerResponse(java.lang.String mexId)
getPartnerResponse in interface BpelRuntimeContextpublic org.w3c.dom.Element getMyRequest(java.lang.String mexId)
getMyRequest in interface BpelRuntimeContextpublic javax.xml.namespace.QName getPartnerFault(java.lang.String mexId)
getPartnerFault in interface BpelRuntimeContextpublic javax.xml.namespace.QName getPartnerResponseType(java.lang.String mexId)
getPartnerResponseType in interface BpelRuntimeContextpublic java.lang.String getPartnerFaultExplanation(java.lang.String mexId)
getPartnerFaultExplanation in interface BpelRuntimeContext
public void releasePartnerMex(java.lang.String mexId,
boolean instanceSucceeded)
releasePartnerMex in interface BpelRuntimeContextpublic org.w3c.dom.Element getSourceEPR(java.lang.String mexId)
getSourceEPR in interface BpelRuntimeContextpublic java.lang.String getSourceSessionId(java.lang.String mexId)
getSourceSessionId in interface BpelRuntimeContext
public void registerActivityForRecovery(ActivityRecoveryChannel channel,
long activityId,
java.lang.String reason,
java.util.Date dateTime,
org.w3c.dom.Element details,
java.lang.String[] actions,
int retries)
registerActivityForRecovery in interface BpelRuntimeContextpublic void unregisterActivityForRecovery(ActivityRecoveryChannel channel)
unregisterActivityForRecovery in interface BpelRuntimeContext
public void recoverActivity(java.lang.String channel,
long activityId,
java.lang.String action,
FaultData fault)
recoverActivity in interface BpelRuntimeContextpublic java.lang.String fetchMySessionId(PartnerLinkInstance pLink)
fetchMySessionId in interface BpelRuntimeContextpLink - partner linkpublic java.lang.String fetchPartnersSessionId(PartnerLinkInstance pLink)
BpelRuntimeContext
fetchPartnersSessionId in interface BpelRuntimeContextpLink - partner link
public void initializePartnersSessionId(PartnerLinkInstance pLink,
java.lang.String session)
BpelRuntimeContext
initializePartnersSessionId in interface BpelRuntimeContextpLink - partner linksession - session identifier
public void matcherEvent(java.lang.String correlatorId,
org.apache.ode.bpel.common.CorrelationKeySet ckeySet)
public org.w3c.dom.Node readExtVar(org.apache.ode.bpel.o.OScope.Variable variable,
org.w3c.dom.Node reference)
throws org.apache.ode.bpel.evar.ExternalVariableModuleException
BpelRuntimeContext
readExtVar in interface BpelRuntimeContextorg.apache.ode.bpel.evar.ExternalVariableModuleException
public BpelRuntimeContext.ValueReferencePair writeExtVar(org.apache.ode.bpel.o.OScope.Variable variable,
org.w3c.dom.Node reference,
org.w3c.dom.Node value)
throws org.apache.ode.bpel.evar.ExternalVariableModuleException
BpelRuntimeContext
writeExtVar in interface BpelRuntimeContextorg.apache.ode.bpel.evar.ExternalVariableModuleExceptionpublic java.net.URI getBaseResourceURI()
BpelRuntimeContext
getBaseResourceURI in interface BpelRuntimeContextpublic org.w3c.dom.Node getProcessProperty(javax.xml.namespace.QName propertyName)
BpelRuntimeContext
getProcessProperty in interface BpelRuntimeContextpublic javax.xml.namespace.QName getProcessQName()
getProcessQName in interface BpelRuntimeContextpublic java.util.Date getCurrentEventDateTime()
getCurrentEventDateTime in interface BpelRuntimeContextpublic void setCurrentEventDateTime(java.util.Date eventDateTime)
public java.lang.ClassLoader getProcessClassLoader()
getProcessClassLoader in interface BpelRuntimeContextpublic org.apache.ode.bpel.iapi.ProcessConf.PartnerRoleConfig getConfigForPartnerLink(org.apache.ode.bpel.o.OPartnerLink pLink)
BpelRuntimeContext
getConfigForPartnerLink in interface BpelRuntimeContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||