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 BpelRuntimeContext
public long genId()
BpelRuntimeContext
genId
in interface BpelRuntimeContext
public boolean isCorrelationInitialized(CorrelationSetInstance correlationSet)
isCorrelationInitialized
in interface BpelRuntimeContext
BpelRuntimeContext.isCorrelationInitialized(org.apache.ode.bpel.runtime.CorrelationSetInstance)
public boolean isVariableInitialized(VariableInstance var)
BpelRuntimeContext
isVariableInitialized
in interface BpelRuntimeContext
var
- variabletrue
if initializedBpelRuntimeContext.isVariableInitialized(org.apache.ode.bpel.runtime.VariableInstance)
public boolean isPartnerRoleEndpointInitialized(PartnerLinkInstance pLink)
BpelRuntimeContext
isPartnerRoleEndpointInitialized
in interface BpelRuntimeContext
pLink
- partner linkpublic void completedFault(FaultData faultData)
BpelRuntimeContext
completedFault
in interface BpelRuntimeContext
BpelRuntimeContext.completedFault(org.apache.ode.bpel.runtime.channels.FaultData)
public void completedOk()
BpelRuntimeContext
completedOk
in interface BpelRuntimeContext
BpelRuntimeContext.completedOk()
public java.lang.Long createScopeInstance(java.lang.Long parentScopeId, OScope scope)
BpelRuntimeContext
createScopeInstance
in interface BpelRuntimeContext
parentScopeId
- _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)
BpelRuntimeContext
initializePartnerLinks
in interface BpelRuntimeContext
public void select(PickResponseChannel pickResponseChannel, java.util.Date timeout, boolean createInstance, Selector[] selectors) throws FaultException
BpelRuntimeContext
select
in interface BpelRuntimeContext
FaultException
public CorrelationKey readCorrelation(CorrelationSetInstance cset)
readCorrelation
in interface BpelRuntimeContext
BpelRuntimeContext.readCorrelation(org.apache.ode.bpel.runtime.CorrelationSetInstance)
public org.w3c.dom.Element fetchPartnerRoleEndpointReferenceData(PartnerLinkInstance pLink) throws FaultException
fetchPartnerRoleEndpointReferenceData
in interface BpelRuntimeContext
FaultException
public org.w3c.dom.Element fetchMyRoleEndpointReferenceData(PartnerLinkInstance pLink)
BpelRuntimeContext
fetchMyRoleEndpointReferenceData
in interface BpelRuntimeContext
protected 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 BpelRuntimeContext
variable
- variable to readproperty
- property to readFaultException
- in case of selection or other faultpublic void writeEndpointReference(PartnerLinkInstance variable, org.w3c.dom.Element data) throws FaultException
BpelRuntimeContext
writeEndpointReference
in interface BpelRuntimeContext
FaultException
public java.lang.String fetchEndpointSessionId(PartnerLinkInstance pLink, boolean isMyEPR) throws FaultException
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 FaultException
readVariable
in interface BpelRuntimeContext
FaultException
public org.w3c.dom.Node writeVariable(VariableInstance variable, org.w3c.dom.Node changes)
writeVariable
in interface BpelRuntimeContext
public 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 FaultException
processOutstandingRequest
in interface BpelRuntimeContext
FaultException
protected 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
BpelRuntimeContext
reply
in interface BpelRuntimeContext
msg
- response messagefault
- fault name, if this is a fault reply, otherwise null
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 FaultException
FaultException
public void writeCorrelation(CorrelationSetInstance cset, CorrelationKey correlation)
public void initializeCorrelation(CorrelationSetInstance cset, VariableInstance variable) throws FaultException
cset
- the correlation set instancevariable
- variable instancejava.lang.IllegalStateException
- DOCUMENTMEFaultException
public ExpressionLanguageRuntimeRegistry getExpLangRuntime()
getExpLangRuntime
in interface BpelRuntimeContext
public void terminate()
BpelRuntimeContext
terminate
in interface BpelRuntimeContext
BpelRuntimeContext.terminate()
public void registerTimer(TimerResponseChannel timerChannel, java.util.Date timeToFire)
BpelRuntimeContext
registerTimer
in interface BpelRuntimeContext
timerChannel
- 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 BpelRuntimeContext
activityId
- 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)
BpelRuntimeContext
cancel
in interface BpelRuntimeContext
public void invocationResponse(java.lang.String mexid, java.lang.String responseChannelId)
public void sendEvent(ProcessInstanceEvent event)
BpelRuntimeContext
sendEvent
in interface BpelRuntimeContext
BpelRuntimeContext.sendEvent(org.apache.ode.bpel.evt.ProcessInstanceEvent)
public org.w3c.dom.Element getPartnerResponse(java.lang.String mexId)
getPartnerResponse
in interface BpelRuntimeContext
public org.w3c.dom.Element getMyRequest(java.lang.String mexId)
getMyRequest
in interface BpelRuntimeContext
public javax.xml.namespace.QName getPartnerFault(java.lang.String mexId)
getPartnerFault
in interface BpelRuntimeContext
public javax.xml.namespace.QName getPartnerResponseType(java.lang.String mexId)
getPartnerResponseType
in interface BpelRuntimeContext
public java.lang.String getPartnerFaultExplanation(java.lang.String mexId)
getPartnerFaultExplanation
in interface BpelRuntimeContext
public void releasePartnerMex(java.lang.String mexId, boolean instanceSucceeded)
releasePartnerMex
in interface BpelRuntimeContext
public org.w3c.dom.Element getSourceEPR(java.lang.String mexId)
getSourceEPR
in interface BpelRuntimeContext
public 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 BpelRuntimeContext
public 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 BpelRuntimeContext
public java.lang.String fetchMySessionId(PartnerLinkInstance pLink)
fetchMySessionId
in interface BpelRuntimeContext
pLink
- partner linkpublic java.lang.String fetchPartnersSessionId(PartnerLinkInstance pLink)
BpelRuntimeContext
fetchPartnersSessionId
in interface BpelRuntimeContext
pLink
- partner linkpublic void initializePartnersSessionId(PartnerLinkInstance pLink, java.lang.String session)
BpelRuntimeContext
initializePartnersSessionId
in interface BpelRuntimeContext
pLink
- 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
BpelRuntimeContext
readExtVar
in interface BpelRuntimeContext
ExternalVariableModuleException
public BpelRuntimeContext.ValueReferencePair writeExtVar(OScope.Variable variable, org.w3c.dom.Node reference, org.w3c.dom.Node value) throws ExternalVariableModuleException
BpelRuntimeContext
writeExtVar
in interface BpelRuntimeContext
ExternalVariableModuleException
public java.net.URI getBaseResourceURI()
BpelRuntimeContext
getBaseResourceURI
in interface BpelRuntimeContext
public org.w3c.dom.Node getProcessProperty(javax.xml.namespace.QName propertyName)
BpelRuntimeContext
getProcessProperty
in interface BpelRuntimeContext
public javax.xml.namespace.QName getProcessQName()
getProcessQName
in interface BpelRuntimeContext
public java.util.Date getCurrentEventDateTime()
getCurrentEventDateTime
in interface BpelRuntimeContext
public void setCurrentEventDateTime(java.util.Date eventDateTime)
public java.lang.ClassLoader getProcessClassLoader()
getProcessClassLoader
in interface BpelRuntimeContext
public ProcessConf.PartnerRoleConfig getConfigForPartnerLink(OPartnerLink pLink)
BpelRuntimeContext
getConfigForPartnerLink
in interface BpelRuntimeContext