Interface MasterDataInstanceBuilder
- All Known Implementing Classes:
MasterDataInstanceBuilderImpl
public interface MasterDataInstanceBuilder
Helper for creating a new Master data instance.
An instance can be obtained through the
DataObjectRuntimeService
.
dataObjectDefinitionId or dataObjectDefinitionKey should be set before calling create()
to create a master data instance.- Author:
- Tijs Rademakers
-
Method Summary
Modifier and TypeMethodDescriptionaddVariableValue
(String name, Object value) add a variable with name and valuecreate()
creates the master data instanceSet the creator id of the master data instancedataObjectDefinitionId
(String dataObjectDefinitionId) Set the id of the master data object definitiondataObjectDefinitionKey
(String dataObjectDefinitionKey) Set the key of the master data object definition, latest version of the data object definition with the given key.description
(String name) Set the description of the master data instanceexternalId
(String externalId) Set the external id of the master data instancefavorite()
Set the favorite value to true for the master data instanceSet the key of the master data instanceSet the name of the master data instanceoverrideDataObjectDefinitionId
(String tenantId) Indicator to override the tenant id of the data object definition with the provided value.sortOrder
(int sortOrder) Set the sort order of the master data instanceSet the state of the master data instanceSet the tenant id to resolve the data object definitionSet the updater id of the master data instance
-
Method Details
-
dataObjectDefinitionId
Set the id of the master data object definition -
dataObjectDefinitionKey
Set the key of the master data object definition, latest version of the data object definition with the given key. If dataObjectDefinitionId was set this will be ignored -
key
Set the key of the master data instance -
externalId
Set the external id of the master data instance -
name
Set the name of the master data instance -
description
Set the description of the master data instance -
state
Set the state of the master data instance -
sortOrder
Set the sort order of the master data instance -
favorite
MasterDataInstanceBuilder favorite()Set the favorite value to true for the master data instance -
creatorId
Set the creator id of the master data instance -
updaterId
Set the updater id of the master data instance -
tenantId
Set the tenant id to resolve the data object definition -
overrideDataObjectDefinitionId
Indicator to override the tenant id of the data object definition with the provided value. The tenantId to lookup the data object definition should still be provided if needed. -
addVariableValue
add a variable with name and value -
create
MasterDataInstance create()creates the master data instance- Throws:
FlowableIllegalArgumentException
- if dataObjectDefinitionKey and dataObjectDefinitionId are nullFlowableObjectNotFoundException
- when no data object definition is deployed with the given dataObjectDefinitionKey or dataObjectDefinitionId
-