@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
ReflectionFunctionsisInState in interface ReflectionFunctionsErrorExceptionpublic String alive()
ReflectionFunctionsalive in interface ReflectionFunctionspublic String notFinished()
ReflectionFunctionsnotFinished in interface ReflectionFunctionspublic String inactive()
ReflectionFunctionsinactive in interface ReflectionFunctionspublic String active()
ReflectionFunctionsactive in interface ReflectionFunctionspublic String ready()
ReflectionFunctionsready in interface ReflectionFunctionspublic String running()
ReflectionFunctionsrunning in interface ReflectionFunctionspublic String finished()
ReflectionFunctionsfinished in interface ReflectionFunctionspublic String achieved()
ReflectionFunctionsachieved in interface ReflectionFunctionspublic String failed()
ReflectionFunctionsfailed in interface ReflectionFunctionspublic String deactivated()
ReflectionFunctionsdeactivated in interface ReflectionFunctionspublic RecordHolder thisModelInstance(ExecutionContext ctx)
thisModelInstance in interface ReflectionFunctionspublic MapHolder thisModelInstanceProperties(ExecutionContext ctx)
ReflectionFunctionsnull if executed from document.thisModelInstanceProperties in interface ReflectionFunctionspublic String thisModelInstanceProperty(ExecutionContext ctx, String propertyName) throws ErrorException
ReflectionFunctionsnull if there is no property with
a given name or if executed from document.thisModelInstanceProperty in interface ReflectionFunctionsErrorExceptionpublic RecordHolder getProcessEntity(ExecutionContext ctx, Type type) throws ErrorException
ReflectionFunctionsgetProcessEntity in interface ReflectionFunctionsnullErrorExceptionpublic ProcessInstanceHolder thisProcessInstance(ExecutionContext ctx)
thisProcessInstance in interface ReflectionFunctionspublic RecordHolder thisModel(ExecutionContext ctx)
thisModel in interface ReflectionFunctionspublic RecordHolder getModel(ExecutionContext ctx, String name) throws ErrorException
ReflectionFunctionsgetModel in interface ReflectionFunctionsErrorExceptionpublic RecordHolder getModel(ExecutionContext ctx, String name, String version) throws ErrorException
ReflectionFunctionsgetModel in interface ReflectionFunctionsErrorExceptionpublic SetHolder findModels(ExecutionContext ctx, String name, String version, Boolean latestOnly)
ReflectionFunctionsfindModels in interface ReflectionFunctionspublic SetHolder findModelInstances(ExecutionContext context, String model, String version, Boolean isRunning, MapHolder properties)
ReflectionFunctionsfindModelInstances in interface ReflectionFunctionspublic RecordHolder getModelInstance(ExecutionContext context, Decimal id) throws ErrorException
ReflectionFunctionsgetModelInstance in interface ReflectionFunctionsErrorExceptionpublic SetHolder findProcessInstances(ExecutionContext context, ClosureHolder filter) throws ErrorException
ReflectionFunctionsfindProcessInstances in interface ReflectionFunctionsErrorExceptionpublic SetHolder findProcessInstances(ExecutionContext context, RecordHolder modelInstance, ClosureHolder filter) throws ErrorException
ReflectionFunctionsfindProcessInstances in interface ReflectionFunctionsErrorExceptionpublic MapHolder getModelInstanceProperties(ExecutionContext context, RecordHolder modelInstance) throws ErrorException
ReflectionFunctionsgetModelInstanceProperties in interface ReflectionFunctionsErrorExceptionpublic MapHolder getBinaryDataMetadata(ExecutionContext context, RecordHolder binaryData) throws ErrorException
ReflectionFunctionsgetBinaryDataMetadata in interface ReflectionFunctionsErrorExceptionpublic void activate(ExecutionContext ctx, CollectionHolder goals) throws ErrorException
ReflectionFunctionsactivate in interface ReflectionFunctionsErrorExceptionpublic void deactivate(ExecutionContext ctx, CollectionHolder goals) throws ErrorException
ReflectionFunctionsdeactivate in interface ReflectionFunctionsErrorExceptionpublic Decimal getCurrentInvocationTimestamp(ExecutionContext ctx)
ReflectionFunctionsgetCurrentInvocationTimestamp in interface ReflectionFunctionspublic Boolean isProxy(ExecutionContext ctx, RecordHolder record) throws ErrorException
ReflectionFunctionsisProxy in interface ReflectionFunctionsErrorExceptionpublic void terminateModelInstance(ExecutionContext context, RecordHolder modelInstance) throws ErrorException
ReflectionFunctionsterminateModelInstance in interface ReflectionFunctionsErrorExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.