Package org.jbpm.kie.services.impl.bpmn2
Class BPMN2DataServiceImpl
- java.lang.Object
-
- org.jbpm.kie.services.impl.bpmn2.BPMN2DataServiceImpl
-
- All Implemented Interfaces:
DefinitionService,DeploymentEventListener
- Direct Known Subclasses:
BPMN2DataServiceCDIImpl,DefinitionServiceEJBImpl
public class BPMN2DataServiceImpl extends Object implements DefinitionService, DeploymentEventListener
-
-
Constructor Summary
Constructors Constructor Description BPMN2DataServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProcessDefinition(String deploymentId, String processId, Object processDescriptor, org.kie.api.runtime.KieContainer kieContainer)ProcessDefinitionbuildProcessDefinition(String deploymentId, String bpmn2Content, org.kie.api.runtime.KieContainer kieContainer, boolean cache)Performs build operation for given bpmn2content to produce fully populatedProcessDefinitionMap<String,Collection<String>>getAssociatedEntities(String deploymentId, String processId)Returns all organizational entities identifiers involved in the process - like users and groups.Set<String>getJavaClasses(String deploymentId, String processId)Returns a list of all referenced java classes defined in the given process.ProcessDefinitiongetProcessDefinition(String deploymentId, String processId)Returns previously builtProcessDefinition.Map<String,String>getProcessVariables(String deploymentId, String processId)Returns all process variables defined in the given process where: key in the map is name of the process variable value in the map is type of the process variable
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethodCollection<String>getReusableSubProcesses(String deploymentId, String processId)Returns collection of process identifiers of reusable processes used by given process.Set<String>getRuleSets(String deploymentId, String processId)Returns a list of all referenced rules used in the given process.Map<String,String>getServiceTasks(String deploymentId, String processId)Returns service (domain specific) tasks defined in the process where: key in the map is name of the task node value in the map is name of the domain specific service (name that handler should be registered with)
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethodMap<String,String>getTaskInputMappings(String deploymentId, String processId, String taskName)Returns map of data input defined for given user task key in the map is identifier of dataInput value in the map is name dataInput
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethodMap<String,String>getTaskOutputMappings(String deploymentId, String processId, String taskName)Returns map of data output defined for given user task key in the map is identifier of dataOutput value in the map is name dataOutput
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethodCollection<UserTaskDefinition>getTasksDefinitions(String deploymentId, String processId)Returns all user task definitions defined in given process
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethodvoidonActivate(DeploymentEvent event)voidonDeactivate(DeploymentEvent event)voidonDeploy(DeploymentEvent event)voidonUnDeploy(DeploymentEvent event)
-
-
-
Method Detail
-
addProcessDefinition
public void addProcessDefinition(String deploymentId, String processId, Object processDescriptor, org.kie.api.runtime.KieContainer kieContainer)
- Specified by:
addProcessDefinitionin interfaceDefinitionService
-
buildProcessDefinition
public ProcessDefinition buildProcessDefinition(String deploymentId, String bpmn2Content, org.kie.api.runtime.KieContainer kieContainer, boolean cache) throws IllegalArgumentException
Description copied from interface:DefinitionServicePerforms build operation for given bpmn2content to produce fully populatedProcessDefinition- Specified by:
buildProcessDefinitionin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment this process belongs to, might be null if built definition does not need to be storedbpmn2Content- actual BPMN xml content as string to be parsed and processedkieContainer- theKieContainerinstance that contains the deployment project: this should be used when parsing the BPMN2 in case custom classes or other project resources (processes, rules) are referencedcache- indicates if the definition service should cache thisProcessDefinition- Returns:
- fully populated
ProcessDefinition - Throws:
IllegalArgumentException- in case build operation cannot be completed
-
getServiceTasks
public Map<String,String> getServiceTasks(String deploymentId, String processId)
Description copied from interface:DefinitionServiceReturns service (domain specific) tasks defined in the process where:- key in the map is name of the task node
- value in the map is name of the domain specific service (name that handler should be registered with)
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethod- Specified by:
getServiceTasksin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment that process belongs toprocessId- identifier of the process- Returns:
- returns map of all found service tasks or empty map if none are found
-
getProcessDefinition
public ProcessDefinition getProcessDefinition(String deploymentId, String processId)
Description copied from interface:DefinitionServiceReturns previously builtProcessDefinition.
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethod- Specified by:
getProcessDefinitionin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment that process belongs toprocessId- identifier of the process- Returns:
- returns complete
ProcessDefinition
-
getReusableSubProcesses
public Collection<String> getReusableSubProcesses(String deploymentId, String processId)
Description copied from interface:DefinitionServiceReturns collection of process identifiers of reusable processes used by given process.
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethod- Specified by:
getReusableSubProcessesin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment that process belongs toprocessId- identifier of the process- Returns:
- returns collection of found reusable subprocess identifiers, maybe an empty list if none were found
-
getProcessVariables
public Map<String,String> getProcessVariables(String deploymentId, String processId)
Description copied from interface:DefinitionServiceReturns all process variables defined in the given process where:- key in the map is name of the process variable
- value in the map is type of the process variable
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethod- Specified by:
getProcessVariablesin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment that process belongs toprocessId- identifier of the process- Returns:
- map of all process variables defined or empty map if none are found
-
getAssociatedEntities
public Map<String,Collection<String>> getAssociatedEntities(String deploymentId, String processId)
Description copied from interface:DefinitionServiceReturns all organizational entities identifiers involved in the process - like users and groups. Since this is based on definition and not runtime it can return references to process variables
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethod- Specified by:
getAssociatedEntitiesin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment that process belongs toprocessId- identifier of the process- Returns:
- returns map of all found organizational entities grouped by task they are assigned to
-
getTasksDefinitions
public Collection<UserTaskDefinition> getTasksDefinitions(String deploymentId, String processId)
Description copied from interface:DefinitionServiceReturns all user task definitions defined in given process
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethod- Specified by:
getTasksDefinitionsin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment that process belongs toprocessId- identifier of the process- Returns:
- returns collection of
UserTaskDefinitions or empty collection if none were found
-
getTaskInputMappings
public Map<String,String> getTaskInputMappings(String deploymentId, String processId, String taskName)
Description copied from interface:DefinitionServiceReturns map of data input defined for given user task- key in the map is identifier of dataInput
- value in the map is name dataInput
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethod- Specified by:
getTaskInputMappingsin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment that process belongs toprocessId- identifier of the processtaskName- name of a task the data input should be collected for- Returns:
- returns map of found data inputs or empty map if none were found
-
getTaskOutputMappings
public Map<String,String> getTaskOutputMappings(String deploymentId, String processId, String taskName)
Description copied from interface:DefinitionServiceReturns map of data output defined for given user task- key in the map is identifier of dataOutput
- value in the map is name dataOutput
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethod- Specified by:
getTaskOutputMappingsin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment that process belongs toprocessId- identifier of the processtaskName- name of a task the data output should be collected for- Returns:
- returns map of found data outputs or empty map if none were found
-
onDeploy
public void onDeploy(DeploymentEvent event)
- Specified by:
onDeployin interfaceDeploymentEventListener
-
onUnDeploy
public void onUnDeploy(DeploymentEvent event)
- Specified by:
onUnDeployin interfaceDeploymentEventListener
-
onActivate
public void onActivate(DeploymentEvent event)
- Specified by:
onActivatein interfaceDeploymentEventListener
-
onDeactivate
public void onDeactivate(DeploymentEvent event)
- Specified by:
onDeactivatein interfaceDeploymentEventListener
-
getJavaClasses
public Set<String> getJavaClasses(String deploymentId, String processId)
Description copied from interface:DefinitionServiceReturns a list of all referenced java classes defined in the given process.
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethod- Specified by:
getJavaClassesin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment that process belongs toprocessId- identifier of the process- Returns:
- a list of all referenced classes defined or an empty list if none are found
-
getRuleSets
public Set<String> getRuleSets(String deploymentId, String processId)
Description copied from interface:DefinitionServiceReturns a list of all referenced rules used in the given process.
NOTE: This method assumes process has already been built by invokingbuildProcessDefinitionmethod- Specified by:
getRuleSetsin interfaceDefinitionService- Parameters:
deploymentId- identifier of deployment that process belongs toprocessId- identifier of the process- Returns:
- a list of all referenced rules or an empty list if none are found
-
-