@PermitAll public class ProcessServiceBean extends com.whitestein.lsps.common.SecureAndLoggingService implements ProcessServiceLocal, ProcessServiceRemote
| Constructor and Description |
|---|
ProcessServiceBean()
Creates new instance.
|
ProcessServiceBean(ModelInstanceDao modelInstanceDao,
ProcessLogDao processLogDao,
ModelProviderService modelProviderService,
CommunicationService communicationService)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ExecutionTrace |
createAndStartModelInstance(long modelId,
StringProperties properties,
boolean synchronously,
boolean startInterpretation)
Creates new model instance for given model id and properties and possibly starts
the model instance interpretation, This can be done
either synchronously or asynchronously.
|
ExecutionTrace |
createAndStartModelInstanceWithParent(long modelId,
StringProperties properties,
Long parentModelInstanceId,
boolean synchronously,
boolean startInterpretation)
Creates new model instance for given model id and properties and possibly starts
the model instance interpretation, This can be done
either synchronously or asynchronously.
|
ExecutionTrace |
createModelInstance(long modelId,
StringProperties properties,
boolean synchronously)
Creates new model instance for given model id and properties.
|
Long |
createModelInstanceSimple(long modelId,
StringProperties properties,
boolean synchronously)
Creates new model instance for given model id and properties.
|
ModelInstanceInfoList |
findModelInstances(ModelInstanceCriteria criteria)
Returns model instance info-s according to the provided criteria.
|
CompressedModelInstance |
getCompressedModelInstance(long modelInstanceId)
Returns a compressed model instance execution state for given model
instance* id or null if it does not exist.
|
CompressedString |
getCompressedModelInstanceXml(long modelInstanceId,
List<ModelInstanceData> data)
Returns the specified model instance as an xml structure or null if it does not exist.
|
CompressedData |
getCompressedRawModelInstanceXml(long modelInstanceId)
Returns the specified model instance as an xml structure or null if it does not exist.
|
ModelInstance |
getModelInstance(long modelInstanceId)
Returns complete model instance execution state for given model instance id or null if it
does not exist.
|
ModelInstanceInfo |
getModelInstanceInfo(long modelInstanceId)
Returns model instance info for given model instance id or null if it does not exist.
|
String |
getModelInstanceXml(long modelInstanceId,
List<ModelInstanceData> data)
Returns the specified model instance as an xml structure or null if it does not exist.
|
ByteData |
getRawModelInstanceXml(long modelInstanceId)
Returns the specified model instance as an xml structure or null if it does not exist.
|
void |
notifyModelInstance(long modelInstanceId,
String reason,
boolean synchronously)
Notifies a model instance.
|
void |
notifyTask(long modelInstanceId,
long taskId,
String reason,
boolean synchronously)
Notifies a task in model instance.
|
void |
removeAllFormPreviewModelInstances()
Removes all model instances created by form preview.
|
void |
removeSignalFromModelInstance(long modelInstanceId,
long id,
boolean synchronously)
Removes a signal from a running model instance.
|
ExternalRecordValue |
resolveReference(long modelInstanceId,
ExternalRecordValue value)
Resolves external record value reference to a value, attributes of which
are populated.
|
void |
restartModelInstances(Collection<Long> modelInstanceIds,
long newModuleId)
Restarts model instances with new model.
|
void |
resumeModelInstance(long modelInstanceId,
boolean synchronously)
Resumes model instance execution.
|
ExecutionTrace |
sendSignalToModelInstance(long modelInstanceId,
ObjectValue signal,
boolean synchronously)
Sends a signal to a running model instance.
|
void |
setCompressedRawModelInstanceXml(long modelInstanceId,
CompressedData data)
Sets the model instance state.
|
void |
setRawModelInstanceXml(long modelInstanceId,
ByteData data)
Sets the model instance state.
|
ExecutionTrace |
startInterpretModelInstance(long modelInstanceId,
boolean synchronously)
Starts the interpretation of an existing model instance for given model instance id.
|
List<Long> |
startInterpretModelInstanceSimple(long modelInstanceId,
boolean synchronously)
Starts the interpretation of an existing model instance for given model instance id.
|
void |
suspendModelInstance(long modelInstanceId,
boolean synchronously)
Suspends model instance execution.
|
ExecutionTrace |
terminateModelInstance(long modelInstanceId,
boolean synchronously)
Terminates model instance for given model instance id.
|
void |
updateContextVariable(long modelInstanceId,
long contextId,
String variable,
ObjectValue value,
boolean synchronously)
Updates the value of a given variable.
|
void |
updateGoalState(long modelInstanceId,
long processInstanceId,
String goalName,
boolean reactivate,
boolean synchronously)
Changes the state of the given goal.
|
void |
updateRecordField(long modelInstanceId,
String recordType,
String recordId,
String field,
ObjectValue value,
boolean synchronously)
Updates the value of a given record field.
|
public ProcessServiceBean()
public ProcessServiceBean(ModelInstanceDao modelInstanceDao, ProcessLogDao processLogDao, ModelProviderService modelProviderService, CommunicationService communicationService)
modelInstanceDao - processLogDao - modelProviderService - communicationService - NullPointerException - if any argument is null@RightsAllowed(value="ModelInstance:Read") public ModelInstanceInfo getModelInstanceInfo(long modelInstanceId)
ProcessServicegetModelInstanceInfo in interface ProcessServicemodelInstanceId - process id@RightsAllowed(value="ModelInstance:Read") public ModelInstanceInfoList findModelInstances(ModelInstanceCriteria criteria)
ProcessServicefindModelInstances in interface ProcessServicecriteria - criteria for searchingModelInstanceInfos@RightsAllowed(value="ModelInstance:Read") public ModelInstance getModelInstance(long modelInstanceId)
ProcessServicegetModelInstance in interface ProcessService@RightsAllowed(value="ModelInstance:Read") public CompressedModelInstance getCompressedModelInstance(long modelInstanceId)
ProcessServiceReturns a compressed model instance execution state for given model instance* id or null if it does not exist. The state does not contain BPMN transactions.
Use this method when transferring large model instance states over the network.
getCompressedModelInstance in interface ProcessService@RightsAllowed(value="Signal:Send") public ExecutionTrace sendSignalToModelInstance(long modelInstanceId, ObjectValue signal, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
ProcessServicesendSignalToModelInstance in interface ProcessServiceModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateExceptionErrorExceptionSimpleType@RightsAllowed(value="Signal:Remove")
public void removeSignalFromModelInstance(long modelInstanceId,
long id,
boolean synchronously)
throws ModelInstanceNotFoundException,
InvalidModelInstanceStateException,
ErrorException
ProcessServiceremoveSignalFromModelInstance in interface ProcessServiceModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateExceptionErrorException@RightsAllowed(value="ModelInstance:Create") public ExecutionTrace createModelInstance(long modelId, StringProperties properties, boolean synchronously) throws ModuleNotFoundException
ProcessServiceProcessService.startInterpretModelInstance(long, boolean). This can be done
either synchronously or asynchronously. If asynchronously, the returned
ModelInstanceInfo will not contain the model instance id (the id
will be -1).createModelInstance in interface ProcessServiceModuleNotFoundException - if no model exists for the given model id@RightsAllowed(value="ModelInstance:Create") public Long createModelInstanceSimple(long modelId, StringProperties properties, boolean synchronously) throws ModuleNotFoundException
ProcessServiceProcessService.startInterpretModelInstance(long, boolean). This can be done
either synchronously or asynchronously. If asynchronously, the returned
ModelInstanceInfo will not contain the model instance id (the id
will be -1).createModelInstanceSimple in interface ProcessServiceModuleNotFoundException - if no model exists for the given model id@RightsAllowed(value="ModelInstance:Create") public ExecutionTrace createAndStartModelInstance(long modelId, StringProperties properties, boolean synchronously, boolean startInterpretation) throws ModuleNotFoundException
ProcessServiceModelInstanceInfo will not contain the model instance id (the id
will be -1).createAndStartModelInstance in interface ProcessServiceModuleNotFoundException - if no model exists for the given model id@RightsAllowed(value="ModelInstance:Create") public ExecutionTrace createAndStartModelInstanceWithParent(long modelId, StringProperties properties, Long parentModelInstanceId, boolean synchronously, boolean startInterpretation) throws ModuleNotFoundException
ProcessServicecreateAndStartModelInstanceWithParent in interface ProcessServiceparentModelInstanceId - id of the parent model instance, may be nullModuleNotFoundException - if no model exists for the given model id@RightsAllowed(value="ModelInstance:Terminate") public ExecutionTrace terminateModelInstance(long modelInstanceId, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException
ProcessServiceterminateModelInstance in interface ProcessServiceModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateException - if the model instance is finished@RightsAllowed(value="ModelInstance:Create") public ExecutionTrace startInterpretModelInstance(long modelInstanceId, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
ProcessServicestartInterpretModelInstance in interface ProcessServiceModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateException - if the model instance is finishedErrorException@RightsAllowed(value="ModelInstance:Create") public List<Long> startInterpretModelInstanceSimple(long modelInstanceId, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
ProcessServicestartInterpretModelInstanceSimple in interface ProcessServiceModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateException - if the model instance is finishedErrorException@RightsAllowed(value="Variables:Update")
public void updateContextVariable(long modelInstanceId,
long contextId,
String variable,
ObjectValue value,
boolean synchronously)
throws ModelInstanceNotFoundException,
InvalidModelInstanceStateException,
ErrorException
ProcessServiceupdateContextVariable in interface ProcessServiceModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateExceptionErrorException@RightsAllowed(value="Variables:Update")
public void updateRecordField(long modelInstanceId,
String recordType,
String recordId,
String field,
ObjectValue value,
boolean synchronously)
throws ModelInstanceNotFoundException,
InvalidModelInstanceStateException,
ErrorException
ProcessServiceupdateRecordField in interface ProcessServicerecordId - The identifier of the record. The identifier is a string
representation of the holder's
handle.ModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateExceptionErrorException@RightsAllowed(value="GoalState:Update")
public void updateGoalState(long modelInstanceId,
long processInstanceId,
String goalName,
boolean reactivate,
boolean synchronously)
throws ModelInstanceNotFoundException,
InvalidModelInstanceStateException,
ErrorException
ProcessServiceupdateGoalState in interface ProcessServicereactivate - true if the goal should be reactivatedModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateExceptionErrorException@RightsAllowed(value="ModelInstance:Read") public String getModelInstanceXml(long modelInstanceId, List<ModelInstanceData> data)
ProcessServicegetModelInstanceXml in interface ProcessService@RightsAllowed(value="ModelInstance:Read") public CompressedString getCompressedModelInstanceXml(long modelInstanceId, List<ModelInstanceData> data)
ProcessServicegetCompressedModelInstanceXml in interface ProcessService@RightsAllowed(value="ModelInstance:Read") public ByteData getRawModelInstanceXml(long modelInstanceId)
ProcessService
Unlike ProcessService.getCompressedModelInstanceXml(long, List), this method
returns the raw XML as is stored in model instance state.
This is useful when the XML is not valid and cannot be unmarshalled by JAXB.
getRawModelInstanceXml in interface ProcessService@RightsAllowed(value="ModelInstance:Read") public CompressedData getCompressedRawModelInstanceXml(long modelInstanceId)
ProcessService
Unlike ProcessService.getCompressedModelInstanceXml(long, List), this method
returns the raw XML as is stored in model instance state.
This is useful when the XML is not valid and cannot be unmarshalled by JAXB.
getCompressedRawModelInstanceXml in interface ProcessService@RightsAllowed(value="ModelInstance:Write")
public void setRawModelInstanceXml(long modelInstanceId,
ByteData data)
throws ModelInstanceNotFoundException,
InvalidModelInstanceStateException
ProcessServicesetRawModelInstanceXml in interface ProcessServiceModelInstanceNotFoundExceptionInvalidModelInstanceStateException@RightsAllowed(value="ModelInstance:Write")
public void setCompressedRawModelInstanceXml(long modelInstanceId,
CompressedData data)
throws ModelInstanceNotFoundException,
InvalidModelInstanceStateException
ProcessServicesetCompressedRawModelInstanceXml in interface ProcessServiceModelInstanceNotFoundExceptionInvalidModelInstanceStateException@RightsAllowed(value="ModelInstance:Suspend")
public void resumeModelInstance(long modelInstanceId,
boolean synchronously)
throws ModelInstanceNotFoundException,
InvalidModelInstanceStateException,
ErrorException
ProcessServiceresumeModelInstance in interface ProcessServiceModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateExceptionErrorException@RightsAllowed(value="ModelInstance:Suspend")
public void suspendModelInstance(long modelInstanceId,
boolean synchronously)
throws ModelInstanceNotFoundException,
InvalidModelInstanceStateException,
ErrorException
ProcessServicesuspendModelInstance in interface ProcessServiceModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateExceptionErrorException@RightsAllowed(value="ModelInstance:Notify")
public void notifyModelInstance(long modelInstanceId,
String reason,
boolean synchronously)
throws ModelInstanceNotFoundException,
InvalidModelInstanceStateException,
ErrorException
ProcessServicenotifyModelInstance in interface ProcessServiceModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateExceptionErrorException@RightsAllowed(value="ModelInstance:Notify")
public void notifyTask(long modelInstanceId,
long taskId,
String reason,
boolean synchronously)
throws ModelInstanceNotFoundException,
InvalidModelInstanceStateException,
ErrorException
ProcessServicenotifyTask in interface ProcessServiceModelInstanceNotFoundException - if no running model instance exists for the given model instance idInvalidModelInstanceStateExceptionErrorException@RightsAllowed(value="ModelInstance:Read") public void removeAllFormPreviewModelInstances()
ProcessServiceremoveAllFormPreviewModelInstances in interface ProcessServicepublic ExternalRecordValue resolveReference(long modelInstanceId, ExternalRecordValue value) throws ModelInstanceNotFoundException
ProcessServiceresolveReference in interface ProcessServicemodelInstanceId - the identifier of the model instance in which the value is definedvalue - an external record value which is just a reference, that
is it's ExternalRecordValue.isReferenceOnly()
returns true.ModelInstanceNotFoundExceptionExternalRecordValue.isReferenceOnly()public void restartModelInstances(Collection<Long> modelInstanceIds, long newModuleId) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
ProcessServicerestartModelInstances in interface ProcessServicenewModuleId - id of the new module, if -1 the current model of each instance is usedModelInstanceNotFoundExceptionInvalidModelInstanceStateExceptionErrorExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.