public interface ProcessService
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 signalId,
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.
|
ModelInstance getModelInstance(long modelInstanceId)
modelInstanceId
- ModelInstanceInfo getModelInstanceInfo(long modelInstanceId)
modelInstanceId
- process idCompressedModelInstance getCompressedModelInstance(long modelInstanceId)
Returns 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.
modelInstanceId
- ModelInstanceInfoList findModelInstances(ModelInstanceCriteria criteria)
criteria
- criteria for searchingModelInstanceInfo
sExecutionTrace createModelInstance(long modelId, StringProperties properties, boolean synchronously) throws ModuleNotFoundException
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).modelId
- properties
- synchronously
- ModuleNotFoundException
- if no model exists for the given model idLong createModelInstanceSimple(long modelId, StringProperties properties, boolean synchronously) throws ModuleNotFoundException
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).modelId
- properties
- synchronously
- ModuleNotFoundException
- if no model exists for the given model idExecutionTrace createAndStartModelInstance(long modelId, StringProperties properties, boolean synchronously, boolean startInterpretation) throws ModuleNotFoundException
ModelInstanceInfo
will not contain the model instance id (the id
will be -1).modelId
- properties
- synchronously
- startInterpretation
- ModuleNotFoundException
- if no model exists for the given model idExecutionTrace createAndStartModelInstanceWithParent(long modelId, StringProperties properties, Long parentModelInstanceId, boolean synchronously, boolean startInterpretation) throws ModuleNotFoundException
modelId
- properties
- parentModelInstanceId
- id of the parent model instance, may be null
synchronously
- startInterpretation
- ModuleNotFoundException
- if no model exists for the given model idExecutionTrace terminateModelInstance(long modelInstanceId, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException
modelInstanceId
- synchronously
- ModelInstanceNotFoundException
- if no running model instance exists for the given model instance idInvalidModelInstanceStateException
- if the model instance is finishedExecutionTrace startInterpretModelInstance(long modelInstanceId, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- synchronously
- ModelInstanceNotFoundException
- if no running model instance exists for the given model instance idInvalidModelInstanceStateException
- if the model instance is finishedErrorException
List<Long> startInterpretModelInstanceSimple(long modelInstanceId, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- synchronously
- ModelInstanceNotFoundException
- if no running model instance exists for the given model instance idInvalidModelInstanceStateException
- if the model instance is finishedErrorException
ExecutionTrace sendSignalToModelInstance(long modelInstanceId, ObjectValue signal, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- signal
- synchronously
- ModelInstanceNotFoundException
- if no running model instance exists for the given model instance idErrorException
InvalidModelInstanceStateException
SimpleType
void removeSignalFromModelInstance(long modelInstanceId, long signalId, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- signalId
- synchronously
- ModelInstanceNotFoundException
- if no running model instance exists for the given model instance idErrorException
InvalidModelInstanceStateException
void updateContextVariable(long modelInstanceId, long contextId, String variable, ObjectValue value, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- contextId
- variable
- value
- synchronously
- NullPointerException
- if variable
is nullModelInstanceNotFoundException
- if no running model instance exists for the given model instance idErrorException
InvalidModelInstanceStateException
void updateRecordField(long modelInstanceId, String recordType, String recordId, String field, ObjectValue value, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- recordType
- recordId
- The identifier of the record. The identifier is a string
representation of the holder's
handle
.field
- value
- synchronously
- NullPointerException
- if field
is nullModelInstanceNotFoundException
- if no running model instance exists for the given model instance idErrorException
InvalidModelInstanceStateException
void updateGoalState(long modelInstanceId, long processInstanceId, String goalName, boolean reactivate, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- processInstanceId
- goalName
- reactivate
- true if the goal should be reactivatedsynchronously
- NullPointerException
- if goalName
is nullModelInstanceNotFoundException
- if no running model instance exists for the given model instance idErrorException
InvalidModelInstanceStateException
String getModelInstanceXml(long modelInstanceId, List<ModelInstanceData> data)
modelInstanceId
- data
- CompressedString getCompressedModelInstanceXml(long modelInstanceId, List<ModelInstanceData> data)
modelInstanceId
- data
- ByteData getRawModelInstanceXml(long modelInstanceId)
Unlike 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.
modelInstanceId
- CompressedData getCompressedRawModelInstanceXml(long modelInstanceId)
Unlike 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.
modelInstanceId
- void setRawModelInstanceXml(long modelInstanceId, ByteData data) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException
modelInstanceId
- data
- InvalidModelInstanceStateException
ModelInstanceNotFoundException
void setCompressedRawModelInstanceXml(long modelInstanceId, CompressedData data) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException
modelInstanceId
- data
- InvalidModelInstanceStateException
ModelInstanceNotFoundException
void suspendModelInstance(long modelInstanceId, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- synchronously
- ModelInstanceNotFoundException
- if no running model instance exists for the given model instance idInvalidModelInstanceStateException
ErrorException
void resumeModelInstance(long modelInstanceId, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- synchronously
- ModelInstanceNotFoundException
- if no running model instance exists for the given model instance idErrorException
InvalidModelInstanceStateException
void notifyModelInstance(long modelInstanceId, String reason, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- reason
- synchronously
- ModelInstanceNotFoundException
- if no running model instance exists for the given model instance idErrorException
InvalidModelInstanceStateException
void notifyTask(long modelInstanceId, long taskId, String reason, boolean synchronously) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceId
- taskId
- reason
- synchronously
- ModelInstanceNotFoundException
- if no running model instance exists for the given model instance idErrorException
InvalidModelInstanceStateException
void removeAllFormPreviewModelInstances()
ExternalRecordValue resolveReference(long modelInstanceId, ExternalRecordValue value) throws ModelInstanceNotFoundException
modelInstanceId
- 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
.ModelInstanceNotFoundException
ExternalRecordValue.isReferenceOnly()
void restartModelInstances(Collection<Long> modelInstanceIds, long newModuleId) throws ModelInstanceNotFoundException, InvalidModelInstanceStateException, ErrorException
modelInstanceIds
- newModuleId
- id of the new module, if -1 the current model of each instance is usedModelInstanceNotFoundException
InvalidModelInstanceStateException
ErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.