@PermitAll public class ReflectionFunctionsImpl extends Object implements ReflectionFunctions
Constructor and Description |
---|
ReflectionFunctionsImpl()
Creates new instance.
|
ReflectionFunctionsImpl(ModelManagementDao modelManagementDao,
ModelInstanceDao modelInstanceDao,
CoreTypeFactory coreTypeFactory,
CommunicationService communicationService)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
String |
achieved()
Get ACHIEVED state name
|
void |
activate(ExecutionContext ctx,
CollectionHolder goals)
(Re)activates inactive or finished goals.
|
String |
active()
Get ACTIVE state name
|
String |
alive()
Get ALIVE state name
|
void |
deactivate(ExecutionContext ctx,
CollectionHolder goals)
Deactivates not finished goals.
|
String |
deactivated()
Get DEACTIVATED state name
|
String |
failed()
Get FAILED state name
|
SetHolder |
findModelInstances(ExecutionContext context,
String model,
String version,
Boolean isRunning,
MapHolder properties)
Returns a set of model instances satisfying the specified criteria.
|
SetHolder |
findModels(ExecutionContext ctx,
String name,
String version,
Boolean latestOnly)
Returns a set of all uploaded models satisfying the specified filtering
criteria.
|
SetHolder |
findProcessInstances(ExecutionContext context,
ClosureHolder filter)
Returns a set of process instances satisfying the specified filtering
criteria.
|
SetHolder |
findProcessInstances(ExecutionContext context,
RecordHolder modelInstance,
ClosureHolder filter)
Returns a set of process instances for a model instance satisfying the specified filtering
criteria.
|
String |
finished()
Get FINISHED state name
|
MapHolder |
getBinaryDataMetadata(ExecutionContext context,
RecordHolder binaryData)
Returns map of metadata of binary data.
|
Decimal |
getCurrentInvocationTimestamp(ExecutionContext ctx)
Returns current invocation timestamp.
|
RecordHolder |
getModel(ExecutionContext ctx,
String name)
Returns a model with the specified name or null, if there is
no such a model.
|
RecordHolder |
getModel(ExecutionContext ctx,
String name,
String version)
Returns a model with the specified name and version, or null, if there is
no such a model instance.
|
RecordHolder |
getModelInstance(ExecutionContext context,
Decimal id)
Returns a model instance with the specified id.
|
MapHolder |
getModelInstanceProperties(ExecutionContext context,
RecordHolder modelInstance)
Returns a map of initialization properties of the specified model
instance.
|
RecordHolder |
getProcessEntity(ExecutionContext ctx,
Type type)
Returns the associated process entity.
|
String |
inactive()
Get INACTIVE state name
|
Boolean |
isInState(ExecutionContext ctx,
RecordHolder goalPlan,
String state)
Returns true if a goalPlan is in the specified state or any of its
sub-states
|
Boolean |
isProxy(ExecutionContext ctx,
RecordHolder record)
Returns true if the record is proxy.
|
String |
notFinished()
Get NOT FINISHED state name
|
String |
ready()
Get READY state name
|
String |
running()
Get RUNNING state name
|
void |
terminateModelInstance(ExecutionContext context,
RecordHolder modelInstance)
Terminates given model instance
|
RecordHolder |
thisModel(ExecutionContext ctx) |
RecordHolder |
thisModelInstance(ExecutionContext ctx) |
MapHolder |
thisModelInstanceProperties(ExecutionContext ctx)
Returns a map of initialization properties of the model instance that executed this function.
|
String |
thisModelInstanceProperty(ExecutionContext ctx,
String propertyName)
Returns a value of the initialization property of the given name of the model instance
that executed this function.
|
ProcessInstanceHolder |
thisProcessInstance(ExecutionContext ctx) |
public ReflectionFunctionsImpl()
public ReflectionFunctionsImpl(ModelManagementDao modelManagementDao, ModelInstanceDao modelInstanceDao, CoreTypeFactory coreTypeFactory, CommunicationService communicationService)
modelManagementDao
- the model management daomodelInstanceDao
- the model instance daocoreTypeFactory
- the core type factorycommunicationService
- the communication servicepublic Boolean isInState(ExecutionContext ctx, RecordHolder goalPlan, String state) throws ErrorException
ReflectionFunctions
isInState
in interface ReflectionFunctions
ErrorException
public String alive()
ReflectionFunctions
alive
in interface ReflectionFunctions
public String notFinished()
ReflectionFunctions
notFinished
in interface ReflectionFunctions
public String inactive()
ReflectionFunctions
inactive
in interface ReflectionFunctions
public String active()
ReflectionFunctions
active
in interface ReflectionFunctions
public String ready()
ReflectionFunctions
ready
in interface ReflectionFunctions
public String running()
ReflectionFunctions
running
in interface ReflectionFunctions
public String finished()
ReflectionFunctions
finished
in interface ReflectionFunctions
public String achieved()
ReflectionFunctions
achieved
in interface ReflectionFunctions
public String failed()
ReflectionFunctions
failed
in interface ReflectionFunctions
public String deactivated()
ReflectionFunctions
deactivated
in interface ReflectionFunctions
public RecordHolder thisModelInstance(ExecutionContext ctx)
thisModelInstance
in interface ReflectionFunctions
public MapHolder thisModelInstanceProperties(ExecutionContext ctx)
ReflectionFunctions
null
if executed from document.thisModelInstanceProperties
in interface ReflectionFunctions
public String thisModelInstanceProperty(ExecutionContext ctx, String propertyName) throws ErrorException
ReflectionFunctions
null
if there is no property with
a given name or if executed from document.thisModelInstanceProperty
in interface ReflectionFunctions
ErrorException
public RecordHolder getProcessEntity(ExecutionContext ctx, Type type) throws ErrorException
ReflectionFunctions
getProcessEntity
in interface ReflectionFunctions
null
ErrorException
public ProcessInstanceHolder thisProcessInstance(ExecutionContext ctx)
thisProcessInstance
in interface ReflectionFunctions
public RecordHolder thisModel(ExecutionContext ctx)
thisModel
in interface ReflectionFunctions
public RecordHolder getModel(ExecutionContext ctx, String name) throws ErrorException
ReflectionFunctions
getModel
in interface ReflectionFunctions
ErrorException
public RecordHolder getModel(ExecutionContext ctx, String name, String version) throws ErrorException
ReflectionFunctions
getModel
in interface ReflectionFunctions
ErrorException
public SetHolder findModels(ExecutionContext ctx, String name, String version, Boolean latestOnly)
ReflectionFunctions
findModels
in interface ReflectionFunctions
public SetHolder findModelInstances(ExecutionContext context, String model, String version, Boolean isRunning, MapHolder properties)
ReflectionFunctions
findModelInstances
in interface ReflectionFunctions
public RecordHolder getModelInstance(ExecutionContext context, Decimal id) throws ErrorException
ReflectionFunctions
getModelInstance
in interface ReflectionFunctions
ErrorException
public SetHolder findProcessInstances(ExecutionContext context, ClosureHolder filter) throws ErrorException
ReflectionFunctions
findProcessInstances
in interface ReflectionFunctions
ErrorException
public SetHolder findProcessInstances(ExecutionContext context, RecordHolder modelInstance, ClosureHolder filter) throws ErrorException
ReflectionFunctions
findProcessInstances
in interface ReflectionFunctions
ErrorException
public MapHolder getModelInstanceProperties(ExecutionContext context, RecordHolder modelInstance) throws ErrorException
ReflectionFunctions
getModelInstanceProperties
in interface ReflectionFunctions
ErrorException
public MapHolder getBinaryDataMetadata(ExecutionContext context, RecordHolder binaryData) throws ErrorException
ReflectionFunctions
getBinaryDataMetadata
in interface ReflectionFunctions
ErrorException
public void activate(ExecutionContext ctx, CollectionHolder goals) throws ErrorException
ReflectionFunctions
activate
in interface ReflectionFunctions
ErrorException
public void deactivate(ExecutionContext ctx, CollectionHolder goals) throws ErrorException
ReflectionFunctions
deactivate
in interface ReflectionFunctions
ErrorException
public Decimal getCurrentInvocationTimestamp(ExecutionContext ctx)
ReflectionFunctions
getCurrentInvocationTimestamp
in interface ReflectionFunctions
public Boolean isProxy(ExecutionContext ctx, RecordHolder record) throws ErrorException
ReflectionFunctions
isProxy
in interface ReflectionFunctions
ErrorException
public void terminateModelInstance(ExecutionContext context, RecordHolder modelInstance) throws ErrorException
ReflectionFunctions
terminateModelInstance
in interface ReflectionFunctions
ErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.