public class BpelRuntimeContextImpl extends java.lang.Object implements BpelRuntimeContext
BpelRuntimeContext.ValueReferencePair| Modifier and Type | Field and Description |
|---|---|
protected BpelProcess |
_bpelProcess |
protected ProcessInstanceDAO |
_dao
Data-access object for process instance.
|
protected IMAManager |
_imaManager |
protected OutstandingRequestManager |
_outstandingRequests |
protected ExecutionQueueImpl |
_soup
JACOB ExecutionQueue (state)
|
protected JacobVPU |
_vpu
JACOB VPU
|
| Constructor and Description |
|---|
BpelRuntimeContextImpl(BpelProcess bpelProcess,
ProcessInstanceDAO dao,
PROCESS PROCESS,
MyRoleMessageExchangeImpl instantiatingMessageExchange) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildOutgoingMessage(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(MessageExchangeDAO mexDao,
PartnerLinkInstance partnerLink,
javax.wsdl.Operation operation,
EndpointReference partnerEpr,
EndpointReference myRoleEndpoint) |
java.lang.Long |
createScopeInstance(java.lang.Long parentScopeId,
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 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() |
ProcessConf.PartnerRoleConfig |
getConfigForPartnerLink(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<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.
|
void |
matcherEvent(java.lang.String correlatorId,
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) |
CorrelationKey |
readCorrelation(CorrelationSetInstance cset) |
org.w3c.dom.Node |
readExtVar(OScope.Variable variable,
org.w3c.dom.Node reference)
Read an external variable.
|
java.lang.String |
readProperty(VariableInstance variable,
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(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,
CorrelationKey correlation) |
void |
writeEndpointReference(PartnerLinkInstance variable,
org.w3c.dom.Element data)
Writes a partner EPR.
|
BpelRuntimeContext.ValueReferencePair |
writeExtVar(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) |
protected ProcessInstanceDAO _dao
protected JacobVPU _vpu
protected ExecutionQueueImpl _soup
protected OutstandingRequestManager _outstandingRequests
protected IMAManager _imaManager
protected BpelProcess _bpelProcess
public BpelRuntimeContextImpl(BpelProcess bpelProcess, ProcessInstanceDAO dao, PROCESS PROCESS, MyRoleMessageExchangeImpl instantiatingMessageExchange)
public java.lang.Long getPid()
getPid in interface BpelRuntimeContextpublic long genId()
BpelRuntimeContextgenId in interface BpelRuntimeContextpublic boolean isCorrelationInitialized(CorrelationSetInstance correlationSet)
isCorrelationInitialized in interface BpelRuntimeContextBpelRuntimeContext.isCorrelationInitialized(org.apache.ode.bpel.runtime.CorrelationSetInstance)public boolean isVariableInitialized(VariableInstance var)
BpelRuntimeContextisVariableInitialized in interface BpelRuntimeContextvar - variabletrue if initializedBpelRuntimeContext.isVariableInitialized(org.apache.ode.bpel.runtime.VariableInstance)public boolean isPartnerRoleEndpointInitialized(PartnerLinkInstance pLink)
BpelRuntimeContextisPartnerRoleEndpointInitialized in interface BpelRuntimeContextpLink - partner linkpublic void completedFault(FaultData faultData)
BpelRuntimeContextcompletedFault in interface BpelRuntimeContextBpelRuntimeContext.completedFault(org.apache.ode.bpel.runtime.channels.FaultData)public void completedOk()
BpelRuntimeContextcompletedOk in interface BpelRuntimeContextBpelRuntimeContext.completedOk()public java.lang.Long createScopeInstance(java.lang.Long parentScopeId,
OScope scope)
BpelRuntimeContextcreateScopeInstance in interface BpelRuntimeContextparentScopeId - _id of parent scope (null if root scope)scope - the type of scope, i.e. the name of the scopeBpelRuntimeContext.createScopeInstance(Long,
org.apache.ode.bpel.o.OScope)public void initializePartnerLinks(java.lang.Long parentScopeId,
java.util.Collection<OPartnerLink> partnerLinks)
BpelRuntimeContextinitializePartnerLinks in interface BpelRuntimeContextpublic void select(PickResponseChannel pickResponseChannel, java.util.Date timeout, boolean createInstance, Selector[] selectors) throws FaultException
BpelRuntimeContextselect in interface BpelRuntimeContextFaultExceptionpublic CorrelationKey readCorrelation(CorrelationSetInstance cset)
readCorrelation in interface BpelRuntimeContextBpelRuntimeContext.readCorrelation(org.apache.ode.bpel.runtime.CorrelationSetInstance)public org.w3c.dom.Element fetchPartnerRoleEndpointReferenceData(PartnerLinkInstance pLink) throws FaultException
fetchPartnerRoleEndpointReferenceData in interface BpelRuntimeContextFaultExceptionpublic org.w3c.dom.Element fetchMyRoleEndpointReferenceData(PartnerLinkInstance pLink)
BpelRuntimeContextfetchMyRoleEndpointReferenceData in interface BpelRuntimeContextprotected PartnerLinkDAO fetchPartnerLinkDAO(PartnerLinkInstance pLink)
public java.lang.String readProperty(VariableInstance variable, OProcess.OProperty property) throws FaultException
String representation of the property value.readProperty in interface BpelRuntimeContextvariable - variable to readproperty - property to readFaultException - in case of selection or other faultpublic void writeEndpointReference(PartnerLinkInstance variable, org.w3c.dom.Element data) throws FaultException
BpelRuntimeContextwriteEndpointReference in interface BpelRuntimeContextFaultExceptionpublic java.lang.String fetchEndpointSessionId(PartnerLinkInstance pLink, boolean isMyEPR) throws FaultException
FaultExceptionpublic org.w3c.dom.Node convertEndpointReference(org.w3c.dom.Element sourceNode,
org.w3c.dom.Node targetNode)
convertEndpointReference in interface BpelRuntimeContextpublic org.w3c.dom.Node readVariable(java.lang.Long scopeInstanceId,
java.lang.String varname,
boolean forWriting)
throws FaultException
readVariable in interface BpelRuntimeContextFaultExceptionpublic 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 BpelRuntimeContextpublic void processOutstandingRequest(PartnerLinkInstance partnerLink, java.lang.String opName, java.lang.String bpelMexId, java.lang.String odeMexId) throws FaultException
processOutstandingRequest in interface BpelRuntimeContextFaultExceptionprotected 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 FaultException
BpelRuntimeContextreply in interface BpelRuntimeContextmsg - response messagefault - fault name, if this is a fault reply, otherwise nullFaultExceptionpublic 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 FaultException
FaultExceptionpublic void writeCorrelation(CorrelationSetInstance cset, CorrelationKey correlation)
public void initializeCorrelation(CorrelationSetInstance cset, VariableInstance variable) throws FaultException
cset - the correlation set instancevariable - variable instancejava.lang.IllegalStateException - DOCUMENTMEFaultExceptionpublic ExpressionLanguageRuntimeRegistry getExpLangRuntime()
getExpLangRuntime in interface BpelRuntimeContextpublic void terminate()
BpelRuntimeContextterminate in interface BpelRuntimeContextBpelRuntimeContext.terminate()public void registerTimer(TimerResponseChannel timerChannel, java.util.Date timeToFire)
BpelRuntimeContextregisterTimer 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 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.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(MessageExchangeDAO mexDao, PartnerLinkInstance partnerLink, javax.wsdl.Operation operation, EndpointReference partnerEpr, EndpointReference myRoleEndpoint)
protected BpelProcess getBpelProcess()
protected void buildOutgoingMessage(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)
BpelRuntimeContextcancel in interface BpelRuntimeContextpublic void invocationResponse(java.lang.String mexid,
java.lang.String responseChannelId)
public void sendEvent(ProcessInstanceEvent event)
BpelRuntimeContextsendEvent 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 BpelRuntimeContextpublic 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 BpelRuntimeContextpublic 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 BpelRuntimeContextpublic 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)
BpelRuntimeContextfetchPartnersSessionId in interface BpelRuntimeContextpLink - partner linkpublic void initializePartnersSessionId(PartnerLinkInstance pLink, java.lang.String session)
BpelRuntimeContextinitializePartnersSessionId in interface BpelRuntimeContextpLink - partner linksession - session identifierpublic void matcherEvent(java.lang.String correlatorId,
CorrelationKeySet ckeySet)
public org.w3c.dom.Node readExtVar(OScope.Variable variable, org.w3c.dom.Node reference) throws ExternalVariableModuleException
BpelRuntimeContextreadExtVar in interface BpelRuntimeContextExternalVariableModuleExceptionpublic BpelRuntimeContext.ValueReferencePair writeExtVar(OScope.Variable variable, org.w3c.dom.Node reference, org.w3c.dom.Node value) throws ExternalVariableModuleException
BpelRuntimeContextwriteExtVar in interface BpelRuntimeContextExternalVariableModuleExceptionpublic java.net.URI getBaseResourceURI()
BpelRuntimeContextgetBaseResourceURI in interface BpelRuntimeContextpublic org.w3c.dom.Node getProcessProperty(javax.xml.namespace.QName propertyName)
BpelRuntimeContextgetProcessProperty 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 ProcessConf.PartnerRoleConfig getConfigForPartnerLink(OPartnerLink pLink)
BpelRuntimeContextgetConfigForPartnerLink in interface BpelRuntimeContext