public class ProcessDefinitionBuilder extends Object implements DescriptionBuilder, ContainerBuilder
| Modifier and Type | Field and Description |
|---|---|
protected DesignProcessDefinitionImpl |
process |
| Constructor and Description |
|---|
ProcessDefinitionBuilder() |
protected DesignProcessDefinitionImpl process
public ProcessDefinitionBuilder createNewInstance(String name, String version)
DesignProcessDefinition with the given name and version. This method is the entry point of this builder. It must
be called before any other method. The DesignProcessDefinition building will be completed when the method done() or
getProcess() is called.name - the process nameversion - the process versionpublic DesignProcessDefinition done() throws InvalidProcessDefinitionException
InvalidProcessDefinitionException - when the process definition is inconsistent. The exception contains causespublic BusinessDataDefinitionBuilder addBusinessData(String name, String className, Expression defaultValue)
BusinessDataDefinition on this process.name - The name of the new BusinessDataDefinitionclassName - The complete name of class defining the new BusinessDataDefinition typedefaultValue - The expression representing the default valueBusinessDataDefinitionBuilder containing the new BusinessDataDefinitionprotected void validateBusinessData()
protected void addError(String error)
public DocumentDefinitionBuilder addDocumentDefinition(String name)
ContainerBuilder
Must add also the content if the document is not external. This can be done using
BusinessArchiveBuilder.addDocumentResource(org.bonitasoft.engine.bpm.bar.BarResource)
addDocumentDefinition in interface ContainerBuildername - name of the document definitionpublic DocumentListDefinitionBuilder addDocumentListDefinition(String name)
ContainerBuilderaddDocumentListDefinition in interface ContainerBuildername - the name of the listpublic ProcessDefinitionBuilder addDescription(String description)
DescriptionBuilderaddDescription in interface DescriptionBuilderdescription - the description to set on this element.DescriptionBuilder, to allow to chain the calls.public ProcessDefinitionBuilder addDisplayName(String name)
name - display namepublic ProcessDefinitionBuilder addDisplayDescription(String description)
description - display descriptionpublic void checkName(String name)
public ConnectorDefinitionBuilder addConnector(String name, String connectorId, String version, ConnectorEvent activationEvent)
FlowElementBuilderMust also add connector dependencies and connector implementation descriptor
addConnector in interface FlowElementBuildername - The name the connector instance will useconnectorId - The id of the Connector definition (connector implementation added in BusinessArchive must match this id in
definitionIdversion - The version of the Connector definitionactivationEvent - ConnectorEvent on which the connector will be triggeredBusinessArchiveBuilder.addClasspathResource(org.bonitasoft.engine.bpm.bar.BarResource),
BusinessArchiveBuilder.addConnectorImplementation(org.bonitasoft.engine.bpm.bar.BarResource)public UserTaskDefinitionBuilder addUserTask(String taskName, String actorName)
FlowElementBuilderUserTaskDefinition on this elementaddUserTask in interface FlowElementBuildertaskName - The task nameactorName - The name of the actor that will perform this taskpublic AutomaticTaskDefinitionBuilder addAutomaticTask(String taskName)
FlowElementBuilderaddAutomaticTask in interface FlowElementBuildertaskName - The task namepublic ReceiveTaskDefinitionBuilder addReceiveTask(String taskName, String messageName)
FlowElementBuilderReceiveTaskDefinition on this elementaddReceiveTask in interface FlowElementBuildertaskName - The task namemessageName - The name of message to be receivedpublic SendTaskDefinitionBuilder addSendTask(String taskName, String messageName, Expression targetProcess)
FlowElementBuilderSendTaskDefinition on this elementaddSendTask in interface FlowElementBuildertaskName - The task namemessageName - The name of message to be senttargetProcess - The expression representing the target process namepublic ManualTaskDefinitionBuilder addManualTask(String name, String actorName)
FlowElementBuilderManualTaskDefinition on this elementaddManualTask in interface FlowElementBuildername - The task nameactorName - The name of the actor that will perform this taskpublic TransitionDefinitionBuilder addTransition(String source, String target)
FlowElementBuilderaddTransition in interface FlowElementBuildersource - The source element nametarget - The target element namepublic TransitionDefinitionBuilder addTransition(String source, String target, Expression condition)
FlowElementBuilderaddTransition in interface FlowElementBuildersource - The source element nametarget - The target element namecondition - The transition condition. The transition is taken if and only if the expression is evaluated to Boolean.TRUE.public GatewayDefinitionBuilder addGateway(String name, GatewayType gatewayType)
FlowElementBuilderGatewayDefinition on this elementaddGateway in interface FlowElementBuildername - The gateway namegatewayType - The gateway typepublic StartEventDefinitionBuilder addStartEvent(String name)
FlowElementBuilderStartEventDefinition on this elementaddStartEvent in interface FlowElementBuildername - The start event namepublic EndEventDefinitionBuilder addEndEvent(String name)
FlowElementBuilderEndEventDefinition on this elementaddEndEvent in interface FlowElementBuildername - The end event namepublic IntermediateCatchEventDefinitionBuilder addIntermediateCatchEvent(String name)
FlowElementBuilderIntermediateCatchEventDefinition on this elementaddIntermediateCatchEvent in interface FlowElementBuildername - The intermediate catch event namepublic IntermediateThrowEventDefinitionBuilder addIntermediateThrowEvent(String name)
FlowElementBuilderIntermediateThrowEventDefinition on this elementaddIntermediateThrowEvent in interface FlowElementBuildername - The intermediate throw event namepublic CallActivityBuilder addCallActivity(String name, Expression callableElement, Expression callableElementVersion)
FlowElementBuilderCallActivityDefinition on this elementaddCallActivity in interface FlowElementBuildername - The call activity namecallableElement - The expression representing the name of process to be calledcallableElementVersion - The expression representing the version of process to be calledpublic SubProcessActivityDefinitionBuilder addSubProcess(String name, boolean triggeredByEvent)
FlowElementBuilderSubProcessDefinition on this elementaddSubProcess in interface FlowElementBuildername - The sub process nametriggeredByEvent - true if it's an event sub-process; false if it's a subprocesspublic DataDefinitionBuilder addIntegerData(String name, Expression defaultValue)
FlowElementBuilderaddIntegerData in interface FlowElementBuildername - The data namedefaultValue - The expression representing the default valuepublic DataDefinitionBuilder addLongData(String name, Expression defaultValue)
FlowElementBuilderaddLongData in interface FlowElementBuildername - The data namedefaultValue - The expression representing the default valuepublic DataDefinitionBuilder addShortTextData(String name, Expression defaultValue)
FlowElementBuilderaddShortTextData in interface FlowElementBuildername - The data namedefaultValue - The expression representing the default valuepublic TextDataDefinitionBuilder addLongTextData(String name, Expression defaultValue)
FlowElementBuilderaddLongTextData in interface FlowElementBuildername - The data namedefaultValue - The expression representing the default valuepublic DataDefinitionBuilder addDoubleData(String name, Expression defaultValue)
FlowElementBuilderaddDoubleData in interface FlowElementBuildername - The data namedefaultValue - The expression representing the default valuepublic DataDefinitionBuilder addFloatData(String name, Expression defaultValue)
FlowElementBuilderaddFloatData in interface FlowElementBuildername - The data namedefaultValue - The expression representing the default valuepublic DataDefinitionBuilder addDateData(String name, Expression defaultValue)
FlowElementBuilderaddDateData in interface FlowElementBuildername - The data namedefaultValue - The expression representing the default valuepublic XMLDataDefinitionBuilder addXMLData(String name, Expression defaultValue)
FlowElementBuilderaddXMLData in interface FlowElementBuildername - The data namedefaultValue - The expression representing the default valuepublic DataDefinitionBuilder addBlobData(String name, Expression defaultValue)
FlowElementBuilderaddBlobData in interface FlowElementBuildername - The data namedefaultValue - The expression representing the default valuepublic DataDefinitionBuilder addBooleanData(String name, Expression defaultValue)
FlowElementBuilderaddBooleanData in interface FlowElementBuildername - The data namedefaultValue - The expression representing the default valuepublic DataDefinitionBuilder addData(String name, String className, Expression defaultValue)
FlowElementBuilderaddData in interface FlowElementBuildername - The data nameclassName - The data type class name (i.e. java.lang.String)defaultValue - The expression representing the default valuepublic ActorDefinitionBuilder addActor(String actorName)
actorName - actor nameaddActor(String, boolean)public ActorDefinitionBuilder addActor(String name, boolean initiator)
name - actor nameinitiator - defines whether it's the actor initiator (actor that's able to start the process)public ActorDefinitionBuilder setActorInitiator(String actorName)
actorName - public TransitionDefinitionBuilder addDefaultTransition(String source, String target)
FlowElementBuilderaddDefaultTransition in interface FlowElementBuildersource - The source element nametarget - The target element namepublic DesignProcessDefinition getProcess() throws InvalidProcessDefinitionException
InvalidProcessDefinitionException - when the process definition is inconsistent. The exception contains causespublic ParameterDefinitionBuilder addParameter(String parameterName, String type)
parameterName - The name of the new ParameterDefinitiontype - The type of the new ParameterDefinition (complete class name)ParameterDefinitionBuilder containing the new ParameterDefinitionpublic ProcessDefinitionBuilder addContextEntry(String key, Expression expression)
public ContractDefinitionBuilder addContract()
Copyright © 2018 Bonitasoft S.A.. All rights reserved.