org.jprocessunit.addon.jpd
Class StartProcessEvent

java.lang.Object
  extended by org.jprocessunit.ActionEvent
      extended by org.jprocessunit.addon.jpd.StartProcessEvent
All Implemented Interfaces:
ProcessEvent

public class StartProcessEvent
extends ActionEvent

JProcessUnit Action Event used to start JPD's and retrive related information.

Author:
Reza Shafii

Constructor Summary
StartProcessEvent(java.lang.String jpdPath, java.lang.String jpdName)
           
 
Method Summary
 java.lang.String getInstanceID(java.lang.String targetServiceUri)
           
 java.lang.Integer getIntegerVariableValue(java.lang.String targetServiceUri, java.lang.String varName)
          Accessor to the value of an internal process variable of type Integer.
 java.lang.String getJpdName()
           
 java.lang.String getLabel(java.lang.String targetServiceUri)
           
 java.lang.Long getLongVariableValue(java.lang.String targetServiceUri, java.lang.String varName)
          Accessor to the value of an internal process variable of type Long.
 java.lang.String getServiceUri()
           
 com.bea.wli.bpm.runtime.ProcessStatus getStatus(java.lang.String targetServiceUri)
           
 java.lang.String getStringVariableValue(java.lang.String targetServiceUri, java.lang.String varName)
          Accessor to the value of an internal process variable of type String.
 org.apache.xmlbeans.XmlObject getSyncResponse()
           
 org.apache.xmlbeans.XmlObject getXmlVariableValue(java.lang.String targetServiceUri, java.lang.String varName)
          Accessor to the value of an internal process variable of type XML.
 void performAction()
          Starts the JPD and passes the SOAP message argument
 void setSoapMessage(java.io.File soapMessageFile)
           
 void setSoapMessage(java.lang.String soapMessage)
           
 
Methods inherited from class org.jprocessunit.ActionEvent
assertEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StartProcessEvent

public StartProcessEvent(java.lang.String jpdPath,
                         java.lang.String jpdName)
Parameters:
jpdPath - HTTP path of the JPD, eg "/myProj/processes"
jpdName - Name of the JPD, eg "myProcess.jpd"
Method Detail

getJpdName

public java.lang.String getJpdName()
Returns:
Name of associated starting JPD

setSoapMessage

public void setSoapMessage(java.lang.String soapMessage)
Parameters:
soapMessage - SOAP message that is passed as an argument to the JPD.

setSoapMessage

public void setSoapMessage(java.io.File soapMessageFile)
Parameters:
soapMessageFile - File containing SOAP message that is passed as an argument to the JPD.

getServiceUri

public java.lang.String getServiceUri()
Returns:
Service URI for the starting process

getStringVariableValue

public java.lang.String getStringVariableValue(java.lang.String targetServiceUri,
                                               java.lang.String varName)
Accessor to the value of an internal process variable of type String.

Parameters:
targetServiceUri - The uri of the JPD that variable belongs to. If this parameter value is null then the starting (top level) JPD is used. Otherwise the URI must be either the service URI of the top level JPD or one of its children JPD's.
varName - Name of the string variable to be retrieved from childJpdName

getLongVariableValue

public java.lang.Long getLongVariableValue(java.lang.String targetServiceUri,
                                           java.lang.String varName)
Accessor to the value of an internal process variable of type Long.

Parameters:
targetServiceUri - The uri of the JPD that variable belongs to. If this parameter value is null then the starting (top level) JPD is used. Otherwise the URI must be either the service URI of the top level JPD or one of its children JPD's.
varName - Name of the string variable to be retrieved from childJpdName

getIntegerVariableValue

public java.lang.Integer getIntegerVariableValue(java.lang.String targetServiceUri,
                                                 java.lang.String varName)
Accessor to the value of an internal process variable of type Integer.

Parameters:
targetServiceUri - The uri of the JPD that variable belongs to. If this parameter value is null then the starting (top level) JPD is used. Otherwise the URI must be either the service URI of the top level JPD or one of its children JPD's.
varName - Name of the string variable to be retrieved from childJpdName

getXmlVariableValue

public org.apache.xmlbeans.XmlObject getXmlVariableValue(java.lang.String targetServiceUri,
                                                         java.lang.String varName)
Accessor to the value of an internal process variable of type XML.

Parameters:
targetServiceUri - The uri of the JPD that variable belongs to. If this parameter value is null then the starting (top level) JPD is used. Otherwise the URI must be either the service URI of the top level JPD or one of its children JPD's.
varName - Name of the string variable to be retrieved from childJpdName

getLabel

public java.lang.String getLabel(java.lang.String targetServiceUri)
Returns:
Label of the JPD indicated by targetServiceUri. If this value is null then the top level (starting) JPD is assumed. Otherwise targetServiceUri must point to a JPD that is in the child tree of the top level JPD.

getStatus

public com.bea.wli.bpm.runtime.ProcessStatus getStatus(java.lang.String targetServiceUri)
Returns:
Status of the JPD indicated by targetServiceUri. If this value is null then the top level (starting) JPD is assumed. Otherwise targetServiceUri must point to a JPD that is in the child tree of the top level JPD.

getInstanceID

public java.lang.String getInstanceID(java.lang.String targetServiceUri)
Returns:
Instance ID of the JPD indicated by targetServiceUri. If this value is null then the top level (starting) JPD is assumed. Otherwise targetServiceUri must point to a JPD that is in the child tree of the top level JPD.

getSyncResponse

public org.apache.xmlbeans.XmlObject getSyncResponse()
Returns:
The synchronous response received when the process was started. Both synchronous and asynchronous processes have a synchronous response. If the response was not received null is returned.

performAction

public void performAction()
Starts the JPD and passes the SOAP message argument

Specified by:
performAction in class ActionEvent


JProcessUnit API