[jbpm-commits] JBoss JBPM SVN: r2889 - in projects/spec/trunk/modules: api/src/main/java/org/jbpm/api/client and 55 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Nov 12 05:08:23 EST 2008
Author: thomas.diesler at jboss.com
Date: 2008-11-12 05:08:22 -0500 (Wed, 12 Nov 2008)
New Revision: 2889
Added:
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Configuration.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfiguration.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/Deployment.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/MessageListener.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/SignalListener.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/UserTaskCallback.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ProcessInstance.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/EventBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/GatewayBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/GroupBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/MessageBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/ObjectNameFactory.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/SignalBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Assignment.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ComplexGateway.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Group.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/InclusiveGateway.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/InputSet.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Message.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/OutputSet.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ParallelGateway.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Participant.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Property.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ReceiveTask.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/SendTask.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Signal.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/UserTask.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessInstanceService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/DeploymentService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/MessageBuilderService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/MessageService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/PersistenceService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/ProcessEngineRegistry.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/SignalBuilderService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/SignalService.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/endevent/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/executioncontext/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/inclusive/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/parallel/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/process/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/service/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/service/signal/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/startevent/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/java/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/java/JavaTaskTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/receive/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/receive/ReceiveTaskTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/send/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/send/SendTaskTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/user/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/user/UserTaskCallbackTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/user/UserTaskTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/transaction/
projects/spec/trunk/modules/ri/src/main/resources/org.jbpm.api.client.Configuration
Removed:
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Deployment.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/MessageListener.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/SignalListener.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/UserTaskCallback.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/config/
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Assignment.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ComplexGateway.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/InclusiveGateway.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/InputSet.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Message.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/OutputSet.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ParallelGateway.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Participant.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Process.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Property.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ReceiveTask.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/SendTask.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Signal.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/UserTask.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/EventBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GatewayBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/MessageBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ObjectNameFactory.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/SignalBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/DeploymentService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageBuilderService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/PersistenceService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessEngineRegistry.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalBuilderService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalService.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/endevent/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/executioncontext/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/inclusive/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/parallel/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/node/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/process/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/signal/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/startevent/
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/ReceiveTaskTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/SendTaskTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/TaskExecutionHandlerTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/UserTaskCallbackTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/UserTaskTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/
projects/spec/trunk/modules/ri/src/main/resources/org.jbpm.api.config.Configuration
Modified:
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Event.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Gate.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ProcessDefinition.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Task.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/TaskBuilder.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/ProcessStructure.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/PropertySupport.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/SignalHandler.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/Token.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ExecutionService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessBuilderService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessDefinitionService.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/APITestCase.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestSetup.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/ProcessCatalog.java
projects/spec/trunk/modules/cts/pom.xml
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/exclusive/ExclusiveGatewayMergeTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/exclusive/ExclusiveGatewaySplitTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/endevent/EndEventMessageTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/executioncontext/ExecutionContextTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/inclusive/InclusiveGatewayMergeTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/inclusive/InclusiveGatewaySplitTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/parallel/ParallelGatewayMergeTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/parallel/ParallelGatewaySplitTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node/NodeInputSetTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node/NodeOutputSetTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node/NodePropertyTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/process/ProcessPropertyTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/service/signal/SignalMultithreadTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/service/signal/SignalServiceTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/startevent/StartEventSignalTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/transaction/TxRequiredMarshallerTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/transaction/TxRequiredTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/process/ProcessDefinitionServiceTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/process/ProcessServiceTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/exclusivechoice/ExclusiveChoiceTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/multichoice/MultiChoiceTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/parallelsplit/ParallelSplitTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequencePersistenceTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequenceTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/simplemerge/SimpleMergeTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/synchronization/SynchronizationTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/data/casedata/CaseDataTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/data/taskdata/TaskDataTest.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBAssignment.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGroup.java
projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBSignal.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AbstractElementImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AssignmentImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ComplexGatewayImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EndEventImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EventImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GateImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GatewayImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GroupImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InputSetImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/MessageImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/OutputSetImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParticipantImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessDefinitionImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessStructureImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertyImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertySupportImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ReceiveTaskImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SendTaskImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SignalImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/StartEventImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/UserTaskImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/EventBuilderImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GatewayBuilderImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GroupBuilderImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/MessageBuilderImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/SignalBuilderImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/TaskBuilderImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/AssignmentInterceptor.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingExecutionContext.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingToken.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/MessageSender.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/PersistenceSessionInterceptor.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RunnableToken.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RuntimeProcess.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RuntimeProcessImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenExecutorImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TransactionInterceptor.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ExecutionServiceImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/HibernatePersistenceServiceImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/InMemoryPersistenceServiceImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/MessageBuilderServiceImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/MessageServiceImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ProcessBuilderServiceImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ProcessServiceImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/SignalBuilderServiceImpl.java
projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/SignalServiceImpl.java
projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ComplexGatewayPersistenceTest.java
projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/EndEventPersistenceTest.java
projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/InclusiveGatewayPersistenceTest.java
projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/NodePersistenceTest.java
projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ParallelGatewayPersistenceTest.java
projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ProcessDefinitionPersistenceTest.java
projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ProcessPersistenceTest.java
projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/StartEventPersistenceTest.java
projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/TaskPersistenceTest.java
projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/UserTaskPersistenceTest.java
projects/spec/trunk/modules/samples/airticket/server/src/main/java/org/jboss/bpm/samples/airticket/AirticketProcessBuilder.java
projects/spec/trunk/modules/samples/airticket/server/src/main/java/org/jboss/bpm/samples/airticket/server/AirticketServiceImpl.java
projects/spec/trunk/modules/samples/airticket/server/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
Log:
Add API preview packages
Added: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Configuration.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Configuration.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Configuration.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.client;
+
+
+// $Id$
+
+/**
+ * The Configuration provides a ProcessEngine through a given
+ * configuration method
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public interface Configuration
+{
+ /**
+ * Create a new instance of ProcessEngine for this configuration
+ * @return The configured instance of a process engine
+ */
+ ProcessEngine getProcessEngine();
+
+ /**
+ * Get a ProcessEngine with a given name from this configuration
+ * @return The configured instance of a process engine
+ */
+ ProcessEngine getProcessEngine(String engineName);
+}
\ No newline at end of file
Property changes on: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Configuration.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Deployment.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Deployment.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Deployment.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,125 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.client;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Serializable;
-import java.net.URI;
-import java.net.URL;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.service.DialectHandler;
-import org.jbpm.api.service.DialectHandlerService;
-import org.jbpm.api.service.ProcessService;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * A deployment, containing all information to create a process that will be deployed to the {@link ProcessService}
- *
- * @author Tom Baeyens
- * @author thomas.diesler at jboss.com
- * @since 25-Sep-2008
- */
-public class Deployment implements Serializable
-{
- private static final long serialVersionUID = 1L;
-
- private String procXML;
- private ProcessDefinition process;
-
- public Deployment(String procXML)
- {
- if (procXML == null)
- throw new IllegalArgumentException("Null process definition");
-
- this.procXML = procXML;
- }
-
- public Deployment(URL procURL) throws IOException
- {
- if (procURL == null)
- throw new IllegalArgumentException("Null process definition");
-
- StringBuilder strBuilder = new StringBuilder();
- BufferedReader br = new BufferedReader(new InputStreamReader(procURL.openStream()));
- String line = br.readLine();
- while (line != null)
- {
- strBuilder.append(line);
- line = br.readLine();
- }
- procXML = strBuilder.toString();
- }
-
- public Deployment(ProcessDefinition procDef)
- {
- this.process = procDef;
- }
-
- public ProcessDefinition getProcessDefinition(ProcessEngine engine)
- {
- if (process == null)
- {
- DialectHandlerService dhService = engine.getService(DialectHandlerService.class);
- if (dhService == null)
- throw new IllegalStateException("DialectHandlerService not registered");
-
- URI nsURI = getNamespaceURI();
- DialectHandler dialectHandler = dhService.getDialectHandler(nsURI);
- if (dialectHandler == null)
- throw new IllegalStateException("Cannot obtain DialectHandler for: " + nsURI);
-
- process = dialectHandler.createProcess(procXML);
- }
- return process;
- }
-
- private URI getNamespaceURI()
- {
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- Document doc;
- try
- {
- DocumentBuilder db = dbf.newDocumentBuilder();
- doc = db.parse(new ByteArrayInputStream(procXML.getBytes()));
- }
- catch (Exception ex)
- {
- throw new IllegalStateException("Cannot parse process descriptor", ex);
- }
-
- Element root = doc.getDocumentElement();
- String nsURI = root.getNamespaceURI();
- if (nsURI == null)
- throw new IllegalStateException("Cannot get namespace URI from root element");
-
- return URI.create(nsURI);
- }
-}
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/MessageListener.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/MessageListener.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/MessageListener.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.client;
-
-import javax.management.ObjectName;
-
-import org.jbpm.api.model.Message;
-
-//$Id$
-
-/**
- * A MessageListener that can be registered with the ProcessEngine
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface MessageListener
-{
- /**
- * Get the id for this listener
- */
- ObjectName getKey();
-
- /**
- * Catch a message from the process that this listener is registered with
- */
- void catchMessage(Message message);
-}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/ProcessEngine.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -29,10 +29,9 @@
import java.util.HashSet;
import java.util.Set;
-import org.jbpm.api.config.Configuration;
-import org.jbpm.api.config.MicrocontainerConfiguration;
-import org.jbpm.api.service.ProcessEngineRegistry;
+import org.jbpm.api.client.internal.MicrocontainerConfiguration;
import org.jbpm.api.service.Service;
+import org.jbpm.api.service.preview.ProcessEngineRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/SignalListener.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/SignalListener.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/SignalListener.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.client;
-
-//$Id$
-
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.service.SignalService;
-
-/**
- * A signal listener that can be registered with the {@link SignalService}
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface SignalListener
-{
- /**
- * Returns true if the listener accepts a given signal
- */
- boolean acceptSignal(Signal signal);
-
- /**
- * Catch a previously accepted signal
- */
- void catchSignal(Signal signal);
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/UserTaskCallback.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/UserTaskCallback.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/UserTaskCallback.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,132 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.client;
-
-//$Id$
-
-import javax.management.ObjectName;
-
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.UserTask;
-import org.jbpm.api.model.builder.MessageBuilder;
-import org.jbpm.api.model.builder.ObjectNameFactory;
-import org.jbpm.api.runtime.Attachments;
-import org.jbpm.api.runtime.BasicAttachments;
-import org.jbpm.api.service.MessageBuilderService;
-import org.jbpm.api.service.MessageService;
-
-/**
- * A callback that can be attached to a {@link UserTask} to facilitate message handling;
- *
- * The callback registers a {@link MessageListener}, extracts the data from the received message
- * and calls the user provided 'callback' method. The response message is then constructed from
- * the user provided data and automatically sent back to the {@link UserTask}.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Oct-2008
- */
-public abstract class UserTaskCallback
-{
- private MessageListener messageListener;
-
- /**
- * Get the associated MessageListener
- */
- public MessageListener getMessageListener()
- {
- return messageListener;
- }
-
- /**
- * Attached this callback to the user task
- */
- public void attach(UserTask userTask)
- {
- userTask.setUserTaskCallback(this);
-
- messageListener = new CallbackMessageListener(userTask);
-
- MessageService msgService = userTask.getProcessEngine().getService(MessageService.class);
- msgService.addMessageListener(messageListener);
- }
-
- /**
- * Detach this callback from the user task
- */
- public void detach(UserTask userTask)
- {
- MessageService msgService = userTask.getProcessEngine().getService(MessageService.class);
- msgService.removeMessageListener(messageListener.getKey());
- }
-
- public abstract void callback(Attachments att);
-
- class CallbackMessageListener implements MessageListener
- {
- private UserTask userTask;
-
- public CallbackMessageListener(UserTask userTask)
- {
- this.userTask = userTask;
- }
-
- @Override
- public void catchMessage(Message msg)
- {
- // Get the message data
- Attachments att = new BasicAttachments();
- for (String propName : msg.getPropertyNames())
- {
- String value = msg.getProperty(propName).getValue();
- att.addAttachment(propName, value);
- }
-
- // Call the user callback
- callback(att);
-
- // Build the response message
- Message msgRef = userTask.getInMessageRef();
- MessageBuilder msgBuilder = MessageBuilderService.locateMessageBuilder();
- msgBuilder.newMessage(msgRef.getName());
- for (String propName : msgRef.getPropertyNames())
- {
- Object value = att.getAttachment(propName);
- if (value == null)
- throw new IllegalStateException("Cannot obtain required property: " + propName);
- msgBuilder.addProperty(propName, value);
- }
- Message resMessage = msgBuilder.getMessage();
-
- MessageService msgService = MessageService.locateMessageService();
-
- ObjectName procID = userTask.getProcess().getKey();
- msgService.sendMessage(procID, userTask.getName(), resMessage);
- }
-
- @Override
- public ObjectName getKey()
- {
- String oname = userTask.getKey().getCanonicalName();
- return ObjectNameFactory.create(oname + ",msgListener=UserTaskCallback");
- }
- }
-}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/config/internal/EmbeddedBeansDeployer.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.client.internal;
+
+// $Id$
+
+import java.net.URL;
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
+import org.jboss.kernel.plugins.util.KernelLocator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Boostrap the Microcontainer
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 27-Jun-2008
+ */
+public class EmbeddedBeansDeployer extends BasicBootstrap
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(EmbeddedBeansDeployer.class);
+
+ private Kernel kernel;
+ private BasicXMLDeployer deployer;
+
+ public EmbeddedBeansDeployer()
+ {
+ // Get or bootstrap the kernel
+ kernel = KernelLocator.getKernel();
+ if (kernel == null)
+ {
+ try
+ {
+ super.bootstrap();
+ kernel = super.getKernel();
+ log.debug("bootstrap kernel: " + kernel);
+ }
+ catch (Throwable e)
+ {
+ throw new IllegalStateException("Cannot bootstrap kernel", e);
+ }
+ }
+ deployer = new BasicXMLDeployer(kernel);
+ }
+
+ /**
+ * Deploy MC beans from URL
+ */
+ public void deploy(URL url)
+ {
+ log.debug("deploy: " + url);
+ try
+ {
+ deployer.deploy(url);
+ deployer.validate();
+
+ // The KernelLocator is expected to get deployed as a bean
+ if (KernelLocator.getKernel() == null)
+ throw new IllegalStateException("KernelLocator not deployed as MC bean");
+
+ }
+ catch (Throwable e)
+ {
+ throw new IllegalStateException("Cannot deploy beans from: " + url, e);
+ }
+ }
+
+ /**
+ * Undeploy MC beans from URL
+ */
+ public void undeploy(URL url)
+ {
+ log.debug("undeploy: " + url);
+ try
+ {
+ deployer.undeploy(url);
+ }
+ catch (Throwable e)
+ {
+ throw new IllegalStateException("Cannot undeploy beans from: " + url, e);
+ }
+ }
+}
\ No newline at end of file
Added: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfiguration.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfiguration.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfiguration.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.client.internal;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jbpm.api.client.Configuration;
+import org.jbpm.api.client.ProcessEngine;
+
+/**
+ * The ProcessEngineProvider provides a ProcessEngine through a given configuration method
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public class MicrocontainerConfiguration implements Configuration
+{
+ /** The process engine bean name - jBPMEngine */
+ public static final String BEAN_NAME = "jBPMProcessEngine";
+ /** The default bean config: jbpm-cfg-beans.xml */
+ public static final String JBPM_ENGINE_CONFIG = "jbpm-cfg-beans.xml";
+
+ // Everything gets deployed through one deployer
+ private static EmbeddedBeansDeployer beansDeployer = new EmbeddedBeansDeployer();
+
+ public Configuration deployDefaultConfig()
+ {
+ URL cfgURL = getDefaultConfigURL();
+ beansDeployer.deploy(cfgURL);
+ return this;
+ }
+
+ public void undeployDefaultConfig()
+ {
+ URL cfgURL = getDefaultConfigURL();
+ beansDeployer.undeploy(cfgURL);
+ }
+
+ public Configuration deployBeansConfig(URL cfgURL)
+ {
+ beansDeployer.deploy(cfgURL);
+ return this;
+ }
+
+ public void undeployBeansConfig(URL cfgURL)
+ {
+ beansDeployer.undeploy(cfgURL);
+ }
+
+ /**
+ * Get the default ProcessEngine from this configuration
+ * @return The configured instance of a process engine
+ */
+ public ProcessEngine getProcessEngine()
+ {
+ return getProcessEngine(BEAN_NAME);
+ }
+
+ /**
+ * Get a ProcessEngine with a given name from this configuration
+ * @return The configured instance of a process engine
+ */
+ @SuppressWarnings("deprecation")
+ public ProcessEngine getProcessEngine(String beanName)
+ {
+ Kernel kernel = KernelLocator.getKernel();
+ if (kernel == null)
+ {
+ deployDefaultConfig();
+ kernel = KernelLocator.getKernel();
+ }
+
+ KernelRegistryEntry entry = kernel.getRegistry().getEntry(beanName);
+ ProcessEngine engine = (ProcessEngine)entry.getTarget();
+ return engine;
+ }
+
+ private URL getDefaultConfigURL()
+ {
+ URL cfgURL = Thread.currentThread().getContextClassLoader().getResource(JBPM_ENGINE_CONFIG);
+ if (cfgURL == null)
+ throw new IllegalStateException("Cannot find resource: " + JBPM_ENGINE_CONFIG);
+ return cfgURL;
+ }
+}
\ No newline at end of file
Property changes on: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfiguration.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/Deployment.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/Deployment.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/Deployment.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/Deployment.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.client.preview;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Serializable;
+import java.net.URI;
+import java.net.URL;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.service.DialectHandler;
+import org.jbpm.api.service.DialectHandlerService;
+import org.jbpm.api.service.ProcessInstanceService;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * A deployment, containing all information to create a process that will be deployed to the {@link ProcessInstanceService}
+ *
+ * @author Tom Baeyens
+ * @author thomas.diesler at jboss.com
+ * @since 25-Sep-2008
+ */
+public class Deployment implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+
+ private String procXML;
+ private ProcessDefinition process;
+
+ public Deployment(String procXML)
+ {
+ if (procXML == null)
+ throw new IllegalArgumentException("Null process definition");
+
+ this.procXML = procXML;
+ }
+
+ public Deployment(URL procURL) throws IOException
+ {
+ if (procURL == null)
+ throw new IllegalArgumentException("Null process definition");
+
+ StringBuilder strBuilder = new StringBuilder();
+ BufferedReader br = new BufferedReader(new InputStreamReader(procURL.openStream()));
+ String line = br.readLine();
+ while (line != null)
+ {
+ strBuilder.append(line);
+ line = br.readLine();
+ }
+ procXML = strBuilder.toString();
+ }
+
+ public Deployment(ProcessDefinition procDef)
+ {
+ this.process = procDef;
+ }
+
+ public ProcessDefinition getProcessDefinition(ProcessEngine engine)
+ {
+ if (process == null)
+ {
+ DialectHandlerService dhService = engine.getService(DialectHandlerService.class);
+ if (dhService == null)
+ throw new IllegalStateException("DialectHandlerService not registered");
+
+ URI nsURI = getNamespaceURI();
+ DialectHandler dialectHandler = dhService.getDialectHandler(nsURI);
+ if (dialectHandler == null)
+ throw new IllegalStateException("Cannot obtain DialectHandler for: " + nsURI);
+
+ process = dialectHandler.createProcess(procXML);
+ }
+ return process;
+ }
+
+ private URI getNamespaceURI()
+ {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
+ Document doc;
+ try
+ {
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ doc = db.parse(new ByteArrayInputStream(procXML.getBytes()));
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Cannot parse process descriptor", ex);
+ }
+
+ Element root = doc.getDocumentElement();
+ String nsURI = root.getNamespaceURI();
+ if (nsURI == null)
+ throw new IllegalStateException("Cannot get namespace URI from root element");
+
+ return URI.create(nsURI);
+ }
+}
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/MessageListener.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/MessageListener.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/MessageListener.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/MessageListener.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.client.preview;
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.model.preview.Message;
+
+//$Id$
+
+/**
+ * A MessageListener that can be registered with the ProcessEngine
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface MessageListener
+{
+ /**
+ * Get the id for this listener
+ */
+ ObjectName getKey();
+
+ /**
+ * Catch a message from the process that this listener is registered with
+ */
+ void catchMessage(Message message);
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/SignalListener.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/SignalListener.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/SignalListener.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/SignalListener.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.client.preview;
+
+//$Id$
+
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.service.preview.SignalService;
+
+/**
+ * A signal listener that can be registered with the {@link SignalService}
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface SignalListener
+{
+ /**
+ * Returns true if the listener accepts a given signal
+ */
+ boolean acceptSignal(Signal signal);
+
+ /**
+ * Catch a previously accepted signal
+ */
+ void catchSignal(Signal signal);
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/UserTaskCallback.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/UserTaskCallback.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/UserTaskCallback.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/preview/UserTaskCallback.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,132 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.client.preview;
+
+//$Id$
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.UserTask;
+import org.jbpm.api.runtime.Attachments;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.service.preview.MessageBuilderService;
+import org.jbpm.api.service.preview.MessageService;
+
+/**
+ * A callback that can be attached to a {@link UserTask} to facilitate message handling;
+ *
+ * The callback registers a {@link MessageListener}, extracts the data from the received message
+ * and calls the user provided 'callback' method. The response message is then constructed from
+ * the user provided data and automatically sent back to the {@link UserTask}.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Oct-2008
+ */
+public abstract class UserTaskCallback
+{
+ private MessageListener messageListener;
+
+ /**
+ * Get the associated MessageListener
+ */
+ public MessageListener getMessageListener()
+ {
+ return messageListener;
+ }
+
+ /**
+ * Attached this callback to the user task
+ */
+ public void attach(UserTask userTask)
+ {
+ userTask.setUserTaskCallback(this);
+
+ messageListener = new CallbackMessageListener(userTask);
+
+ MessageService msgService = userTask.getProcessEngine().getService(MessageService.class);
+ msgService.addMessageListener(messageListener);
+ }
+
+ /**
+ * Detach this callback from the user task
+ */
+ public void detach(UserTask userTask)
+ {
+ MessageService msgService = userTask.getProcessEngine().getService(MessageService.class);
+ msgService.removeMessageListener(messageListener.getKey());
+ }
+
+ public abstract void callback(Attachments att);
+
+ class CallbackMessageListener implements MessageListener
+ {
+ private UserTask userTask;
+
+ public CallbackMessageListener(UserTask userTask)
+ {
+ this.userTask = userTask;
+ }
+
+ @Override
+ public void catchMessage(Message msg)
+ {
+ // Get the message data
+ Attachments att = new BasicAttachments();
+ for (String propName : msg.getPropertyNames())
+ {
+ String value = msg.getProperty(propName).getValue();
+ att.addAttachment(propName, value);
+ }
+
+ // Call the user callback
+ callback(att);
+
+ // Build the response message
+ Message msgRef = userTask.getInMessageRef();
+ MessageBuilder msgBuilder = MessageBuilderService.locateMessageBuilder();
+ msgBuilder.newMessage(msgRef.getName());
+ for (String propName : msgRef.getPropertyNames())
+ {
+ Object value = att.getAttachment(propName);
+ if (value == null)
+ throw new IllegalStateException("Cannot obtain required property: " + propName);
+ msgBuilder.addProperty(propName, value);
+ }
+ Message resMessage = msgBuilder.getMessage();
+
+ MessageService msgService = MessageService.locateMessageService();
+
+ ObjectName procID = userTask.getProcess().getKey();
+ msgService.sendMessage(procID, userTask.getName(), resMessage);
+ }
+
+ @Override
+ public ObjectName getKey()
+ {
+ String oname = userTask.getKey().getCanonicalName();
+ return ObjectNameFactory.create(oname + ",msgListener=UserTaskCallback");
+ }
+ }
+}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Assignment.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Assignment.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Assignment.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-import java.io.Serializable;
-
-
-//$Id$
-
-/**
- * An Assignment, which is used in the definition of attributes for Process,
- * Activity, Event, Gateway, and Gate.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface Assignment extends Serializable
-{
- public enum AssignTime
- {
- Start, End
- }
-
- /**
- * The target for the Assignment MUST be a Property of the Process or the activity
- * itself.
- */
- Property getTo();
-
- /**
- * The Expression MUST be made up of a combination of Values, Properties, and
- * Attributes, which are separated by operators such as add or multiply. The expression
- * language is defined in the ExpressionLanguage attribute of the Business Process
- * Diagram
- */
- Expression getFrom();
-
- /**
- * An Assignment MAY have a AssignTime setting. If the Object is an activity (Task,
- * Sub-Process, or Process), then the Assignment MUST have an AssignTime.
- * A value of Start means that the assignment SHALL occur at the start of the activity.
- * This can be used to assign the higher-level (global) Properties of the Process to the
- * (local) Properties of the activity as an input to the activity.
- * A value of End means that the assignment SHALL occur at the end of the activity.
- * This can be used to assign the (local) Properties of the activity to the higher-level
- * (global) Properties of the Process as an output to the activity.
- */
- AssignTime getAssignTime();
-}
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ComplexGateway.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ComplexGateway.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ComplexGateway.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-// $Id$
-
-/**
- * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex
- * Gateways can also be used to combine a set of linked simple Gateways into a single, more compact situation. Modelers
- * can provide complex expressions that determine the merging and/or splitting behavior of the Gateway.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface ComplexGateway extends Gateway
-{
- /**
- * If there are multiple incoming Sequence Flow, an IncomingCondition expression
- * MUST be set by the modeler. This will consist of an expression that can reference
- * Sequence Flow names and/or Process Properties (Data).
- */
- Expression getIncommingCondition();
-
- /**
- * If there are multiple outgoing Sequence Flow, an OutgoingCondition expression
- * MUST be set by the modeler. This will consist of an expression that can reference
- * (outgoing) Sequence Flow Ids and/or Process Properties (Data).
- */
- Expression getOutgoingCondition();
-
-}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Event.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Event.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Event.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -21,7 +21,10 @@
*/
package org.jbpm.api.model;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Signal;
+
//$Id$
/**
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Gate.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Gate.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Gate.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,6 +25,8 @@
import java.util.List;
+import org.jbpm.api.model.preview.Assignment;
+
/**
* There MAY be zero or more Gates (except where noted below). Zero Gates are
* allowed if the Gateway is last object in a Process flow and there are no Start or
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-//$Id$
-
-import java.io.Serializable;
-
-import org.jbpm.api.model.internal.PropertySupport;
-
-/**
- * The Group object is an Artifact that provides a visual mechanism to group elements of a diagram informally. The
- * grouping is tied to the Category supporting element (which is an attribute of all BPMN elements). That is, a Group is a
- * visual depiction of a single Category. The graphical elements within the Group will be assigned the Category of the
- * Group.
- *
- * @author thomas.diesler at jboss.com
- * @since 30-Oct-2008
- */
-public interface Group extends PropertySupport, Serializable
-{
- /**
- * The supported group types
- */
- enum GroupType { None, Transaction };
-
- /**
- * Name is an attribute that is text description of the Group.
- */
- String getName();
-
- /**
- * Get the group type for this group
- */
- GroupType getGroupType();
-}
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/InclusiveGateway.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/InclusiveGateway.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/InclusiveGateway.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-//$Id$
-
-/**
- * This Decision represents a branching point where Alternatives are based on conditional expressions contained within
- * outgoing Sequence Flow. However, in this case, the True evaluation of one condition expression does not exclude the
- * evaluation of other condition expressions. All Sequence Flow with a True evaluation will be traversed by a Token. In
- * some sense it’s like a grouping of related independent Binary (Yes/No) Decisions--and can be modeled that way. Since
- * each path is independent, all combinations of the paths may be taken, from zero to all. However, it should be
- * designed so that at least one path is taken.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface InclusiveGateway extends Gateway
-{
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/InputSet.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/InputSet.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/InputSet.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-import org.jbpm.api.model.internal.PropertySupport;
-
-
-//$Id$
-
-/**
- * An InputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
- *
- * @author thomas.diesler at jboss.com
- * @since 21-Jul-2008
- */
-public interface InputSet extends PropertySupport
-{
-}
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Message.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Message.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Message.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-import java.io.Serializable;
-
-import org.jbpm.api.model.internal.PropertySupport;
-
-
-
-//$Id$
-
-/**
- * A Message, which is used in the definition of attributes for a StartEvent,
- * EndEvent, IntermediateEvent, Task, and MessageFlow
- *
- * @author thomas.diesler at jboss.com
- * @since 21-Jul-2008
- */
-public interface Message extends PropertySupport, Serializable
-{
- /**
- * Name is an attribute that is text description of the Message.
- */
- String getName();
-
- /**
- * This defines the source of the Message.
- */
- Participant getFromRef();
-
- /**
- * This defines the target of the Message.
- */
- Participant getToRef();
-}
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -27,6 +27,8 @@
import org.jbpm.api.model.internal.AbstractElement;
import org.jbpm.api.model.internal.PropertySupport;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Group;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.SignalHandler;
@@ -47,7 +49,7 @@
/**
* Get the associated process
*/
- Process getProcess();
+ ProcessInstance getProcess();
/**
* Get the unique name.
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/OutputSet.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/OutputSet.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/OutputSet.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-import org.jbpm.api.model.internal.PropertySupport;
-
-
-//$Id$
-
-/**
- * An OuputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
- *
- * @author thomas.diesler at jboss.com
- * @since 21-Jul-2008
- */
-public interface OutputSet extends PropertySupport
-{
-}
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ParallelGateway.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ParallelGateway.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ParallelGateway.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-// $Id$
-
-/**
- * Parallel Gateway is required when two or more Activities need to be executed in parallel.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface ParallelGateway extends Gateway
-{
-
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Participant.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Participant.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Participant.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-//$Id$
-
-import java.io.Serializable;
-
-import javax.management.ObjectName;
-
-
-/**
- * A Participant, which is used in the definition of attributes for a Pool, {@link Message}, and WebService
- *
- * @author thomas.diesler at jboss.com
- * @since 21-Jul-2008
- */
-public interface Participant extends Serializable
-{
- /**
- * The name of this participant
- */
- ObjectName getName();
-}
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Process.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Process.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Process.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-//$Id$
-
-import javax.management.ObjectName;
-
-import org.jbpm.api.model.internal.ProcessStructure;
-import org.jbpm.api.runtime.Attachments;
-
-/**
- * A Process is any Activity performed within a company or organization.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface Process extends ProcessStructure
-{
- /**
- * Defines the status a {@link Process} can be in
- */
- public enum ProcessStatus
- {
- None, Ready, Active, Cancelled, Aborting, Aborted, Completing, Completed
- }
-
- /**
- * Get the associated ProcessDefinition
- */
- ProcessDefinition getProcessDefinition();
-
- /**
- * Get the process state
- */
- ProcessStatus getProcessStatus();
-
- /**
- * Start the process
- */
- ObjectName startProcess();
-
- /**
- * Start the process, with a given execution context
- */
- ObjectName startProcess(Attachments att);
-
- /**
- * All Tokens that are generated at the Start Event for that Process must eventually arrive at an End Event. The
- * Process will be in a running state until all Tokens are consumed. <p/> This method until the process ends without
- * timeout.
- */
- ProcessStatus waitForEnd();
-
- /**
- * All Tokens that are generated at the Start Event for that Process must eventually arrive at an End Event. The
- * Process will be in a running state until all Tokens are consumed. <p/> This method until the process ends with a
- * given timeout.
- */
- ProcessStatus waitForEnd(long timeout);
-}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ProcessDefinition.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ProcessDefinition.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ProcessDefinition.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -36,6 +36,6 @@
/**
* Create a new instance of this process definition
*/
- Process newInstance();
+ ProcessInstance newInstance();
}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ProcessInstance.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Process.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ProcessInstance.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ProcessInstance.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model;
+
+//$Id$
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.runtime.Attachments;
+
+/**
+ * A Process is any Activity performed within a company or organization.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ProcessInstance extends ProcessStructure
+{
+ /**
+ * Defines the status a {@link ProcessInstance} can be in
+ */
+ public enum ProcessStatus
+ {
+ None, Ready, Active, Cancelled, Aborting, Aborted, Completing, Completed
+ }
+
+ /**
+ * Get the associated ProcessDefinition
+ */
+ ProcessDefinition getProcessDefinition();
+
+ /**
+ * Get the process state
+ */
+ ProcessStatus getProcessStatus();
+
+ /**
+ * Start the process
+ */
+ ObjectName startProcess();
+
+ /**
+ * Start the process, with a given execution context
+ */
+ ObjectName startProcess(Attachments att);
+
+ /**
+ * All Tokens that are generated at the Start Event for that Process must eventually arrive at an End Event. The
+ * Process will be in a running state until all Tokens are consumed. <p/> This method until the process ends without
+ * timeout.
+ */
+ ProcessStatus waitForEnd();
+
+ /**
+ * All Tokens that are generated at the Start Event for that Process must eventually arrive at an End Event. The
+ * Process will be in a running state until all Tokens are consumed. <p/> This method until the process ends with a
+ * given timeout.
+ */
+ ProcessStatus waitForEnd(long timeout);
+}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Property.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Property.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Property.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-import java.io.Serializable;
-
-// $Id$
-
-/**
- * A Property, which is used in the definition of attributes for a Process and common activity attributes
- *
- * @author thomas.diesler at jboss.com
- * @since 21-Jul-2008
- */
-public interface Property extends Serializable
-{
- /**
- * Each Property has a Name (e.g., name=”Customer Name”).
- */
- String getName();
-
- /**
- * Get the property value.
- */
- String getValue();
-
- /**
- * If the Correlation attribute is set to True, then the Property is marked to be used for
- * correlation (e.g., for incoming Messages).
- */
- boolean isCorrelation();
-}
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ReceiveTask.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ReceiveTask.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ReceiveTask.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-//$Id$
-
-/**
- * A Receive Task is a simple Task that is designed to wait for a message to arrive from an external participant
- * (relative to the Business Process). Once the message has been received, the Task is completed.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface ReceiveTask extends Task
-{
- /**
- * A Message for the MessageRef attribute MUST be entered. This indicates that the Message will be received by the
- * Task. The Message in this context is equivalent to an in-only message pattern (Web service). One or more
- * corresponding incoming Message Flows MAY be shown on the diagram. However, the display of the Message Flow is not
- * required. The Message is applied to all incoming Message Flow, but can arrive for only one of the incoming Message
- * Flow for a single instance of the Task.
- */
- Message getMessageRef();
-
- /**
- * Receive Tasks can be defined as the instantiation mechanism for the Process with the Instantiate attribute. This
- * attribute MAY be set to true if the Task is the first activity after the Start Event or a starting Task if there is
- * no Start Event (i.e., there are no incoming Sequence Flow). Multiple Tasks MAY have this attribute set to True.
- */
- boolean isInstantiate();
-
- /**
- * This attribute specifies the technology that will be used to send or receive the message. A Web service is the
- * default technology.
- */
- //Implementation getImplementation();
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/SendTask.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/SendTask.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/SendTask.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-//$Id$
-
-/**
- * A Send Task.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface SendTask extends Task
-{
- /**
- * A Message for the MessageRef attribute MUST be entered. This indicates that the Message will be sent by the Task. The Message in this context is equivalent to an
- * out-only message pattern (Web service). One or more corresponding outgoing Message Flow MAY be shown on the diagram. However, the display of the Message Flow is
- * not required. The Message is applied to all outgoing Message Flow and the Message will be sent down all outgoing Message Flow at the completion of a single
- * instance of the Task.
- */
- Message getMessageRef();
-
- /**
- * This attribute specifies the technology that will be used to send or receive the message. A Web service is the default technology.
- */
- // Implementation getImplementation();
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Signal.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Signal.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Signal.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-//$Id$
-
-import java.io.Serializable;
-
-import javax.management.ObjectName;
-
-/**
- * A Signal is like an undirected flare shot up
- * into the air.
- *
- * @author Thomas.Diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface Signal extends Serializable
-{
- /**
- * Defines the types of supported Signals
- */
- enum SignalType
- {
- SYSTEM_START_EVENT_ENTER, SYSTEM_START_EVENT_EXIT, SYSTEM_START_TRIGGER,
- SYSTEM_EVENT_ENTER, SYSTEM_EVENT_EXIT, SYSTEM_EVENT_TRIGGER,
- SYSTEM_END_EVENT_ENTER, SYSTEM_END_EVENT_EXIT, SYSTEM_END_TRIGGER,
- SYSTEM_GATEWAY_ENTER, SYSTEM_GATEWAY_EXIT,
- SYSTEM_PROCESS_ENTER, SYSTEM_PROCESS_EXIT,
- SYSTEM_TASK_ENTER, SYSTEM_TASK_EXIT, SYSTEM_TASK_TRIGGER,
- USER_SIGNAL
- }
-
- /**
- * Get the signal type of this signal
- */
- SignalType getSignalType();
-
- /**
- * Get the sending participant for this signal
- */
- ObjectName getFromRef();
-
- /**
- * Get the optional message associated with this signal
- */
- public String getMessage();
-}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Task.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Task.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Task.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,7 +25,10 @@
import java.util.List;
+import org.jbpm.api.model.preview.InputSet;
+import org.jbpm.api.model.preview.OutputSet;
+
/**
* A Task is an Atomic Activity that is included within a Process.
*
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/UserTask.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/UserTask.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/UserTask.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model;
-
-import org.jbpm.api.client.UserTaskCallback;
-
-//$Id$
-
-/**
- * A User Task is a typical “workflow” task where a human performer performs the Task with the assistance of a software
- * application and is scheduled through a task list manager of some sort.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface UserTask extends Task
-{
- /**
- * Get the associated callback
- */
- UserTaskCallback getUserTaskCallback();
-
- /**
- * Set the associated callback
- */
- void setUserTaskCallback(UserTaskCallback callback);
-
- /**
- * A Message for the OutMessageRef attribute MUST be entered. The sending
- * of this message marks the completion of the Task, which may cause the
- * production of an OutputSet. One or more corresponding outgoing Message
- * Flow MAY be shown on the diagram. However, the display of the Message
- * Flow is not required. The Message is applied to all outgoing Message Flow
- * and the Message will be sent down all outgoing Message Flow at the
- * completion of a single instance of the
- */
- Message getOutMessageRef();
-
- /**
- * A Message for the InMessageRef attribute MUST be entered. This indicates
- * that the Message will be received at the start of the Task, after the
- * availability of any defined InputSets. One or more corresponding incoming
- * Message Flows MAY be shown on the diagram. However, the display of the
- * Message Flow is not required. The Message is applied to all incoming
- * Message Flow, but can arrive for only one of the incoming Message Flow
- * for a single instance of the
- */
- Message getInMessageRef();
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/EventBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/EventBuilder.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/EventBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model.builder;
-
-//$Id$
-
-import org.jbpm.api.model.Signal.SignalType;
-
-/**
- * The EventBuilder can be used to build an Event dynamically.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface EventBuilder extends ProcessBuilder
-{
- /**
- * Add a signal ref to the last added EventDetail
- */
- EventBuilder addSignalRef(SignalType signalType, String signalMessage);
-
- /**
- * Add a message ref to the last added EventDetail
- */
- EventBuilder addMessageRef(String msgName);
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GatewayBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GatewayBuilder.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GatewayBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model.builder;
-
-import org.jbpm.api.model.Gate;
-import org.jbpm.api.model.Expression.ExpressionLanguage;
-
-
-//$Id$
-
-/**
- * The GatewayBuilder can be used to build a Gateway dynamically.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface GatewayBuilder extends ProcessBuilder
-{
- /**
- * Add the default {@link Gate}
- */
- GatewayBuilder addDefaultGate(String targetName);
-
- /**
- * Add a conditional {@link Gate}
- */
- GatewayBuilder addConditionalGate(String targetName, ExpressionLanguage exprLang, String exprBody);
-
- /**
- * Add an unconditional {@link Gate}
- */
- GatewayBuilder addGate(String targetName);
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model.builder;
-
-//$Id$
-
-import org.jbpm.api.model.Group;
-import org.jbpm.api.model.Group.GroupType;
-
-
-/**
- * A GroupBuilder can be used to build a {@link Group} dynamically.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface GroupBuilder
-{
- /** Add a new Group*/
- GroupBuilder newGroup(GroupType type, String name);
-
- /**
- * Add a message property
- */
- GroupBuilder addProperty(String name, Object value);
-
- /**
- * Get the Group
- */
- Group getGroup();
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/MessageBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/MessageBuilder.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/MessageBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model.builder;
-
-//$Id$
-
-import javax.management.ObjectName;
-
-import org.jbpm.api.model.Message;
-
-
-/**
- * A MessageBuilder can be used to build a {@link Message} dynamically.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface MessageBuilder
-{
- /**
- * Create a {@link Message} with a given name
- */
- MessageBuilder newMessage(String msgName);
-
- /**
- * Add a message destination
- */
- MessageBuilder addToRef(ObjectName toRef);
-
- /**
- * Add a message source
- */
- MessageBuilder addFromRef(ObjectName fromRef);
-
- /**
- * Add a message property
- */
- MessageBuilder addProperty(String name, Object value);
-
- /**
- * Add a message property
- */
- MessageBuilder addProperty(String name, Object value, boolean isCorrelation);
-
- /**
- * Get the Message
- */
- Message getMessage();
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ObjectNameFactory.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ObjectNameFactory.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ObjectNameFactory.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model.builder;
-
-// $Id$
-
-import java.util.Hashtable;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-/**
- * A simple factory for creating safe object names.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 08-May-2006
- */
-public class ObjectNameFactory
-{
- public static ObjectName create(String name)
- {
- try
- {
- return new ObjectName(name);
- }
- catch (MalformedObjectNameException e)
- {
- throw new Error("Invalid ObjectName: " + name + "; " + e);
- }
- }
-
- public static ObjectName create(String domain, String key, String value)
- {
- try
- {
- return new ObjectName(domain, key, value);
- }
- catch (MalformedObjectNameException e)
- {
- throw new Error("Invalid ObjectName: " + domain + "," + key + "," + value + "; " + e);
- }
- }
-
- public static ObjectName create(String domain, Hashtable<String, String> table)
- {
- try
- {
- return new ObjectName(domain, table);
- }
- catch (MalformedObjectNameException e)
- {
- throw new Error("Invalid ObjectName: " + domain + "," + table + "; " + e);
- }
- }
-}
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilder.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ProcessBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -23,23 +23,27 @@
//$Id$
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Property;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.Gateway.GatewayType;
-import org.jbpm.api.model.Group.GroupType;
import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.model.builder.preview.EventBuilder;
+import org.jbpm.api.model.builder.preview.GatewayBuilder;
+import org.jbpm.api.model.builder.preview.GroupBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Property;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
+import org.jbpm.api.model.preview.Group.GroupType;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.SignalHandler;
/**
- * The ProcessBuilder can be used to build a {@link Process} dynamically.
+ * The ProcessBuilder can be used to build a {@link ProcessInstance} dynamically.
*
* @author thomas.diesler at jboss.com
* @since 08-Jul-2008
@@ -47,7 +51,7 @@
public interface ProcessBuilder
{
/**
- * Add a {@link Process} with a given name
+ * Add a {@link ProcessInstance} with a given name
*/
ProcessBuilder addProcess(String name);
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/SignalBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/SignalBuilder.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/SignalBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.model.builder;
-
-//$Id$
-
-import javax.management.ObjectName;
-
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Signal.SignalType;
-
-
-/**
- * A SignalBuilder can be used to build a {@link Signal} dynamically.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface SignalBuilder
-{
- /**
- * Create a Signal
- */
- Signal newSignal(SignalType signalType, ObjectName fromRef, String message);
-}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/TaskBuilder.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/TaskBuilder.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/TaskBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -23,8 +23,8 @@
//$Id$
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Expression.ExpressionLanguage;
+import org.jbpm.api.model.preview.Message;
/**
* The TaskBuilder can be used to build a Task dynamically.
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/EventBuilder.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/EventBuilder.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/EventBuilder.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/EventBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.builder.preview;
+
+//$Id$
+
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Signal.SignalType;
+
+/**
+ * The EventBuilder can be used to build an Event dynamically.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface EventBuilder extends ProcessBuilder
+{
+ /**
+ * Add a signal ref to the last added EventDetail
+ */
+ EventBuilder addSignalRef(SignalType signalType, String signalMessage);
+
+ /**
+ * Add a message ref to the last added EventDetail
+ */
+ EventBuilder addMessageRef(String msgName);
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/GatewayBuilder.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GatewayBuilder.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/GatewayBuilder.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/GatewayBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.builder.preview;
+
+import org.jbpm.api.model.Gate;
+import org.jbpm.api.model.Expression.ExpressionLanguage;
+import org.jbpm.api.model.builder.ProcessBuilder;
+
+
+//$Id$
+
+/**
+ * The GatewayBuilder can be used to build a Gateway dynamically.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface GatewayBuilder extends ProcessBuilder
+{
+ /**
+ * Add the default {@link Gate}
+ */
+ GatewayBuilder addDefaultGate(String targetName);
+
+ /**
+ * Add a conditional {@link Gate}
+ */
+ GatewayBuilder addConditionalGate(String targetName, ExpressionLanguage exprLang, String exprBody);
+
+ /**
+ * Add an unconditional {@link Gate}
+ */
+ GatewayBuilder addGate(String targetName);
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/GroupBuilder.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/GroupBuilder.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/GroupBuilder.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/GroupBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.builder.preview;
+
+//$Id$
+
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.Group.GroupType;
+
+
+/**
+ * A GroupBuilder can be used to build a {@link Group} dynamically.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface GroupBuilder
+{
+ /** Add a new Group*/
+ GroupBuilder newGroup(GroupType type, String name);
+
+ /**
+ * Add a message property
+ */
+ GroupBuilder addProperty(String name, Object value);
+
+ /**
+ * Get the Group
+ */
+ Group getGroup();
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/MessageBuilder.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/MessageBuilder.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/MessageBuilder.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/MessageBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.builder.preview;
+
+//$Id$
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.model.preview.Message;
+
+
+/**
+ * A MessageBuilder can be used to build a {@link Message} dynamically.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface MessageBuilder
+{
+ /**
+ * Create a {@link Message} with a given name
+ */
+ MessageBuilder newMessage(String msgName);
+
+ /**
+ * Add a message destination
+ */
+ MessageBuilder addToRef(ObjectName toRef);
+
+ /**
+ * Add a message source
+ */
+ MessageBuilder addFromRef(ObjectName fromRef);
+
+ /**
+ * Add a message property
+ */
+ MessageBuilder addProperty(String name, Object value);
+
+ /**
+ * Add a message property
+ */
+ MessageBuilder addProperty(String name, Object value, boolean isCorrelation);
+
+ /**
+ * Get the Message
+ */
+ Message getMessage();
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/ObjectNameFactory.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/ObjectNameFactory.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/ObjectNameFactory.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/ObjectNameFactory.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.builder.preview;
+
+// $Id$
+
+import java.util.Hashtable;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+/**
+ * A simple factory for creating safe object names.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-May-2006
+ */
+public class ObjectNameFactory
+{
+ public static ObjectName create(String name)
+ {
+ try
+ {
+ return new ObjectName(name);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + name + "; " + e);
+ }
+ }
+
+ public static ObjectName create(String domain, String key, String value)
+ {
+ try
+ {
+ return new ObjectName(domain, key, value);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + domain + "," + key + "," + value + "; " + e);
+ }
+ }
+
+ public static ObjectName create(String domain, Hashtable<String, String> table)
+ {
+ try
+ {
+ return new ObjectName(domain, table);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + domain + "," + table + "; " + e);
+ }
+ }
+}
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/SignalBuilder.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/SignalBuilder.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/SignalBuilder.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/builder/preview/SignalBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.builder.preview;
+
+//$Id$
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
+
+
+/**
+ * A SignalBuilder can be used to build a {@link Signal} dynamically.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface SignalBuilder
+{
+ /**
+ * Create a Signal
+ */
+ Signal newSignal(SignalType signalType, ObjectName fromRef, String message);
+}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/ProcessStructure.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/ProcessStructure.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/ProcessStructure.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,10 +25,10 @@
import java.util.List;
-import org.jbpm.api.model.Assignment;
-import org.jbpm.api.model.Group;
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.Message;
/**
* A ProcessStructure defines the structure of a Process
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/PropertySupport.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/PropertySupport.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/internal/PropertySupport.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,7 +26,7 @@
import java.io.Serializable;
import java.util.Set;
-import org.jbpm.api.model.Property;
+import org.jbpm.api.model.preview.Property;
/**
* Property support
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Assignment.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Assignment.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Assignment.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Assignment.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import java.io.Serializable;
+
+import org.jbpm.api.model.Expression;
+
+
+//$Id$
+
+/**
+ * An Assignment, which is used in the definition of attributes for Process,
+ * Activity, Event, Gateway, and Gate.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Assignment extends Serializable
+{
+ public enum AssignTime
+ {
+ Start, End
+ }
+
+ /**
+ * The target for the Assignment MUST be a Property of the Process or the activity
+ * itself.
+ */
+ Property getTo();
+
+ /**
+ * The Expression MUST be made up of a combination of Values, Properties, and
+ * Attributes, which are separated by operators such as add or multiply. The expression
+ * language is defined in the ExpressionLanguage attribute of the Business Process
+ * Diagram
+ */
+ Expression getFrom();
+
+ /**
+ * An Assignment MAY have a AssignTime setting. If the Object is an activity (Task,
+ * Sub-Process, or Process), then the Assignment MUST have an AssignTime.
+ * A value of Start means that the assignment SHALL occur at the start of the activity.
+ * This can be used to assign the higher-level (global) Properties of the Process to the
+ * (local) Properties of the activity as an input to the activity.
+ * A value of End means that the assignment SHALL occur at the end of the activity.
+ * This can be used to assign the (local) Properties of the activity to the higher-level
+ * (global) Properties of the Process as an output to the activity.
+ */
+ AssignTime getAssignTime();
+}
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ComplexGateway.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ComplexGateway.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ComplexGateway.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ComplexGateway.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import org.jbpm.api.model.Expression;
+import org.jbpm.api.model.Gateway;
+
+// $Id$
+
+/**
+ * A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex
+ * Gateways can also be used to combine a set of linked simple Gateways into a single, more compact situation. Modelers
+ * can provide complex expressions that determine the merging and/or splitting behavior of the Gateway.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ComplexGateway extends Gateway
+{
+ /**
+ * If there are multiple incoming Sequence Flow, an IncomingCondition expression
+ * MUST be set by the modeler. This will consist of an expression that can reference
+ * Sequence Flow names and/or Process Properties (Data).
+ */
+ Expression getIncommingCondition();
+
+ /**
+ * If there are multiple outgoing Sequence Flow, an OutgoingCondition expression
+ * MUST be set by the modeler. This will consist of an expression that can reference
+ * (outgoing) Sequence Flow Ids and/or Process Properties (Data).
+ */
+ Expression getOutgoingCondition();
+
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Group.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Group.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Group.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Group.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+//$Id$
+
+import java.io.Serializable;
+
+import org.jbpm.api.model.internal.PropertySupport;
+
+/**
+ * The Group object is an Artifact that provides a visual mechanism to group elements of a diagram informally. The
+ * grouping is tied to the Category supporting element (which is an attribute of all BPMN elements). That is, a Group is a
+ * visual depiction of a single Category. The graphical elements within the Group will be assigned the Category of the
+ * Group.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 30-Oct-2008
+ */
+public interface Group extends PropertySupport, Serializable
+{
+ /**
+ * The supported group types
+ */
+ enum GroupType { None, Transaction };
+
+ /**
+ * Name is an attribute that is text description of the Group.
+ */
+ String getName();
+
+ /**
+ * Get the group type for this group
+ */
+ GroupType getGroupType();
+}
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/InclusiveGateway.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/InclusiveGateway.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/InclusiveGateway.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/InclusiveGateway.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import org.jbpm.api.model.Gateway;
+
+//$Id$
+
+/**
+ * This Decision represents a branching point where Alternatives are based on conditional expressions contained within
+ * outgoing Sequence Flow. However, in this case, the True evaluation of one condition expression does not exclude the
+ * evaluation of other condition expressions. All Sequence Flow with a True evaluation will be traversed by a Token. In
+ * some sense it’s like a grouping of related independent Binary (Yes/No) Decisions--and can be modeled that way. Since
+ * each path is independent, all combinations of the paths may be taken, from zero to all. However, it should be
+ * designed so that at least one path is taken.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface InclusiveGateway extends Gateway
+{
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/InputSet.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/InputSet.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/InputSet.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/InputSet.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import org.jbpm.api.model.internal.PropertySupport;
+
+
+//$Id$
+
+/**
+ * An InputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 21-Jul-2008
+ */
+public interface InputSet extends PropertySupport
+{
+}
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Message.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Message.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Message.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Message.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import java.io.Serializable;
+
+import org.jbpm.api.model.internal.PropertySupport;
+
+
+
+//$Id$
+
+/**
+ * A Message, which is used in the definition of attributes for a StartEvent,
+ * EndEvent, IntermediateEvent, Task, and MessageFlow
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Message extends PropertySupport, Serializable
+{
+ /**
+ * Name is an attribute that is text description of the Message.
+ */
+ String getName();
+
+ /**
+ * This defines the source of the Message.
+ */
+ Participant getFromRef();
+
+ /**
+ * This defines the target of the Message.
+ */
+ Participant getToRef();
+}
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/OutputSet.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/OutputSet.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/OutputSet.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/OutputSet.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import org.jbpm.api.model.internal.PropertySupport;
+
+
+//$Id$
+
+/**
+ * An OuputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 21-Jul-2008
+ */
+public interface OutputSet extends PropertySupport
+{
+}
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ParallelGateway.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ParallelGateway.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ParallelGateway.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ParallelGateway.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import org.jbpm.api.model.Gateway;
+
+// $Id$
+
+/**
+ * Parallel Gateway is required when two or more Activities need to be executed in parallel.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ParallelGateway extends Gateway
+{
+
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Participant.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Participant.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Participant.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Participant.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+//$Id$
+
+import java.io.Serializable;
+
+import javax.management.ObjectName;
+
+
+
+/**
+ * A Participant, which is used in the definition of attributes for a Pool, {@link Message}, and WebService
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Participant extends Serializable
+{
+ /**
+ * The name of this participant
+ */
+ ObjectName getName();
+}
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Property.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Property.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Property.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Property.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import java.io.Serializable;
+
+// $Id$
+
+/**
+ * A Property, which is used in the definition of attributes for a Process and common activity attributes
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 21-Jul-2008
+ */
+public interface Property extends Serializable
+{
+ /**
+ * Each Property has a Name (e.g., name=”Customer Name”).
+ */
+ String getName();
+
+ /**
+ * Get the property value.
+ */
+ String getValue();
+
+ /**
+ * If the Correlation attribute is set to True, then the Property is marked to be used for
+ * correlation (e.g., for incoming Messages).
+ */
+ boolean isCorrelation();
+}
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ReceiveTask.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/ReceiveTask.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ReceiveTask.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/ReceiveTask.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import org.jbpm.api.model.Task;
+
+//$Id$
+
+/**
+ * A Receive Task is a simple Task that is designed to wait for a message to arrive from an external participant
+ * (relative to the Business Process). Once the message has been received, the Task is completed.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ReceiveTask extends Task
+{
+ /**
+ * A Message for the MessageRef attribute MUST be entered. This indicates that the Message will be received by the
+ * Task. The Message in this context is equivalent to an in-only message pattern (Web service). One or more
+ * corresponding incoming Message Flows MAY be shown on the diagram. However, the display of the Message Flow is not
+ * required. The Message is applied to all incoming Message Flow, but can arrive for only one of the incoming Message
+ * Flow for a single instance of the Task.
+ */
+ Message getMessageRef();
+
+ /**
+ * Receive Tasks can be defined as the instantiation mechanism for the Process with the Instantiate attribute. This
+ * attribute MAY be set to true if the Task is the first activity after the Start Event or a starting Task if there is
+ * no Start Event (i.e., there are no incoming Sequence Flow). Multiple Tasks MAY have this attribute set to True.
+ */
+ boolean isInstantiate();
+
+ /**
+ * This attribute specifies the technology that will be used to send or receive the message. A Web service is the
+ * default technology.
+ */
+ //Implementation getImplementation();
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/SendTask.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/SendTask.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/SendTask.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/SendTask.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import org.jbpm.api.model.Task;
+
+//$Id$
+
+/**
+ * A Send Task.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface SendTask extends Task
+{
+ /**
+ * A Message for the MessageRef attribute MUST be entered. This indicates that the Message will be sent by the Task. The Message in this context is equivalent to an
+ * out-only message pattern (Web service). One or more corresponding outgoing Message Flow MAY be shown on the diagram. However, the display of the Message Flow is
+ * not required. The Message is applied to all outgoing Message Flow and the Message will be sent down all outgoing Message Flow at the completion of a single
+ * instance of the Task.
+ */
+ Message getMessageRef();
+
+ /**
+ * This attribute specifies the technology that will be used to send or receive the message. A Web service is the default technology.
+ */
+ // Implementation getImplementation();
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Signal.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Signal.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Signal.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/Signal.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+//$Id$
+
+import java.io.Serializable;
+
+import javax.management.ObjectName;
+
+/**
+ * A Signal is like an undirected flare shot up
+ * into the air.
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface Signal extends Serializable
+{
+ /**
+ * Defines the types of supported Signals
+ */
+ enum SignalType
+ {
+ SYSTEM_START_EVENT_ENTER, SYSTEM_START_EVENT_EXIT, SYSTEM_START_TRIGGER,
+ SYSTEM_EVENT_ENTER, SYSTEM_EVENT_EXIT, SYSTEM_EVENT_TRIGGER,
+ SYSTEM_END_EVENT_ENTER, SYSTEM_END_EVENT_EXIT, SYSTEM_END_TRIGGER,
+ SYSTEM_GATEWAY_ENTER, SYSTEM_GATEWAY_EXIT,
+ SYSTEM_PROCESS_ENTER, SYSTEM_PROCESS_EXIT,
+ SYSTEM_TASK_ENTER, SYSTEM_TASK_EXIT, SYSTEM_TASK_TRIGGER,
+ USER_SIGNAL
+ }
+
+ /**
+ * Get the signal type of this signal
+ */
+ SignalType getSignalType();
+
+ /**
+ * Get the sending participant for this signal
+ */
+ ObjectName getFromRef();
+
+ /**
+ * Get the optional message associated with this signal
+ */
+ public String getMessage();
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/UserTask.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/UserTask.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/UserTask.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/preview/UserTask.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.model.preview;
+
+import org.jbpm.api.client.preview.UserTaskCallback;
+import org.jbpm.api.model.Task;
+
+//$Id$
+
+/**
+ * A User Task is a typical “workflow” task where a human performer performs the Task with the assistance of a software
+ * application and is scheduled through a task list manager of some sort.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public interface UserTask extends Task
+{
+ /**
+ * Get the associated callback
+ */
+ UserTaskCallback getUserTaskCallback();
+
+ /**
+ * Set the associated callback
+ */
+ void setUserTaskCallback(UserTaskCallback callback);
+
+ /**
+ * A Message for the OutMessageRef attribute MUST be entered. The sending
+ * of this message marks the completion of the Task, which may cause the
+ * production of an OutputSet. One or more corresponding outgoing Message
+ * Flow MAY be shown on the diagram. However, the display of the Message
+ * Flow is not required. The Message is applied to all outgoing Message Flow
+ * and the Message will be sent down all outgoing Message Flow at the
+ * completion of a single instance of the
+ */
+ Message getOutMessageRef();
+
+ /**
+ * A Message for the InMessageRef attribute MUST be entered. This indicates
+ * that the Message will be received at the start of the Task, after the
+ * availability of any defined InputSets. One or more corresponding incoming
+ * Message Flows MAY be shown on the diagram. However, the display of the
+ * Message Flow is not required. The Message is applied to all incoming
+ * Message Flow, but can arrive for only one of the incoming Message Flow
+ * for a single instance of the
+ */
+ Message getInMessageRef();
+}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/SignalHandler.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/SignalHandler.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/SignalHandler.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,7 +25,7 @@
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Signal;
+import org.jbpm.api.model.preview.Signal;
/**
* The {@link ProcessEngine} invokes the SignalHandler on a {@link Node}
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/Token.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/Token.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/runtime/Token.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -24,7 +24,7 @@
// $Id$
import org.hibernate.Session;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.SequenceFlow;
/**
@@ -57,9 +57,9 @@
TokenStatus getTokenStatus();
/**
- * Get the associated {@link Process}
+ * Get the associated {@link ProcessInstance}
*/
- Process getProcess();
+ ProcessInstance getProcess();
/**
* Get the associated {@link ExecutionContext}
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/DeploymentService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/DeploymentService.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/DeploymentService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.service;
-
-//$Id$
-
-import javax.management.ObjectName;
-
-import org.jbpm.api.client.Deployment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The marker interface for all Services
- *
- * @author thomas.diesler at jboss.com
- * @since 25-Sep-2008
- */
-public abstract class DeploymentService implements Service
-{
- // Provide logging
- final static Logger log = LoggerFactory.getLogger(DeploymentService.class);
-
- /**
- * Deploy a new process to the process service.
- */
- ObjectName deploy(Deployment deployment)
- {
- return null;
- }
-}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ExecutionService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ExecutionService.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ExecutionService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,9 +26,9 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.StartEvent;
-import org.jbpm.api.model.Process.ProcessStatus;
+import org.jbpm.api.model.ProcessInstance.ProcessStatus;
import org.jbpm.api.runtime.Attachments;
/**
@@ -60,7 +60,7 @@
* @param proc The Process to start
* @param att The Attachments in the ExecutionContext
*/
- public abstract void startProcess(Process proc, Attachments att);
+ public abstract void startProcess(ProcessInstance proc, Attachments att);
/**
* Start the Process from a given start event
@@ -68,19 +68,19 @@
* @param start The StartEvent that triggers the process
* @param att The Attachments in the ExecutionContext
*/
- public abstract void startProcess(Process proc, StartEvent start, Attachments att);
+ public abstract void startProcess(ProcessInstance proc, StartEvent start, Attachments att);
/**
* All Tokens that are generated at the Start Event for that Process must eventually arrive at an End Event. The
* Process will be in a running state until all Tokens are consumed. <p/> This method until the process ends without
* timeout.
*/
- public abstract ProcessStatus waitForEnd(Process proc);
+ public abstract ProcessStatus waitForEnd(ProcessInstance proc);
/**
* All Tokens that are generated at the Start Event for that Process must eventually arrive at an End Event. The
* Process will be in a running state until all Tokens are consumed. <p/> This method until the process ends with a
* given timeout.
*/
- public abstract ProcessStatus waitForEnd(Process proc, long timeout);
+ public abstract ProcessStatus waitForEnd(ProcessInstance proc, long timeout);
}
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageBuilderService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageBuilderService.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageBuilderService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.service;
-
-//$Id$
-
-import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.builder.MessageBuilder;
-
-/**
- * The MessageBuilder can be used to build a {@link Message} dynamically.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public abstract class MessageBuilderService extends AbstractService
-{
- /**
- * Locate the default MessageBuilder
- */
- public static MessageBuilder locateMessageBuilder()
- {
- ProcessEngine engine = ProcessEngine.getProcessEngine();
- MessageBuilderService builderService = engine.getService(MessageBuilderService.class);
- return builderService.getMessageBuilder();
- }
-
- /**
- * Get the MessageBuilder
- */
- public abstract MessageBuilder getMessageBuilder();
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageService.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,168 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software{} you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation{} either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY{} without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software{} if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.service;
-
-//$Id$
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.jbpm.api.client.MessageListener;
-import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Event;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Participant;
-import org.jbpm.api.model.Process;
-import org.jbpm.api.model.Task;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The ProcessEngine sends messages through the MessageService.
- * <p/>
- * A {@link Message} has an ID and is targeted to a
- * specific Participant. A component can register a {@link MessageListener} with the MessageService.
- *
- * @author thomas.diesler at jboss.com
- * @since 18-Jun-2008
- */
-public abstract class MessageService extends AbstractService
-{
- // Provide logging
- final Logger log = LoggerFactory.getLogger(MessageService.class);
-
- // The set of registered message listeners
- private Map<ObjectName, MessageListener> listeners = new HashMap<ObjectName, MessageListener>();
-
- /**
- * Locate the default MessageService
- */
- public static MessageService locateMessageService()
- {
- ProcessEngine engine = ProcessEngine.getProcessEngine();
- return engine.getService(MessageService.class);
- }
-
- /**
- * Add a MessageListener
- */
- public void addMessageListener(MessageListener listener)
- {
- synchronized (listeners)
- {
- if (hasMessageListener(listener.getKey()))
- throw new IllegalStateException("Listener already registered: " + listener.getKey());
-
- log.debug("addMessageListener: " + listener.getKey());
- listeners.put(listener.getKey(), listener);
- }
- }
-
- /**
- * Get the set of registered MessageListeners
- */
- public Set<MessageListener> getMessageListeners()
- {
- synchronized (listeners)
- {
- HashSet<MessageListener> set = new HashSet<MessageListener>(listeners.values());
- return Collections.unmodifiableSet(set);
- }
- }
-
- /**
- * Get a MessageListener for a given ID
- *
- * @return null if there is none
- */
- public MessageListener getMessageListener(ObjectName listenerID)
- {
- synchronized (listeners)
- {
- return listeners.get(listenerID);
- }
- }
-
- /**
- * True if there is a MessageListener for a given ID
- */
- public boolean hasMessageListener(ObjectName listenerID)
- {
- return getMessageListener(listenerID) != null;
- }
-
- /**
- * Remove an MessageListener
- */
- public void removeMessageListener(ObjectName listenerID)
- {
- synchronized (listeners)
- {
- log.debug("removeMessageListener: " + listenerID);
- listeners.remove(listenerID);
- }
- }
-
- /**
- * Send a message to a given {@link Task} or {@link Event}
- */
- public void sendMessage(ObjectName procID, String targetName, Message msg)
- {
- ProcessService procService = ProcessService.locateProcessService();
- Process proc = procService.getProcess(procID);
- if (proc == null)
- throw new IllegalStateException("Cannot obtain registered process: " + procID);
-
- Node targetNode = proc.getNode(targetName);
- if (targetNode == null)
- throw new IllegalArgumentException("Cannot find message target: " + targetName);
- if (targetNode instanceof MessageListener == false)
- throw new IllegalArgumentException("Message target is not a valid message receiver: " + targetName);
-
- log.debug("sendMessage to " + targetNode + " => " + msg);
- MessageListener msgListener = (MessageListener)targetNode;
- msgListener.catchMessage(msg);
- }
-
- /**
- * Send a message to a given {@link MessageListener}
- */
- public void sendMessage(Message msg)
- {
- Participant toRef = msg.getToRef();
- if (toRef == null)
- throw new IllegalArgumentException("Target entity cannot be null");
-
- MessageListener msgListener = getMessageListener(toRef.getName());
- if (msgListener == null)
- throw new IllegalStateException("No message listener registered for: " + toRef);
-
- log.debug("sendMessage to '" + toRef + "' => " + msg);
- msgListener.catchMessage(msg);
- }
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/PersistenceService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/PersistenceService.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/PersistenceService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.service;
-
-// $Id$
-
-import javax.management.ObjectName;
-
-import org.hibernate.Session;
-import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Node;
-import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Process;
-
-/**
- * The persistence service.
- *
- * @author thomas.diesler at jboss.com
- * @since 17-Sep-2008
- */
-public abstract class PersistenceService extends AbstractService
-{
- /**
- * Locate the default PersistenceService
- */
- public static PersistenceService locatePersistenceService()
- {
- ProcessEngine engine = ProcessEngine.getProcessEngine();
- return engine.getService(PersistenceService.class);
- }
-
- /**
- * Create a new persistence session
- */
- public abstract Session createSession();
-
- /**
- * Save the ProcessDefinition to persistent storage
- */
- public abstract ObjectName saveProcessDefinition(ProcessDefinition procDef);
-
- /**
- * Load the ProcessDefinition from persistent storage
- */
- public abstract ProcessDefinition loadProcessDefinition(ObjectName procDefID);
-
- /**
- * Delete the ProcessDefinition from persistent storage
- */
- public abstract void deleteProcessDefinition(ProcessDefinition procDef);
-
- /**
- * Save the Process to persistent storage
- */
- public abstract ObjectName saveProcess(Process proc);
-
- /**
- * Load the Process from persistent storage
- */
- public abstract Process loadProcess(ObjectName procID);
-
- /**
- * Delete the Process from persistent storage
- */
- public abstract void deleteProcess(Process proc);
-
- /**
- * Save the Node to persistent storage
- */
- public abstract ObjectName saveNode(Session session, Node node);
-
- /**
- * Load the Node from persistent storage
- */
- public abstract <T extends Node> T loadNode(Session session, Class<T> clazz, ObjectName nodeID);
-}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessBuilderService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessBuilderService.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessBuilderService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -24,11 +24,11 @@
//$Id$
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.builder.ProcessBuilder;
/**
- * The ProcessBuilder can be used to build a {@link Process} dynamically.
+ * The ProcessBuilder can be used to build a {@link ProcessInstance} dynamically.
*
* @author thomas.diesler at jboss.com
* @since 08-Jul-2008
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessDefinitionService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessDefinitionService.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessDefinitionService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -37,9 +37,10 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import org.jbpm.api.client.Deployment;
import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.client.preview.Deployment;
import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.service.preview.PersistenceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
@@ -151,7 +152,7 @@
ProcessEngine engine = getProcessEngine();
// Unregister the associated process instances
- ProcessService procService = engine.getService(ProcessService.class);
+ ProcessInstanceService procService = engine.getService(ProcessInstanceService.class);
for (ObjectName procID : procService.getProcesses(procDef.getName(), null))
procService.unregisterProcess(procID);
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessEngineRegistry.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessEngineRegistry.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessEngineRegistry.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.service;
-
-//$Id$
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.jbpm.api.client.ProcessEngine;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A registry of ProcessEngine instances per VM
- *
- * @author thomas.diesler at jboss.com
- * @since 25-Sep-2008
- */
-public final class ProcessEngineRegistry
-{
- // Provide logging
- final static Logger log = LoggerFactory.getLogger(ProcessEngineRegistry.class);
-
- // The process engine registry
- static Map<String, ProcessEngine> engineRegistry = new HashMap<String, ProcessEngine>();
-
- // Hide constructor
- private ProcessEngineRegistry()
- {
- }
-
- /**
- * Get the set of registered engine names
- */
- public static Set<String> getEngineNames()
- {
- return engineRegistry.keySet();
- }
-
- /**
- * Get a process engine by name
- * @return null, if there is no engine registered under the given name
- */
- public static ProcessEngine getEngine(String engineName)
- {
- return engineRegistry.get(engineName);
- }
-
- /**
- * Register a ProcessEngine
- * @throws IllegalStateException If a ProcessEngine with that name is already registered
- */
- public static void registerEngine(ProcessEngine engine)
- {
- if (engineRegistry.get(engine.getName()) != null)
- throw new IllegalStateException("Process engine already registered: " + engine.getName());
-
- log.debug("Register: " + engine);
- engineRegistry.put(engine.getName(), engine);
- }
-
- /**
- * Unregister a ProcessEngine for a given name
- */
- public static ProcessEngine unregisterEngine(String name)
- {
- ProcessEngine pe = engineRegistry.remove(name);
- log.debug("Unregister: " + name + "=" + pe);
- return pe;
- }
-
-
-}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessInstanceService.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessService.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessInstanceService.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessInstanceService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.service;
+
+//$Id$
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.model.ProcessInstance;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.ProcessInstance.ProcessStatus;
+import org.jbpm.api.service.preview.PersistenceService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The ProcessService is the entry point to create, find and otherwise manage processes.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 25-Sep-2008
+ */
+public abstract class ProcessInstanceService extends AbstractService
+{
+ // Provide logging
+ final static Logger log = LoggerFactory.getLogger(ProcessInstanceService.class);
+
+ // The set of registered processes
+ private Map<ObjectName, ProcessInstance> registeredProcs = new HashMap<ObjectName, ProcessInstance>();
+
+ // Hide public constructor
+ protected ProcessInstanceService()
+ {
+ }
+
+ /**
+ * Locate the default ProcessService
+ */
+ public static ProcessInstanceService locateProcessService()
+ {
+ ProcessEngine engine = ProcessEngine.getProcessEngine();
+ return engine.getService(ProcessInstanceService.class);
+ }
+
+ /**
+ * Register a Process.
+ */
+ public ObjectName registerProcess(ProcessInstance proc)
+ {
+ log.debug("registerProcess: " + proc);
+
+ if (getProcess(proc.getKey()) != null)
+ throw new IllegalStateException("Process already registered: " + proc);
+
+ ProcessStatus procStatus = proc.getProcessStatus();
+ ProcessDefinition procDef = proc.getProcessDefinition();
+ ProcessEngine engine = getProcessEngine();
+
+ if (procStatus != ProcessStatus.None)
+ throw new IllegalStateException("Cannot register process in state: " + procStatus);
+
+ // Register the process definition if needed
+ ProcessDefinitionService procDefService = engine.getService(ProcessDefinitionService.class);
+ if (procDefService.getProcessDefinition(procDef.getKey()) == null)
+ procDefService.registerProcessDefinition(procDef);
+
+ // Save the process through the PersistenceService
+ PersistenceService persService = getProcessEngine().getService(PersistenceService.class);
+ ObjectName procID = persService.saveProcess(proc);
+ registeredProcs.put(procID, proc);
+ return procID;
+ }
+
+ /**
+ * Unregister a Process.
+ */
+ public boolean unregisterProcess(ObjectName procID)
+ {
+ boolean removed = false;
+ ProcessInstance proc = registeredProcs.get(procID);
+ if (proc != null)
+ {
+ log.debug("unregisterProcess: " + proc);
+
+ // Delete the process through the PersistenceService
+ PersistenceService persService = getProcessEngine().getService(PersistenceService.class);
+ persService.deleteProcess(proc);
+ registeredProcs.remove(procID);
+ removed = true;
+ }
+ return removed;
+ }
+
+ /**
+ * Get a Process for a given id
+ */
+ public ProcessInstance getProcess(ObjectName procID)
+ {
+ ProcessInstance proc = registeredProcs.get(procID);
+ return proc;
+ }
+
+ /**
+ * Get the set of registered Processes
+ */
+ public Set<ObjectName> getProcesses()
+ {
+ return Collections.unmodifiableSet(registeredProcs.keySet());
+ }
+
+ /**
+ * Find the set of Processes for a given name
+ *
+ * @param name The process name
+ * @param status The optional process status
+ * @return An empty set if the process cannot be found
+ */
+ public Set<ObjectName> getProcesses(String name, ProcessStatus status)
+ {
+ Set<ObjectName> procSet = new HashSet<ObjectName>();
+ for (ProcessInstance auxProc : registeredProcs.values())
+ {
+ if (auxProc.getName().equals(name))
+ {
+ if (status == null || auxProc.getProcessStatus() == status)
+ procSet.add(auxProc.getKey());
+ }
+ }
+ return procSet;
+ }
+}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessService.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,155 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.service;
-
-//$Id$
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Process;
-import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Process.ProcessStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * The ProcessService is the entry point to create, find and otherwise manage processes.
- *
- * @author thomas.diesler at jboss.com
- * @since 25-Sep-2008
- */
-public abstract class ProcessService extends AbstractService
-{
- // Provide logging
- final static Logger log = LoggerFactory.getLogger(ProcessService.class);
-
- // The set of registered processes
- private Map<ObjectName, Process> registeredProcs = new HashMap<ObjectName, Process>();
-
- // Hide public constructor
- protected ProcessService()
- {
- }
-
- /**
- * Locate the default ProcessService
- */
- public static ProcessService locateProcessService()
- {
- ProcessEngine engine = ProcessEngine.getProcessEngine();
- return engine.getService(ProcessService.class);
- }
-
- /**
- * Register a Process.
- */
- public ObjectName registerProcess(Process proc)
- {
- log.debug("registerProcess: " + proc);
-
- if (getProcess(proc.getKey()) != null)
- throw new IllegalStateException("Process already registered: " + proc);
-
- ProcessStatus procStatus = proc.getProcessStatus();
- ProcessDefinition procDef = proc.getProcessDefinition();
- ProcessEngine engine = getProcessEngine();
-
- if (procStatus != ProcessStatus.None)
- throw new IllegalStateException("Cannot register process in state: " + procStatus);
-
- // Register the process definition if needed
- ProcessDefinitionService procDefService = engine.getService(ProcessDefinitionService.class);
- if (procDefService.getProcessDefinition(procDef.getKey()) == null)
- procDefService.registerProcessDefinition(procDef);
-
- // Save the process through the PersistenceService
- PersistenceService persService = getProcessEngine().getService(PersistenceService.class);
- ObjectName procID = persService.saveProcess(proc);
- registeredProcs.put(procID, proc);
- return procID;
- }
-
- /**
- * Unregister a Process.
- */
- public boolean unregisterProcess(ObjectName procID)
- {
- boolean removed = false;
- Process proc = registeredProcs.get(procID);
- if (proc != null)
- {
- log.debug("unregisterProcess: " + proc);
-
- // Delete the process through the PersistenceService
- PersistenceService persService = getProcessEngine().getService(PersistenceService.class);
- persService.deleteProcess(proc);
- registeredProcs.remove(procID);
- removed = true;
- }
- return removed;
- }
-
- /**
- * Get a Process for a given id
- */
- public Process getProcess(ObjectName procID)
- {
- Process proc = registeredProcs.get(procID);
- return proc;
- }
-
- /**
- * Get the set of registered Processes
- */
- public Set<ObjectName> getProcesses()
- {
- return Collections.unmodifiableSet(registeredProcs.keySet());
- }
-
- /**
- * Find the set of Processes for a given name
- *
- * @param name The process name
- * @param status The optional process status
- * @return An empty set if the process cannot be found
- */
- public Set<ObjectName> getProcesses(String name, ProcessStatus status)
- {
- Set<ObjectName> procSet = new HashSet<ObjectName>();
- for (Process auxProc : registeredProcs.values())
- {
- if (auxProc.getName().equals(name))
- {
- if (status == null || auxProc.getProcessStatus() == status)
- procSet.add(auxProc.getKey());
- }
- }
- return procSet;
- }
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalBuilderService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalBuilderService.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalBuilderService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.service;
-
-//$Id$
-
-import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.builder.SignalBuilder;
-
-/**
- * The SignalBuilder can be used to build a {@link Signal} dynamically.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public abstract class SignalBuilderService extends AbstractService
-{
- /**
- * Locate the default SignalBuilder
- */
- public static SignalBuilder locateSignalBuilder()
- {
- ProcessEngine engine = ProcessEngine.getProcessEngine();
- SignalBuilderService builderService = engine.getService(SignalBuilderService.class);
- return builderService.getSignalBuilder();
- }
-
- /**
- * Get the SignalBuilder
- */
- public abstract SignalBuilder getSignalBuilder();
-}
\ No newline at end of file
Deleted: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalService.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalService.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,135 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.api.service;
-
-//$Id$
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.client.SignalListener;
-import org.jbpm.api.model.Signal;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A {@link Signal} is like an undirected flare shot up
- * into the air. A component can register a {@link SignalListener} with the SignalService.
- *
- * @author thomas.diesler at jboss.com
- * @since 18-Jun-2008
- */
-public abstract class SignalService extends AbstractService
-{
- // provide logging
- final static Logger log = LoggerFactory.getLogger(SignalService.class);
-
- // The map of registered signal listeners
- private Set<SignalListener> listeners = new HashSet<SignalListener>();
-
- /**
- * Locate the default SignalService
- */
- public static SignalService locateSignalService()
- {
- ProcessEngine engine = ProcessEngine.getProcessEngine();
- return engine.getService(SignalService.class);
- }
-
- /**
- * Add a SignalListener for a given source
- */
- public void addSignalListener(SignalListener listener)
- {
- synchronized (listeners)
- {
- log.debug("addSignalListener: " + listener);
- listeners.add(listener);
- }
- }
-
- /**
- * Get the set of registered SignalListeners
- */
- public Set<SignalListener> getSignalListeners()
- {
- synchronized (listeners)
- {
- HashSet<SignalListener> set = new HashSet<SignalListener>(listeners);
- return Collections.unmodifiableSet(set);
- }
- }
-
- /**
- * Remove a SignalListener for a given source
- */
- public void removeSignalListener(SignalListener listener)
- {
- synchronized (listeners)
- {
- log.debug("removeSignalListener: " + listener);
- listeners.remove(listener);
- }
- }
-
- /**
- * Throw a signal to all registered listeners
- */
- public void throwSignal(Signal signal)
- {
- log.debug("throwSignal: " + signal);
- Set<SignalListener> currentSet = getSignalListeners();
- for (SignalListener listener : currentSet)
- {
- if (failsafeAccept(listener, signal))
- failsafeThrow(listener, signal);
- }
- }
-
- private boolean failsafeAccept(SignalListener listener, Signal signal)
- {
- try
- {
- boolean accept = listener.acceptSignal(signal);
- return accept;
- }
- catch (RuntimeException rte)
- {
- log.error("Signal processing error", rte);
- return false;
- }
- }
-
- private void failsafeThrow(SignalListener listener, Signal signal)
- {
- try
- {
- listener.catchSignal(signal);
- }
- catch (RuntimeException rte)
- {
- log.error("Signal processing error", rte);
- }
- }
-}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/DeploymentService.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/DeploymentService.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/DeploymentService.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/DeploymentService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.service.preview;
+
+//$Id$
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.client.preview.Deployment;
+import org.jbpm.api.service.Service;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The marker interface for all Services
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 25-Sep-2008
+ */
+public abstract class DeploymentService implements Service
+{
+ // Provide logging
+ final static Logger log = LoggerFactory.getLogger(DeploymentService.class);
+
+ /**
+ * Deploy a new process to the process service.
+ */
+ ObjectName deploy(Deployment deployment)
+ {
+ return null;
+ }
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/MessageBuilderService.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageBuilderService.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/MessageBuilderService.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/MessageBuilderService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.service.preview;
+
+//$Id$
+
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.service.AbstractService;
+
+/**
+ * The MessageBuilder can be used to build a {@link Message} dynamically.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class MessageBuilderService extends AbstractService
+{
+ /**
+ * Locate the default MessageBuilder
+ */
+ public static MessageBuilder locateMessageBuilder()
+ {
+ ProcessEngine engine = ProcessEngine.getProcessEngine();
+ MessageBuilderService builderService = engine.getService(MessageBuilderService.class);
+ return builderService.getMessageBuilder();
+ }
+
+ /**
+ * Get the MessageBuilder
+ */
+ public abstract MessageBuilder getMessageBuilder();
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/MessageService.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/MessageService.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/MessageService.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/MessageService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,170 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software{} you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation{} either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY{} without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software{} if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.service.preview;
+
+//$Id$
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.client.preview.MessageListener;
+import org.jbpm.api.model.Event;
+import org.jbpm.api.model.Node;
+import org.jbpm.api.model.ProcessInstance;
+import org.jbpm.api.model.Task;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Participant;
+import org.jbpm.api.service.AbstractService;
+import org.jbpm.api.service.ProcessInstanceService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The ProcessEngine sends messages through the MessageService.
+ * <p/>
+ * A {@link Message} has an ID and is targeted to a
+ * specific Participant. A component can register a {@link MessageListener} with the MessageService.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public abstract class MessageService extends AbstractService
+{
+ // Provide logging
+ final Logger log = LoggerFactory.getLogger(MessageService.class);
+
+ // The set of registered message listeners
+ private Map<ObjectName, MessageListener> listeners = new HashMap<ObjectName, MessageListener>();
+
+ /**
+ * Locate the default MessageService
+ */
+ public static MessageService locateMessageService()
+ {
+ ProcessEngine engine = ProcessEngine.getProcessEngine();
+ return engine.getService(MessageService.class);
+ }
+
+ /**
+ * Add a MessageListener
+ */
+ public void addMessageListener(MessageListener listener)
+ {
+ synchronized (listeners)
+ {
+ if (hasMessageListener(listener.getKey()))
+ throw new IllegalStateException("Listener already registered: " + listener.getKey());
+
+ log.debug("addMessageListener: " + listener.getKey());
+ listeners.put(listener.getKey(), listener);
+ }
+ }
+
+ /**
+ * Get the set of registered MessageListeners
+ */
+ public Set<MessageListener> getMessageListeners()
+ {
+ synchronized (listeners)
+ {
+ HashSet<MessageListener> set = new HashSet<MessageListener>(listeners.values());
+ return Collections.unmodifiableSet(set);
+ }
+ }
+
+ /**
+ * Get a MessageListener for a given ID
+ *
+ * @return null if there is none
+ */
+ public MessageListener getMessageListener(ObjectName listenerID)
+ {
+ synchronized (listeners)
+ {
+ return listeners.get(listenerID);
+ }
+ }
+
+ /**
+ * True if there is a MessageListener for a given ID
+ */
+ public boolean hasMessageListener(ObjectName listenerID)
+ {
+ return getMessageListener(listenerID) != null;
+ }
+
+ /**
+ * Remove an MessageListener
+ */
+ public void removeMessageListener(ObjectName listenerID)
+ {
+ synchronized (listeners)
+ {
+ log.debug("removeMessageListener: " + listenerID);
+ listeners.remove(listenerID);
+ }
+ }
+
+ /**
+ * Send a message to a given {@link Task} or {@link Event}
+ */
+ public void sendMessage(ObjectName procID, String targetName, Message msg)
+ {
+ ProcessInstanceService procService = ProcessInstanceService.locateProcessService();
+ ProcessInstance proc = procService.getProcess(procID);
+ if (proc == null)
+ throw new IllegalStateException("Cannot obtain registered process: " + procID);
+
+ Node targetNode = proc.getNode(targetName);
+ if (targetNode == null)
+ throw new IllegalArgumentException("Cannot find message target: " + targetName);
+ if (targetNode instanceof MessageListener == false)
+ throw new IllegalArgumentException("Message target is not a valid message receiver: " + targetName);
+
+ log.debug("sendMessage to " + targetNode + " => " + msg);
+ MessageListener msgListener = (MessageListener)targetNode;
+ msgListener.catchMessage(msg);
+ }
+
+ /**
+ * Send a message to a given {@link MessageListener}
+ */
+ public void sendMessage(Message msg)
+ {
+ Participant toRef = msg.getToRef();
+ if (toRef == null)
+ throw new IllegalArgumentException("Target entity cannot be null");
+
+ MessageListener msgListener = getMessageListener(toRef.getName());
+ if (msgListener == null)
+ throw new IllegalStateException("No message listener registered for: " + toRef);
+
+ log.debug("sendMessage to '" + toRef + "' => " + msg);
+ msgListener.catchMessage(msg);
+ }
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/PersistenceService.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/PersistenceService.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/PersistenceService.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/PersistenceService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.service.preview;
+
+// $Id$
+
+import javax.management.ObjectName;
+
+import org.hibernate.Session;
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.model.Node;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.ProcessInstance;
+import org.jbpm.api.service.AbstractService;
+
+/**
+ * The persistence service.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 17-Sep-2008
+ */
+public abstract class PersistenceService extends AbstractService
+{
+ /**
+ * Locate the default PersistenceService
+ */
+ public static PersistenceService locatePersistenceService()
+ {
+ ProcessEngine engine = ProcessEngine.getProcessEngine();
+ return engine.getService(PersistenceService.class);
+ }
+
+ /**
+ * Create a new persistence session
+ */
+ public abstract Session createSession();
+
+ /**
+ * Save the ProcessDefinition to persistent storage
+ */
+ public abstract ObjectName saveProcessDefinition(ProcessDefinition procDef);
+
+ /**
+ * Load the ProcessDefinition from persistent storage
+ */
+ public abstract ProcessDefinition loadProcessDefinition(ObjectName procDefID);
+
+ /**
+ * Delete the ProcessDefinition from persistent storage
+ */
+ public abstract void deleteProcessDefinition(ProcessDefinition procDef);
+
+ /**
+ * Save the Process to persistent storage
+ */
+ public abstract ObjectName saveProcess(ProcessInstance proc);
+
+ /**
+ * Load the Process from persistent storage
+ */
+ public abstract ProcessInstance loadProcess(ObjectName procID);
+
+ /**
+ * Delete the Process from persistent storage
+ */
+ public abstract void deleteProcess(ProcessInstance proc);
+
+ /**
+ * Save the Node to persistent storage
+ */
+ public abstract ObjectName saveNode(Session session, Node node);
+
+ /**
+ * Load the Node from persistent storage
+ */
+ public abstract <T extends Node> T loadNode(Session session, Class<T> clazz, ObjectName nodeID);
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/ProcessEngineRegistry.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/ProcessEngineRegistry.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/ProcessEngineRegistry.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/ProcessEngineRegistry.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.service.preview;
+
+//$Id$
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.jbpm.api.client.ProcessEngine;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A registry of ProcessEngine instances per VM
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 25-Sep-2008
+ */
+public final class ProcessEngineRegistry
+{
+ // Provide logging
+ final static Logger log = LoggerFactory.getLogger(ProcessEngineRegistry.class);
+
+ // The process engine registry
+ static Map<String, ProcessEngine> engineRegistry = new HashMap<String, ProcessEngine>();
+
+ // Hide constructor
+ private ProcessEngineRegistry()
+ {
+ }
+
+ /**
+ * Get the set of registered engine names
+ */
+ public static Set<String> getEngineNames()
+ {
+ return engineRegistry.keySet();
+ }
+
+ /**
+ * Get a process engine by name
+ * @return null, if there is no engine registered under the given name
+ */
+ public static ProcessEngine getEngine(String engineName)
+ {
+ return engineRegistry.get(engineName);
+ }
+
+ /**
+ * Register a ProcessEngine
+ * @throws IllegalStateException If a ProcessEngine with that name is already registered
+ */
+ public static void registerEngine(ProcessEngine engine)
+ {
+ if (engineRegistry.get(engine.getName()) != null)
+ throw new IllegalStateException("Process engine already registered: " + engine.getName());
+
+ log.debug("Register: " + engine);
+ engineRegistry.put(engine.getName(), engine);
+ }
+
+ /**
+ * Unregister a ProcessEngine for a given name
+ */
+ public static ProcessEngine unregisterEngine(String name)
+ {
+ ProcessEngine pe = engineRegistry.remove(name);
+ log.debug("Unregister: " + name + "=" + pe);
+ return pe;
+ }
+
+
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/SignalBuilderService.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalBuilderService.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/SignalBuilderService.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/SignalBuilderService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.service.preview;
+
+//$Id$
+
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.model.builder.preview.SignalBuilder;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.service.AbstractService;
+
+/**
+ * The SignalBuilder can be used to build a {@link Signal} dynamically.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2008
+ */
+public abstract class SignalBuilderService extends AbstractService
+{
+ /**
+ * Locate the default SignalBuilder
+ */
+ public static SignalBuilder locateSignalBuilder()
+ {
+ ProcessEngine engine = ProcessEngine.getProcessEngine();
+ SignalBuilderService builderService = engine.getService(SignalBuilderService.class);
+ return builderService.getSignalBuilder();
+ }
+
+ /**
+ * Get the SignalBuilder
+ */
+ public abstract SignalBuilder getSignalBuilder();
+}
\ No newline at end of file
Copied: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/SignalService.java (from rev 2888, projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/SignalService.java)
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/SignalService.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/service/preview/SignalService.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,136 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.api.service.preview;
+
+//$Id$
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.client.preview.SignalListener;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.service.AbstractService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A {@link Signal} is like an undirected flare shot up
+ * into the air. A component can register a {@link SignalListener} with the SignalService.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jun-2008
+ */
+public abstract class SignalService extends AbstractService
+{
+ // provide logging
+ final static Logger log = LoggerFactory.getLogger(SignalService.class);
+
+ // The map of registered signal listeners
+ private Set<SignalListener> listeners = new HashSet<SignalListener>();
+
+ /**
+ * Locate the default SignalService
+ */
+ public static SignalService locateSignalService()
+ {
+ ProcessEngine engine = ProcessEngine.getProcessEngine();
+ return engine.getService(SignalService.class);
+ }
+
+ /**
+ * Add a SignalListener for a given source
+ */
+ public void addSignalListener(SignalListener listener)
+ {
+ synchronized (listeners)
+ {
+ log.debug("addSignalListener: " + listener);
+ listeners.add(listener);
+ }
+ }
+
+ /**
+ * Get the set of registered SignalListeners
+ */
+ public Set<SignalListener> getSignalListeners()
+ {
+ synchronized (listeners)
+ {
+ HashSet<SignalListener> set = new HashSet<SignalListener>(listeners);
+ return Collections.unmodifiableSet(set);
+ }
+ }
+
+ /**
+ * Remove a SignalListener for a given source
+ */
+ public void removeSignalListener(SignalListener listener)
+ {
+ synchronized (listeners)
+ {
+ log.debug("removeSignalListener: " + listener);
+ listeners.remove(listener);
+ }
+ }
+
+ /**
+ * Throw a signal to all registered listeners
+ */
+ public void throwSignal(Signal signal)
+ {
+ log.debug("throwSignal: " + signal);
+ Set<SignalListener> currentSet = getSignalListeners();
+ for (SignalListener listener : currentSet)
+ {
+ if (failsafeAccept(listener, signal))
+ failsafeThrow(listener, signal);
+ }
+ }
+
+ private boolean failsafeAccept(SignalListener listener, Signal signal)
+ {
+ try
+ {
+ boolean accept = listener.acceptSignal(signal);
+ return accept;
+ }
+ catch (RuntimeException rte)
+ {
+ log.error("Signal processing error", rte);
+ return false;
+ }
+ }
+
+ private void failsafeThrow(SignalListener listener, Signal signal)
+ {
+ try
+ {
+ listener.catchSignal(signal);
+ }
+ catch (RuntimeException rte)
+ {
+ log.error("Signal processing error", rte);
+ }
+ }
+}
\ No newline at end of file
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/APITestCase.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/APITestCase.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/APITestCase.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -30,7 +30,7 @@
import junit.framework.TestCase;
import org.jbpm.api.Constants;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/CTSTestCase.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -35,20 +35,20 @@
import javax.management.ObjectName;
import org.jbpm.api.BPMException;
-import org.jbpm.api.client.MessageListener;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.client.SignalListener;
-import org.jbpm.api.model.Message;
+import org.jbpm.api.client.preview.MessageListener;
+import org.jbpm.api.client.preview.SignalListener;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Signal.SignalType;
-import org.jbpm.api.model.builder.SignalBuilder;
+import org.jbpm.api.model.builder.preview.SignalBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.api.service.DialectHandler;
import org.jbpm.api.service.DialectHandlerService;
-import org.jbpm.api.service.MessageService;
import org.jbpm.api.service.ProcessDefinitionService;
-import org.jbpm.api.service.SignalBuilderService;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.service.preview.MessageService;
+import org.jbpm.api.service.preview.SignalBuilderService;
+import org.jbpm.api.service.preview.SignalService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestSetup.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestSetup.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/ConfigurationTestSetup.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -24,8 +24,8 @@
import java.net.URL;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.config.MicrocontainerConfiguration;
-import org.jbpm.api.service.ProcessEngineRegistry;
+import org.jbpm.api.client.internal.MicrocontainerConfiguration;
+import org.jbpm.api.service.preview.ProcessEngineRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -31,7 +31,7 @@
import javax.naming.InitialContext;
import javax.naming.NamingException;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
/**
* An integration test helper that deals with test deployment/undeployment, etc.
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/ProcessCatalog.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/ProcessCatalog.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/ProcessCatalog.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,16 +26,16 @@
import junit.framework.TestCase;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Assignment;
import org.jbpm.api.model.EndEvent;
import org.jbpm.api.model.Expression;
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.model.SequenceFlow;
import org.jbpm.api.model.StartEvent;
import org.jbpm.api.model.Task;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
import org.jbpm.api.service.ProcessBuilderService;
/**
Modified: projects/spec/trunk/modules/cts/pom.xml
===================================================================
--- projects/spec/trunk/modules/cts/pom.xml 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/pom.xml 2008-11-12 10:08:22 UTC (rev 2889)
@@ -46,6 +46,8 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
+ <exclude>org/jbpm/test/cts/preview/**</exclude>
+ <exclude>org/jbpm/test/cts/pattern/**</exclude>
</excludes>
</configuration>
</plugin>
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/exclusive/ExclusiveGatewayMergeTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/exclusive/ExclusiveGatewayMergeTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/exclusive/ExclusiveGatewayMergeTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,11 +26,11 @@
import java.io.IOException;
import java.util.List;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Gateway.GatewayType;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -47,7 +47,7 @@
public void testMerge() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
// Start the process
proc.startProcess();
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/exclusive/ExclusiveGatewaySplitTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/exclusive/ExclusiveGatewaySplitTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/exclusive/ExclusiveGatewaySplitTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,13 +26,13 @@
import java.io.IOException;
import java.util.List;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.Gateway.GatewayType;
-import org.jbpm.api.model.builder.GatewayBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.GatewayBuilder;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.runtime.BasicAttachments;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -49,7 +49,7 @@
public void testGateA() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("foo", "5");
@@ -64,7 +64,7 @@
public void testGateB() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("foo", "15");
@@ -79,7 +79,7 @@
public void testInvalidGate() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("foo", "10");
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/endevent (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/endevent)
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/endevent/EndEventMessageTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/endevent/EndEventMessageTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/endevent/EndEventMessageTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,18 +19,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.endevent;
+package org.jbpm.test.cts.preview.endevent;
// $Id$
import java.io.IOException;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.model.Event.EventDetailType;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
import org.jbpm.api.runtime.BasicAttachments;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -46,7 +46,7 @@
public void testStart() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
// Start the process
BasicAttachments att = new BasicAttachments();
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/executioncontext (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/executioncontext)
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/executioncontext/ExecutionContextTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/executioncontext/ExecutionContextTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/executioncontext/ExecutionContextTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.executioncontext;
+package org.jbpm.test.cts.preview.executioncontext;
// $Id$
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/inclusive (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/inclusive)
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/inclusive/InclusiveGatewayMergeTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/inclusive/InclusiveGatewayMergeTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/inclusive/InclusiveGatewayMergeTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,18 +19,18 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.gateway.inclusive;
+package org.jbpm.test.cts.preview.gateway.inclusive;
// $Id$
import java.io.IOException;
import java.util.List;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Gateway.GatewayType;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -46,7 +46,7 @@
public void testSimpleMerge() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
// Start the process
proc.startProcess();
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/inclusive/InclusiveGatewaySplitTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/inclusive/InclusiveGatewaySplitTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/inclusive/InclusiveGatewaySplitTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,20 +19,20 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.gateway.inclusive;
+package org.jbpm.test.cts.preview.gateway.inclusive;
// $Id$
import java.io.IOException;
import java.util.List;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.Gateway.GatewayType;
-import org.jbpm.api.model.builder.GatewayBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.GatewayBuilder;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.runtime.BasicAttachments;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -49,7 +49,7 @@
public void testGateA() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("foo", "5");
@@ -63,7 +63,7 @@
public void testGateB() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("foo", "15");
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/parallel (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/parallel)
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/parallel/ParallelGatewayMergeTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/parallel/ParallelGatewayMergeTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/parallel/ParallelGatewayMergeTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,21 +19,21 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.gateway.parallel;
+package org.jbpm.test.cts.preview.gateway.parallel;
// $Id$
import java.io.IOException;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.Gateway.GatewayType;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -50,7 +50,7 @@
public void testParallelMerge() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
// Start the process
proc.startProcess();
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/parallel/ParallelGatewaySplitTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/parallel/ParallelGatewaySplitTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/gateway/parallel/ParallelGatewaySplitTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.gateway.parallel;
+package org.jbpm.test.cts.preview.gateway.parallel;
// $Id$
@@ -28,12 +28,12 @@
import javax.management.ObjectName;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Gateway.GatewayType;
-import org.jbpm.api.model.Signal.SignalType;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -49,7 +49,7 @@
public void testParallelSplit() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
proc.startProcess();
proc.waitForEnd(5000);
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/node)
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node/NodeInputSetTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/node/NodeInputSetTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node/NodeInputSetTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,19 +19,19 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.node;
+package org.jbpm.test.cts.preview.node;
// $Id$
import java.io.IOException;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.model.Event.EventDetailType;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
import org.jbpm.api.runtime.BasicAttachments;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -51,7 +51,7 @@
public void testValidProps() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("frog", "kermit");
@@ -66,7 +66,7 @@
public void testInvalidProps() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("pig", "piggy");
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node/NodeOutputSetTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/node/NodeOutputSetTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node/NodeOutputSetTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,19 +19,19 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.node;
+package org.jbpm.test.cts.preview.node;
// $Id$
import java.io.IOException;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.model.Event.EventDetailType;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -51,7 +51,7 @@
public void testValidProps() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
proc.startProcess();
proc.waitForEnd(5000);
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node/NodePropertyTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/node/NodePropertyTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/node/NodePropertyTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,21 +19,21 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.node;
+package org.jbpm.test.cts.preview.node;
// $Id$
import java.io.IOException;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -52,7 +52,7 @@
public void testActivityPropertyRead() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
proc.startProcess();
proc.waitForEnd(5000);
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/process (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/process)
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/process/ProcessPropertyTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/process/ProcessPropertyTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/process/ProcessPropertyTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,20 +19,20 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.process;
+package org.jbpm.test.cts.preview.process;
// $Id$
import java.io.IOException;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -57,7 +57,7 @@
public void testProcessProperties() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
proc.startProcess();
proc.waitForEnd(5000);
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/service/signal (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/signal)
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/service/signal/SignalMultithreadTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/signal/SignalMultithreadTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/service/signal/SignalMultithreadTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,14 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.service.signal;
+package org.jbpm.test.cts.preview.service.signal;
// $Id$
-import org.jbpm.api.client.SignalListener;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Signal.SignalType;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.client.preview.SignalListener;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
+import org.jbpm.api.service.preview.SignalService;
import org.jbpm.api.test.CTSTestCase;
/**
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/service/signal/SignalServiceTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/signal/SignalServiceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/service/signal/SignalServiceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,15 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.service.signal;
+package org.jbpm.test.cts.preview.service.signal;
// $Id$
import java.util.List;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Signal.SignalType;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
+import org.jbpm.api.service.preview.SignalService;
import org.jbpm.api.test.CTSTestCase;
/**
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/startevent (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/startevent)
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/startevent/StartEventSignalTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/startevent/StartEventSignalTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/startevent/StartEventSignalTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.startevent;
+package org.jbpm.test.cts.preview.startevent;
// $Id$
@@ -28,23 +28,23 @@
import javax.management.ObjectName;
-import org.jbpm.api.client.SignalListener;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.client.preview.SignalListener;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
-import org.jbpm.api.model.Signal.SignalType;
-import org.jbpm.api.model.builder.EventBuilder;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.model.builder.preview.EventBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.service.ProcessDefinitionService;
-import org.jbpm.api.service.ProcessService;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.service.ProcessInstanceService;
+import org.jbpm.api.service.preview.SignalService;
import org.jbpm.api.test.CTSTestCase;
/**
@@ -63,7 +63,7 @@
ProcessDefinitionService procDefService = ProcessDefinitionService.locateProcessDefinitionService();
procDefService.registerProcessDefinition(procDef);
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
try
{
proc.startProcess();
@@ -79,7 +79,7 @@
sigService.throwSignal(newSignal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
// Get the just started process
- ProcessService procService = ProcessService.locateProcessService();
+ ProcessInstanceService procService = ProcessInstanceService.locateProcessService();
Set<ObjectName> procIDs = procService.getProcesses("StartEventSignal", null);
proc = procService.getProcess(procIDs.iterator().next());
Added: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/java/JavaTaskTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/java/JavaTaskTest.java (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/java/JavaTaskTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.cts.preview.task.java;
+
+// $Id$
+
+import java.io.IOException;
+
+import org.jbpm.api.model.ProcessInstance;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.Expression.ExpressionLanguage;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
+import org.jbpm.api.runtime.BasicNodeHandler;
+import org.jbpm.api.runtime.ExecutionContext;
+import org.jbpm.api.runtime.ExecutionHandler;
+import org.jbpm.api.runtime.Token;
+import org.jbpm.api.service.ProcessBuilderService;
+import org.jbpm.api.test.CTSTestCase;
+
+/**
+ * Test ExecutionHandler attached to Task
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 03-Jul-2008
+ */
+public class JavaTaskTest extends CTSTestCase
+{
+ public void testExecutionHandler() throws Exception
+ {
+ ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
+ ProcessInstance proc = procDef.newInstance();
+
+ proc.startProcess();
+ proc.waitForEnd(5000);
+
+ assertEquals("kermit", TaskExecutionHandler.procProp);
+ assertEquals("piggy", TaskExecutionHandler.taskProp);
+ assertEquals(Boolean.TRUE, TaskExecutionHandler.procAssign);
+ assertEquals(Boolean.TRUE, TaskExecutionHandler.taskAssign);
+ }
+
+ protected ProcessDefinition getProcessDefinition() throws IOException
+ {
+ ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+ procBuilder.addProcess("TaskExecutionHandlerTest").addProcessProperty("procProp", "kermit");
+ procBuilder.addProcessAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "TaskExecutionHandlerTest_procProp == 'kermit'", "procAssign");
+ procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
+ TaskBuilder taskBuilder = procBuilder.addTask("TaskA");
+ taskBuilder.addNodeProperty("taskProp", "piggy").addExecutionHandler(TaskExecutionHandler.class).addSequenceFlow("End");
+ taskBuilder.addNodeAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "TaskExecutionHandlerTest_TaskA_taskProp == 'piggy'", "taskAssign");
+ procBuilder.addEndEvent("End");
+ return procBuilder.getProcessDefinition();
+ }
+
+ @SuppressWarnings("serial")
+ public static class TaskExecutionHandler extends BasicNodeHandler implements ExecutionHandler
+ {
+ static String procProp;
+ static String taskProp;
+ static Object procAssign;
+ static Object taskAssign;
+
+ /**
+ * This ExecutionHandler is supposed to see
+ * - Process properties
+ * - The result of start time process assignments
+ * - Activity properties
+ * - The result of start time activity assignments
+ */
+ @Override
+ public void execute(Token token)
+ {
+ ExecutionContext exContext = token.getExecutionContext();
+ procProp = (String)exContext.getAttachment("TaskExecutionHandlerTest.procProp");
+ taskProp = (String)exContext.getAttachment("TaskExecutionHandlerTest.TaskA.taskProp");
+ procAssign = exContext.getAttachment("procAssign");
+ taskAssign = exContext.getAttachment("taskAssign");
+ }
+ }
+}
Property changes on: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/java/JavaTaskTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/receive/ReceiveTaskTest.java (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/ReceiveTaskTest.java)
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/receive/ReceiveTaskTest.java (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/receive/ReceiveTaskTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,180 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.cts.preview.task.receive;
+
+// $Id$
+
+import java.io.IOException;
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.InvalidProcessException;
+import org.jbpm.api.client.preview.SignalListener;
+import org.jbpm.api.model.ProcessInstance;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.Event.EventDetailType;
+import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.EventBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
+import org.jbpm.api.service.ProcessBuilderService;
+import org.jbpm.api.service.ProcessDefinitionService;
+import org.jbpm.api.service.ProcessInstanceService;
+import org.jbpm.api.service.preview.MessageBuilderService;
+import org.jbpm.api.service.preview.MessageService;
+import org.jbpm.api.service.preview.SignalService;
+import org.jbpm.api.test.CTSTestCase;
+
+/**
+ * Test Receive Task
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 03-Jul-2008
+ */
+public class ReceiveTaskTest extends CTSTestCase
+{
+ public void testReceiveTaskWithNoMessage() throws Exception
+ {
+ ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+ procBuilder.addProcess("ReceiveTaskTest").addStartEvent("Start").addSequenceFlow("TaskA");
+ procBuilder.addTask("TaskA", TaskType.Receive).addSequenceFlow("End").addEndEvent("End");
+ try
+ {
+ procBuilder.getProcessDefinition();
+ fail("A Message for the MessageRef attribute MUST be entered");
+ }
+ catch (InvalidProcessException ex)
+ {
+ // expected
+ }
+ }
+
+ public void testUnregisteredProcess() throws Exception
+ {
+ ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
+ ProcessInstance proc = procDef.newInstance();
+
+ MessageService msgService = MessageService.locateMessageService();
+ try
+ {
+ msgService.sendMessage(proc.getKey(), "TaskA", getMessage());
+ fail("Send to an unregistered process is expected to fail");
+ }
+ catch (RuntimeException ex)
+ {
+ // expected
+ }
+ }
+
+ public void testSuspendedMessage() throws Exception
+ {
+ ProcessDefinitionService procDefService = ProcessDefinitionService.locateProcessDefinitionService();
+ ProcessInstanceService procService = ProcessInstanceService.locateProcessService();
+
+ ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
+ ProcessInstance proc = procDef.newInstance();
+
+ ObjectName procID = procService.registerProcess(proc);
+ try
+ {
+ // Send the message before the process is started
+ MessageService msgService = MessageService.locateMessageService();
+ msgService.sendMessage(procID, "TaskA", getMessage());
+
+ proc.startProcess();
+ proc.waitForEnd(5000);
+ }
+ finally
+ {
+ procDefService.unregisterProcessDefinition(procDef.getKey());
+ }
+
+ Message endMsg = getMessages().get(0);
+ assertNotNull("End message expected", endMsg);
+ assertEquals("bar", endMsg.getProperty("foo").getValue());
+ }
+
+ public void testSuspendedToken() throws Exception
+ {
+ ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
+ final ProcessInstance proc = procDef.newInstance();
+ SignalListener sigListener = new SignalListener()
+ {
+ private boolean sendMessage = true;
+
+ public boolean acceptSignal(Signal signal)
+ {
+ return signal.getSignalType() == SignalType.SYSTEM_TASK_EXIT;
+ }
+
+ public void catchSignal(Signal signal)
+ {
+ // Send the message after the process reached the receive task
+ if (sendMessage == true)
+ {
+ sendMessage = false;
+ MessageService msgService = MessageService.locateMessageService();
+ msgService.sendMessage(proc.getKey(), "TaskA", getMessage());
+ }
+ }
+ };
+ SignalService sigManager = SignalService.locateSignalService();
+ sigManager.addSignalListener(sigListener);
+
+ try
+ {
+ proc.startProcess();
+ proc.waitForEnd(5000);
+ }
+ finally
+ {
+ sigManager.removeSignalListener(sigListener);
+ }
+
+ Message endMsg = getMessages().get(0);
+ assertNotNull("End message expected", endMsg);
+ assertEquals("bar", endMsg.getProperty("foo").getValue());
+ }
+
+ private Message getMessage()
+ {
+ MessageBuilder msgBuilder = MessageBuilderService.locateMessageBuilder();
+ Message msg = msgBuilder.newMessage("ReceiveTaskMessage").addProperty("foo", "bar", true).getMessage();
+ return msg;
+ }
+
+ protected ProcessDefinition getProcessDefinition() throws IOException
+ {
+ ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+ procBuilder.addProcess("ReceiveTaskTest");
+ procBuilder.addProcessMessage("ReceiveTaskMessage").addProperty("foo", null, true);
+ procBuilder.addProcessMessage("EndEventMessage").addToRef(getTestID()).addProperty("foo", null, true);
+ procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
+ procBuilder.addTask("TaskA", TaskType.Receive).addInMessageRef("ReceiveTaskMessage");
+ EventBuilder eventBuilder = procBuilder.addSequenceFlow("End").addEndEvent("End", EventDetailType.Message);
+ eventBuilder.addMessageRef("EndEventMessage");
+ return procBuilder.getProcessDefinition();
+ }
+}
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/send/SendTaskTest.java (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/SendTaskTest.java)
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/send/SendTaskTest.java (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/send/SendTaskTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.cts.preview.task.send;
+
+// $Id$
+
+import java.io.IOException;
+import java.util.List;
+
+import org.jbpm.api.InvalidProcessException;
+import org.jbpm.api.model.ProcessInstance;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.service.ProcessBuilderService;
+import org.jbpm.api.test.CTSTestCase;
+
+/**
+ * Test Send Task
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 03-Jul-2008
+ */
+public class SendTaskTest extends CTSTestCase
+{
+ public void testSendTask() throws Exception
+ {
+ ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
+ ProcessInstance proc = procDef.newInstance();
+
+ BasicAttachments att = new BasicAttachments();
+ att.addAttachment("foo", "bar");
+ proc.startProcess(att);
+ proc.waitForEnd(5000);
+
+ List<Message> messages = getMessages();
+ assertEquals(1, messages.size());
+ assertEquals("bar", messages.get(0).getProperty("foo").getValue());
+ }
+
+ public void testSendTaskWithNoMessage() throws Exception
+ {
+ ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+ procBuilder.addProcess("SendTaskTest").addStartEvent("Start").addSequenceFlow("TaskA");
+ procBuilder.addTask("TaskA", TaskType.Send).addSequenceFlow("End").addEndEvent("End");
+ try
+ {
+ procBuilder.getProcessDefinition();
+ fail("A Message for the MessageRef attribute MUST be entered");
+ }
+ catch (InvalidProcessException ex)
+ {
+ // expected
+ }
+ }
+
+ protected ProcessDefinition getProcessDefinition() throws IOException
+ {
+ ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+ MessageBuilder msgBuilder = procBuilder.addProcess("SendTaskTest").addProcessMessage("SendTaskMessage");
+ msgBuilder.addToRef(getTestID()).addProperty("foo", null, true);
+ procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
+ procBuilder.addTask("TaskA", TaskType.Send).addOutMessageRef("SendTaskMessage");
+ procBuilder.addSequenceFlow("End").addEndEvent("End");
+ return procBuilder.getProcessDefinition();
+ }
+}
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/user/UserTaskCallbackTest.java (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/UserTaskCallbackTest.java)
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/user/UserTaskCallbackTest.java (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/user/UserTaskCallbackTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.cts.preview.task.user;
+
+// $Id$
+
+import java.io.IOException;
+import java.util.List;
+
+import org.jbpm.api.client.preview.UserTaskCallback;
+import org.jbpm.api.model.ProcessInstance;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.Event.EventDetailType;
+import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.UserTask;
+import org.jbpm.api.runtime.Attachments;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.service.ProcessBuilderService;
+import org.jbpm.api.test.CTSTestCase;
+
+/**
+ * Test UserTask that uses the callback API
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 07-Oct-2008
+ */
+public class UserTaskCallbackTest extends CTSTestCase
+{
+ public void testUserTask() throws Exception
+ {
+ ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
+ ProcessInstance proc = procDef.newInstance();
+
+ // Attach the callback to the UserTask
+ UserTask userTask = proc.getNode(UserTask.class, "UserTask");
+ userTask.setUserTaskCallback(new UserTaskCallbackImpl());
+
+ BasicAttachments att = new BasicAttachments();
+ att.addAttachment("foo", "xxx");
+ proc.startProcess(att);
+ proc.waitForEnd(5000);
+
+ List<Message> messages = getMessages();
+ assertEquals(1, messages.size());
+ assertEquals("xxx", messages.get(0).getProperty("bar").getValue());
+ }
+
+ protected ProcessDefinition getProcessDefinition() throws IOException
+ {
+ ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+ procBuilder.addProcess("UserTaskTest");
+ procBuilder.addProcessMessage("OutMessage").addProperty("foo", null, true);
+ procBuilder.addProcessMessage("InMessage").addProperty("bar", null, true);
+ procBuilder.addProcessMessage("EndMessage").addToRef(getTestID()).addProperty("bar", null, true);
+ procBuilder.addStartEvent("Start").addSequenceFlow("UserTask");
+ procBuilder.addTask("UserTask", TaskType.User).addOutMessageRef("OutMessage").addInMessageRef("InMessage");
+ procBuilder.addSequenceFlow("End").addEndEvent("End", EventDetailType.Message).addMessageRef("EndMessage");
+ return procBuilder.getProcessDefinition();
+ }
+
+ public static class UserTaskCallbackImpl extends UserTaskCallback
+ {
+ @Override
+ public void callback(Attachments att)
+ {
+ Object value = att.removeAttachment("foo");
+ att.addAttachment("bar", value);
+ }
+ }
+}
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/user/UserTaskTest.java (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/UserTaskTest.java)
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/user/UserTaskTest.java (rev 0)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/task/user/UserTaskTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.test.cts.preview.task.user;
+
+// $Id$
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jbpm.api.Constants;
+import org.jbpm.api.client.preview.MessageListener;
+import org.jbpm.api.model.ProcessInstance;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.Event.EventDetailType;
+import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.runtime.BasicAttachments;
+import org.jbpm.api.service.ProcessBuilderService;
+import org.jbpm.api.service.ProcessInstanceService;
+import org.jbpm.api.service.preview.MessageBuilderService;
+import org.jbpm.api.service.preview.MessageService;
+import org.jbpm.api.test.CTSTestCase;
+
+/**
+ * Test User Task
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 07-Oct-2008
+ */
+public class UserTaskTest extends CTSTestCase
+{
+ static final ObjectName MSG_LISTENER_ID = ObjectNameFactory.create(Constants.ID_DOMAIN, "msgListener", "UserTaskTest");
+
+ public void testUserTask() throws Exception
+ {
+ ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
+ ProcessInstance proc = procDef.newInstance();
+
+ // Register the process - this assigns the procID
+ ProcessInstanceService procService = ProcessInstanceService.locateProcessService();
+ procService.registerProcess(proc);
+
+ // Add the user message listener
+ MessageService msgService = MessageService.locateMessageService();
+ msgService.addMessageListener(new UserMessageListener(proc.getKey()));
+
+ try
+ {
+ BasicAttachments att = new BasicAttachments();
+ att.addAttachment("foo", "xxx");
+ proc.startProcess(att);
+ proc.waitForEnd(5000);
+
+ List<Message> messages = getMessages();
+ assertEquals(1, messages.size());
+ assertEquals("xxx", messages.get(0).getProperty("bar").getValue());
+ }
+ finally
+ {
+ msgService.removeMessageListener(MSG_LISTENER_ID);
+ }
+ }
+
+ protected ProcessDefinition getProcessDefinition() throws IOException
+ {
+ ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
+ procBuilder.addProcess("UserTaskTest");
+ procBuilder.addProcessMessage("OutMessage").addToRef(MSG_LISTENER_ID).addProperty("foo", null, true);
+ procBuilder.addProcessMessage("InMessage").addProperty("bar", null, true);
+ procBuilder.addProcessMessage("EndMessage").addToRef(getTestID()).addProperty("bar", null, true);
+ procBuilder.addStartEvent("Start").addSequenceFlow("UserTask");
+ procBuilder.addTask("UserTask", TaskType.User).addOutMessageRef("OutMessage").addInMessageRef("InMessage");
+ procBuilder.addSequenceFlow("End").addEndEvent("End", EventDetailType.Message).addMessageRef("EndMessage");
+ return procBuilder.getProcessDefinition();
+ }
+
+ public static class UserMessageListener implements MessageListener
+ {
+ ObjectName procID;
+
+ public UserMessageListener(ObjectName procID)
+ {
+ this.procID = procID;
+ }
+
+ @Override
+ public void catchMessage(Message message)
+ {
+ String propValue = message.getProperty("foo").getValue();
+ MessageBuilder msgBuilder = MessageBuilderService.locateMessageBuilder();
+ Message resMessage = msgBuilder.newMessage("InMessage").addProperty("bar", propValue, true).getMessage();
+
+ MessageService msgService = MessageService.locateMessageService();
+ msgService.sendMessage(procID, "UserTask", resMessage);
+ }
+
+ @Override
+ public ObjectName getKey()
+ {
+ return MSG_LISTENER_ID;
+ }
+
+ }
+}
Copied: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/transaction (from rev 2888, projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction)
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/transaction/TxRequiredMarshallerTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredMarshallerTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/transaction/TxRequiredMarshallerTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.transaction;
+package org.jbpm.test.cts.preview.transaction;
// $Id$
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/transaction/TxRequiredTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/transaction/TxRequiredTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/preview/transaction/TxRequiredTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jbpm.test.cts.transaction;
+package org.jbpm.test.cts.preview.transaction;
// $Id$
@@ -29,14 +29,14 @@
import org.hibernate.Transaction;
import org.jbpm.api.Constants;
import org.jbpm.api.Constants.TxType;
-import org.jbpm.api.model.Group;
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Group.GroupType;
import org.jbpm.api.model.Task.TaskType;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Group.GroupType;
import org.jbpm.api.runtime.BasicAttachments;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.Token;
@@ -66,7 +66,7 @@
assertSame("Group same", group, groupA);
assertSame("Group same", group, groupB);
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
proc.startProcess();
proc.waitForEnd();
@@ -78,7 +78,7 @@
public void testRollback() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment(Boolean.class, "rollback", Boolean.TRUE);
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/processengine/ProcessEngineTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,8 +26,8 @@
import java.net.URL;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.config.MicrocontainerConfiguration;
-import org.jbpm.api.service.ProcessEngineRegistry;
+import org.jbpm.api.client.internal.MicrocontainerConfiguration;
+import org.jbpm.api.service.preview.ProcessEngineRegistry;
import org.jbpm.api.test.CTSTestCase;
/**
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/process/ProcessDefinitionServiceTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/process/ProcessDefinitionServiceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/process/ProcessDefinitionServiceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -28,10 +28,10 @@
import javax.management.ObjectName;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.service.ProcessDefinitionService;
-import org.jbpm.api.service.ProcessService;
+import org.jbpm.api.service.ProcessInstanceService;
import org.jbpm.api.test.CTSTestCase;
import org.jbpm.api.test.ProcessCatalog;
@@ -64,9 +64,9 @@
ProcessEngine engine = procDef.getProcessEngine();
ProcessDefinitionService procDefService = engine.getService(ProcessDefinitionService.class);
- ProcessService procService = engine.getService(ProcessService.class);
+ ProcessInstanceService procService = engine.getService(ProcessInstanceService.class);
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
assertNotNull("Process not null", proc);
assertNull("Process not automatically registered", procService.getProcess(proc.getKey()));
assertNull("ProcessDefinition not automatically registered", procDefService.getProcessDefinition(procDef.getKey()));
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/process/ProcessServiceTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/process/ProcessServiceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/service/process/ProcessServiceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,16 +25,16 @@
import javax.management.ObjectName;
-import org.jbpm.api.client.SignalListener;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.client.preview.SignalListener;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Signal.SignalType;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.service.ProcessDefinitionService;
-import org.jbpm.api.service.ProcessService;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.service.ProcessInstanceService;
+import org.jbpm.api.service.preview.SignalService;
import org.jbpm.api.test.CTSTestCase;
/**
@@ -48,10 +48,10 @@
public void testRegisterProcess() throws Exception
{
ProcessDefinitionService procDefService = ProcessDefinitionService.locateProcessDefinitionService();
- ProcessService procService = ProcessService.locateProcessService();
+ ProcessInstanceService procService = ProcessInstanceService.locateProcessService();
ProcessDefinition procDef = getProcessDefinition();
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
assertNull("ProcessDefinition not registered automatically", procDefService.getProcessDefinition(procDef.getKey()));
assertNull("Process not registered automatically", procService.getProcess(proc.getKey()));
@@ -74,10 +74,10 @@
public void testStartProcess() throws Exception
{
final ProcessDefinitionService procDefService = ProcessDefinitionService.locateProcessDefinitionService();
- final ProcessService procService = ProcessService.locateProcessService();
+ final ProcessInstanceService procService = ProcessInstanceService.locateProcessService();
final ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- final Process proc = procDef.newInstance();
+ final ProcessInstance proc = procDef.newInstance();
assertNull("Process not registered automatically", procService.getProcess(proc.getKey()));
SignalListener sigListener = new SignalListener()
Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/ReceiveTaskTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/ReceiveTaskTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/ReceiveTaskTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,180 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.test.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-
-import javax.management.ObjectName;
-
-import org.jbpm.api.InvalidProcessException;
-import org.jbpm.api.client.SignalListener;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
-import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Event.EventDetailType;
-import org.jbpm.api.model.Signal.SignalType;
-import org.jbpm.api.model.Task.TaskType;
-import org.jbpm.api.model.builder.EventBuilder;
-import org.jbpm.api.model.builder.MessageBuilder;
-import org.jbpm.api.model.builder.ProcessBuilder;
-import org.jbpm.api.service.MessageBuilderService;
-import org.jbpm.api.service.MessageService;
-import org.jbpm.api.service.ProcessBuilderService;
-import org.jbpm.api.service.ProcessDefinitionService;
-import org.jbpm.api.service.ProcessService;
-import org.jbpm.api.service.SignalService;
-import org.jbpm.api.test.CTSTestCase;
-
-/**
- * Test Receive Task
- *
- * @author thomas.diesler at jboss.com
- * @since 03-Jul-2008
- */
-public class ReceiveTaskTest extends CTSTestCase
-{
- public void testReceiveTaskWithNoMessage() throws Exception
- {
- ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
- procBuilder.addProcess("ReceiveTaskTest").addStartEvent("Start").addSequenceFlow("TaskA");
- procBuilder.addTask("TaskA", TaskType.Receive).addSequenceFlow("End").addEndEvent("End");
- try
- {
- procBuilder.getProcessDefinition();
- fail("A Message for the MessageRef attribute MUST be entered");
- }
- catch (InvalidProcessException ex)
- {
- // expected
- }
- }
-
- public void testUnregisteredProcess() throws Exception
- {
- ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
-
- MessageService msgService = MessageService.locateMessageService();
- try
- {
- msgService.sendMessage(proc.getKey(), "TaskA", getMessage());
- fail("Send to an unregistered process is expected to fail");
- }
- catch (RuntimeException ex)
- {
- // expected
- }
- }
-
- public void testSuspendedMessage() throws Exception
- {
- ProcessDefinitionService procDefService = ProcessDefinitionService.locateProcessDefinitionService();
- ProcessService procService = ProcessService.locateProcessService();
-
- ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
-
- ObjectName procID = procService.registerProcess(proc);
- try
- {
- // Send the message before the process is started
- MessageService msgService = MessageService.locateMessageService();
- msgService.sendMessage(procID, "TaskA", getMessage());
-
- proc.startProcess();
- proc.waitForEnd(5000);
- }
- finally
- {
- procDefService.unregisterProcessDefinition(procDef.getKey());
- }
-
- Message endMsg = getMessages().get(0);
- assertNotNull("End message expected", endMsg);
- assertEquals("bar", endMsg.getProperty("foo").getValue());
- }
-
- public void testSuspendedToken() throws Exception
- {
- ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- final Process proc = procDef.newInstance();
- SignalListener sigListener = new SignalListener()
- {
- private boolean sendMessage = true;
-
- public boolean acceptSignal(Signal signal)
- {
- return signal.getSignalType() == SignalType.SYSTEM_TASK_EXIT;
- }
-
- public void catchSignal(Signal signal)
- {
- // Send the message after the process reached the receive task
- if (sendMessage == true)
- {
- sendMessage = false;
- MessageService msgService = MessageService.locateMessageService();
- msgService.sendMessage(proc.getKey(), "TaskA", getMessage());
- }
- }
- };
- SignalService sigManager = SignalService.locateSignalService();
- sigManager.addSignalListener(sigListener);
-
- try
- {
- proc.startProcess();
- proc.waitForEnd(5000);
- }
- finally
- {
- sigManager.removeSignalListener(sigListener);
- }
-
- Message endMsg = getMessages().get(0);
- assertNotNull("End message expected", endMsg);
- assertEquals("bar", endMsg.getProperty("foo").getValue());
- }
-
- private Message getMessage()
- {
- MessageBuilder msgBuilder = MessageBuilderService.locateMessageBuilder();
- Message msg = msgBuilder.newMessage("ReceiveTaskMessage").addProperty("foo", "bar", true).getMessage();
- return msg;
- }
-
- protected ProcessDefinition getProcessDefinition() throws IOException
- {
- ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
- procBuilder.addProcess("ReceiveTaskTest");
- procBuilder.addProcessMessage("ReceiveTaskMessage").addProperty("foo", null, true);
- procBuilder.addProcessMessage("EndEventMessage").addToRef(getTestID()).addProperty("foo", null, true);
- procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
- procBuilder.addTask("TaskA", TaskType.Receive).addInMessageRef("ReceiveTaskMessage");
- EventBuilder eventBuilder = procBuilder.addSequenceFlow("End").addEndEvent("End", EventDetailType.Message);
- eventBuilder.addMessageRef("EndEventMessage");
- return procBuilder.getProcessDefinition();
- }
-}
Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/SendTaskTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/SendTaskTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/SendTaskTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,89 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.test.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-import java.util.List;
-
-import org.jbpm.api.InvalidProcessException;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
-import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Task.TaskType;
-import org.jbpm.api.model.builder.MessageBuilder;
-import org.jbpm.api.model.builder.ProcessBuilder;
-import org.jbpm.api.runtime.BasicAttachments;
-import org.jbpm.api.service.ProcessBuilderService;
-import org.jbpm.api.test.CTSTestCase;
-
-/**
- * Test Send Task
- *
- * @author thomas.diesler at jboss.com
- * @since 03-Jul-2008
- */
-public class SendTaskTest extends CTSTestCase
-{
- public void testSendTask() throws Exception
- {
- ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
-
- BasicAttachments att = new BasicAttachments();
- att.addAttachment("foo", "bar");
- proc.startProcess(att);
- proc.waitForEnd(5000);
-
- List<Message> messages = getMessages();
- assertEquals(1, messages.size());
- assertEquals("bar", messages.get(0).getProperty("foo").getValue());
- }
-
- public void testSendTaskWithNoMessage() throws Exception
- {
- ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
- procBuilder.addProcess("SendTaskTest").addStartEvent("Start").addSequenceFlow("TaskA");
- procBuilder.addTask("TaskA", TaskType.Send).addSequenceFlow("End").addEndEvent("End");
- try
- {
- procBuilder.getProcessDefinition();
- fail("A Message for the MessageRef attribute MUST be entered");
- }
- catch (InvalidProcessException ex)
- {
- // expected
- }
- }
-
- protected ProcessDefinition getProcessDefinition() throws IOException
- {
- ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
- MessageBuilder msgBuilder = procBuilder.addProcess("SendTaskTest").addProcessMessage("SendTaskMessage");
- msgBuilder.addToRef(getTestID()).addProperty("foo", null, true);
- procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
- procBuilder.addTask("TaskA", TaskType.Send).addOutMessageRef("SendTaskMessage");
- procBuilder.addSequenceFlow("End").addEndEvent("End");
- return procBuilder.getProcessDefinition();
- }
-}
Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/TaskExecutionHandlerTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/TaskExecutionHandlerTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/TaskExecutionHandlerTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,101 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.test.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-
-import org.jbpm.api.model.Process;
-import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Assignment.AssignTime;
-import org.jbpm.api.model.Expression.ExpressionLanguage;
-import org.jbpm.api.model.builder.ProcessBuilder;
-import org.jbpm.api.model.builder.TaskBuilder;
-import org.jbpm.api.runtime.BasicNodeHandler;
-import org.jbpm.api.runtime.ExecutionContext;
-import org.jbpm.api.runtime.ExecutionHandler;
-import org.jbpm.api.runtime.Token;
-import org.jbpm.api.service.ProcessBuilderService;
-import org.jbpm.api.test.CTSTestCase;
-
-/**
- * Test ExecutionHandler attached to Task
- *
- * @author thomas.diesler at jboss.com
- * @since 03-Jul-2008
- */
-public class TaskExecutionHandlerTest extends CTSTestCase
-{
- public void testExecutionHandler() throws Exception
- {
- ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
-
- proc.startProcess();
- proc.waitForEnd(5000);
-
- assertEquals("kermit", TaskExecutionHandler.procProp);
- assertEquals("piggy", TaskExecutionHandler.taskProp);
- assertEquals(Boolean.TRUE, TaskExecutionHandler.procAssign);
- assertEquals(Boolean.TRUE, TaskExecutionHandler.taskAssign);
- }
-
- protected ProcessDefinition getProcessDefinition() throws IOException
- {
- ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
- procBuilder.addProcess("TaskExecutionHandlerTest").addProcessProperty("procProp", "kermit");
- procBuilder.addProcessAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "TaskExecutionHandlerTest_procProp == 'kermit'", "procAssign");
- procBuilder.addStartEvent("Start").addSequenceFlow("TaskA");
- TaskBuilder taskBuilder = procBuilder.addTask("TaskA");
- taskBuilder.addNodeProperty("taskProp", "piggy").addExecutionHandler(TaskExecutionHandler.class).addSequenceFlow("End");
- taskBuilder.addNodeAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "TaskExecutionHandlerTest_TaskA_taskProp == 'piggy'", "taskAssign");
- procBuilder.addEndEvent("End");
- return procBuilder.getProcessDefinition();
- }
-
- @SuppressWarnings("serial")
- public static class TaskExecutionHandler extends BasicNodeHandler implements ExecutionHandler
- {
- static String procProp;
- static String taskProp;
- static Object procAssign;
- static Object taskAssign;
-
- /**
- * This ExecutionHandler is supposed to see
- * - Process properties
- * - The result of start time process assignments
- * - Activity properties
- * - The result of start time activity assignments
- */
- @Override
- public void execute(Token token)
- {
- ExecutionContext exContext = token.getExecutionContext();
- procProp = (String)exContext.getAttachment("TaskExecutionHandlerTest.procProp");
- taskProp = (String)exContext.getAttachment("TaskExecutionHandlerTest.TaskA.taskProp");
- procAssign = exContext.getAttachment("procAssign");
- taskAssign = exContext.getAttachment("taskAssign");
- }
- }
-}
Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/UserTaskCallbackTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/UserTaskCallbackTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/UserTaskCallbackTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.test.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-import java.util.List;
-
-import org.jbpm.api.client.UserTaskCallback;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
-import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.UserTask;
-import org.jbpm.api.model.Event.EventDetailType;
-import org.jbpm.api.model.Task.TaskType;
-import org.jbpm.api.model.builder.ProcessBuilder;
-import org.jbpm.api.runtime.Attachments;
-import org.jbpm.api.runtime.BasicAttachments;
-import org.jbpm.api.service.ProcessBuilderService;
-import org.jbpm.api.test.CTSTestCase;
-
-/**
- * Test UserTask that uses the callback API
- *
- * @author thomas.diesler at jboss.com
- * @since 07-Oct-2008
- */
-public class UserTaskCallbackTest extends CTSTestCase
-{
- public void testUserTask() throws Exception
- {
- ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
-
- // Attach the callback to the UserTask
- UserTask userTask = proc.getNode(UserTask.class, "UserTask");
- userTask.setUserTaskCallback(new UserTaskCallbackImpl());
-
- BasicAttachments att = new BasicAttachments();
- att.addAttachment("foo", "xxx");
- proc.startProcess(att);
- proc.waitForEnd(5000);
-
- List<Message> messages = getMessages();
- assertEquals(1, messages.size());
- assertEquals("xxx", messages.get(0).getProperty("bar").getValue());
- }
-
- protected ProcessDefinition getProcessDefinition() throws IOException
- {
- ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
- procBuilder.addProcess("UserTaskTest");
- procBuilder.addProcessMessage("OutMessage").addProperty("foo", null, true);
- procBuilder.addProcessMessage("InMessage").addProperty("bar", null, true);
- procBuilder.addProcessMessage("EndMessage").addToRef(getTestID()).addProperty("bar", null, true);
- procBuilder.addStartEvent("Start").addSequenceFlow("UserTask");
- procBuilder.addTask("UserTask", TaskType.User).addOutMessageRef("OutMessage").addInMessageRef("InMessage");
- procBuilder.addSequenceFlow("End").addEndEvent("End", EventDetailType.Message).addMessageRef("EndMessage");
- return procBuilder.getProcessDefinition();
- }
-
- public static class UserTaskCallbackImpl extends UserTaskCallback
- {
- @Override
- public void callback(Attachments att)
- {
- Object value = att.removeAttachment("foo");
- att.addAttachment("bar", value);
- }
- }
-}
Deleted: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/UserTaskTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/UserTaskTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/task/UserTaskTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.test.cts.task;
-
-// $Id$
-
-import java.io.IOException;
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.jbpm.api.Constants;
-import org.jbpm.api.client.MessageListener;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
-import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Event.EventDetailType;
-import org.jbpm.api.model.Task.TaskType;
-import org.jbpm.api.model.builder.MessageBuilder;
-import org.jbpm.api.model.builder.ObjectNameFactory;
-import org.jbpm.api.model.builder.ProcessBuilder;
-import org.jbpm.api.runtime.BasicAttachments;
-import org.jbpm.api.service.MessageBuilderService;
-import org.jbpm.api.service.MessageService;
-import org.jbpm.api.service.ProcessBuilderService;
-import org.jbpm.api.service.ProcessService;
-import org.jbpm.api.test.CTSTestCase;
-
-/**
- * Test User Task
- *
- * @author thomas.diesler at jboss.com
- * @since 07-Oct-2008
- */
-public class UserTaskTest extends CTSTestCase
-{
- static final ObjectName MSG_LISTENER_ID = ObjectNameFactory.create(Constants.ID_DOMAIN, "msgListener", "UserTaskTest");
-
- public void testUserTask() throws Exception
- {
- ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
-
- // Register the process - this assigns the procID
- ProcessService procService = ProcessService.locateProcessService();
- procService.registerProcess(proc);
-
- // Add the user message listener
- MessageService msgService = MessageService.locateMessageService();
- msgService.addMessageListener(new UserMessageListener(proc.getKey()));
-
- try
- {
- BasicAttachments att = new BasicAttachments();
- att.addAttachment("foo", "xxx");
- proc.startProcess(att);
- proc.waitForEnd(5000);
-
- List<Message> messages = getMessages();
- assertEquals(1, messages.size());
- assertEquals("xxx", messages.get(0).getProperty("bar").getValue());
- }
- finally
- {
- msgService.removeMessageListener(MSG_LISTENER_ID);
- }
- }
-
- protected ProcessDefinition getProcessDefinition() throws IOException
- {
- ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
- procBuilder.addProcess("UserTaskTest");
- procBuilder.addProcessMessage("OutMessage").addToRef(MSG_LISTENER_ID).addProperty("foo", null, true);
- procBuilder.addProcessMessage("InMessage").addProperty("bar", null, true);
- procBuilder.addProcessMessage("EndMessage").addToRef(getTestID()).addProperty("bar", null, true);
- procBuilder.addStartEvent("Start").addSequenceFlow("UserTask");
- procBuilder.addTask("UserTask", TaskType.User).addOutMessageRef("OutMessage").addInMessageRef("InMessage");
- procBuilder.addSequenceFlow("End").addEndEvent("End", EventDetailType.Message).addMessageRef("EndMessage");
- return procBuilder.getProcessDefinition();
- }
-
- public static class UserMessageListener implements MessageListener
- {
- ObjectName procID;
-
- public UserMessageListener(ObjectName procID)
- {
- this.procID = procID;
- }
-
- @Override
- public void catchMessage(Message message)
- {
- String propValue = message.getProperty("foo").getValue();
- MessageBuilder msgBuilder = MessageBuilderService.locateMessageBuilder();
- Message resMessage = msgBuilder.newMessage("InMessage").addProperty("bar", propValue, true).getMessage();
-
- MessageService msgService = MessageService.locateMessageService();
- msgService.sendMessage(procID, "UserTask", resMessage);
- }
-
- @Override
- public ObjectName getKey()
- {
- return MSG_LISTENER_ID;
- }
-
- }
-}
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/exclusivechoice/ExclusiveChoiceTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/exclusivechoice/ExclusiveChoiceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/exclusivechoice/ExclusiveChoiceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -27,12 +27,12 @@
import java.util.List;
import org.jbpm.api.model.Gateway;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Expression.ExpressionLanguage;
-import org.jbpm.api.model.builder.GatewayBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.GatewayBuilder;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.runtime.BasicAttachments;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -49,7 +49,7 @@
public void testGateA() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("foo", "5");
@@ -64,7 +64,7 @@
public void testGateB() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("foo", "15");
@@ -79,7 +79,7 @@
public void testInvalidGate() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("foo", "10");
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/multichoice/MultiChoiceTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/multichoice/MultiChoiceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/multichoice/MultiChoiceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -27,12 +27,12 @@
import java.util.List;
import org.jbpm.api.model.Gateway;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Expression.ExpressionLanguage;
-import org.jbpm.api.model.builder.GatewayBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.GatewayBuilder;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.runtime.BasicAttachments;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -49,7 +49,7 @@
public void testGateA() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("foo", "5");
@@ -63,7 +63,7 @@
public void testGateB() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
BasicAttachments att = new BasicAttachments();
att.addAttachment("foo", "15");
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/parallelsplit/ParallelSplitTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/parallelsplit/ParallelSplitTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/parallelsplit/ParallelSplitTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -29,11 +29,11 @@
import javax.management.ObjectName;
import org.jbpm.api.model.Gateway;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Signal.SignalType;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -49,7 +49,7 @@
public void testParallelSplit() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
proc.startProcess();
proc.waitForEnd();
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequencePersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequencePersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequencePersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -28,7 +28,7 @@
import javax.management.ObjectName;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.service.PersistenceService;
+import org.jbpm.api.service.preview.PersistenceService;
/**
* Test the basic execution sequence
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequenceTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/sequence/SequenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,11 +26,11 @@
import java.io.IOException;
import java.util.List;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Signal.SignalType;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -46,7 +46,7 @@
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
// Start the Process
proc.startProcess();
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/simplemerge/SimpleMergeTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/simplemerge/SimpleMergeTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/simplemerge/SimpleMergeTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,11 +26,11 @@
import java.io.IOException;
import java.util.List;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Gateway.GatewayType;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -46,7 +46,7 @@
public void testSimpleMerge() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
// Start the process
proc.startProcess();
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/synchronization/SynchronizationTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/synchronization/SynchronizationTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/control/synchronization/SynchronizationTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,15 +25,15 @@
import java.io.IOException;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.Gateway.GatewayType;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -50,7 +50,7 @@
public void testParallelMerge() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
// Start the process
proc.startProcess();
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/data/casedata/CaseDataTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/data/casedata/CaseDataTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/data/casedata/CaseDataTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,14 +25,14 @@
import java.io.IOException;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -50,7 +50,7 @@
public void testCaseProperties() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
proc.startProcess();
proc.waitForEnd();
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/data/taskdata/TaskDataTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/data/taskdata/TaskDataTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/pattern/data/taskdata/TaskDataTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,15 +25,15 @@
import java.io.IOException;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.api.test.CTSTestCase;
@@ -51,7 +51,7 @@
public void testTaskDataRead() throws Exception
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
proc.startProcess();
proc.waitForEnd();
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessMarshaller.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -31,31 +31,31 @@
import javax.xml.bind.Marshaller;
import org.jbpm.api.NotImplementedException;
-import org.jbpm.api.model.Assignment;
-import org.jbpm.api.model.ComplexGateway;
import org.jbpm.api.model.EndEvent;
import org.jbpm.api.model.Event;
import org.jbpm.api.model.ExclusiveGateway;
import org.jbpm.api.model.Expression;
import org.jbpm.api.model.Gateway;
-import org.jbpm.api.model.Group;
-import org.jbpm.api.model.InclusiveGateway;
-import org.jbpm.api.model.InputSet;
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.OutputSet;
-import org.jbpm.api.model.ParallelGateway;
-import org.jbpm.api.model.Participant;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Property;
-import org.jbpm.api.model.ReceiveTask;
-import org.jbpm.api.model.SendTask;
import org.jbpm.api.model.SequenceFlow;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.StartEvent;
import org.jbpm.api.model.Task;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.SequenceFlow.ConditionType;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.ComplexGateway;
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.InclusiveGateway;
+import org.jbpm.api.model.preview.InputSet;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.OutputSet;
+import org.jbpm.api.model.preview.ParallelGateway;
+import org.jbpm.api.model.preview.Participant;
+import org.jbpm.api.model.preview.Property;
+import org.jbpm.api.model.preview.ReceiveTask;
+import org.jbpm.api.model.preview.SendTask;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.SignalHandler;
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/ProcessUnmarshaller.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -36,13 +36,13 @@
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.model.SequenceFlow.ConditionType;
import org.jbpm.api.model.Task.TaskType;
-import org.jbpm.api.model.builder.EventBuilder;
-import org.jbpm.api.model.builder.GatewayBuilder;
-import org.jbpm.api.model.builder.GroupBuilder;
-import org.jbpm.api.model.builder.MessageBuilder;
-import org.jbpm.api.model.builder.ObjectNameFactory;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.model.builder.preview.EventBuilder;
+import org.jbpm.api.model.builder.preview.GatewayBuilder;
+import org.jbpm.api.model.builder.preview.GroupBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.NodeHandler;
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBAssignment.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBAssignment.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBAssignment.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -27,8 +27,8 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import org.jbpm.api.model.Assignment;
-import org.jbpm.api.model.Assignment.AssignTime;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
/**
* An Assignment, which is used in the definition of attributes for Process,
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGroup.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGroup.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBGroup.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -30,7 +30,7 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import org.jbpm.api.model.Group.GroupType;
+import org.jbpm.api.model.preview.Group.GroupType;
/**
* An Assignment, which is used in the definition of attributes for Process,
Modified: projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBSignal.java
===================================================================
--- projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBSignal.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/dialects/api10/src/main/java/org/jbpm/dialect/api10/model/JAXBSignal.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -27,7 +27,7 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
-import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.preview.Signal.SignalType;
/**
* The base of all supported event details
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AbstractElementImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AbstractElementImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AbstractElementImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -32,7 +32,7 @@
import org.hibernate.Session;
import org.jbpm.api.InvalidProcessException;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.model.internal.AbstractElement;
@@ -105,22 +105,22 @@
// nothing to do
}
- protected void create(Process proc)
+ protected void create(ProcessInstance proc)
{
// nothing to do
}
- protected void register(Process proc)
+ protected void register(ProcessInstance proc)
{
// nothing to do
}
- protected void unregister(Process proc)
+ protected void unregister(ProcessInstance proc)
{
// nothing to do
}
- protected void destroy(Process proc)
+ protected void destroy(ProcessInstance proc)
{
// nothing to do
}
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AssignmentImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AssignmentImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/AssignmentImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -31,9 +31,9 @@
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import org.jbpm.api.model.Assignment;
import org.jbpm.api.model.Expression;
-import org.jbpm.api.model.Property;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Property;
/**
* An Assignment, which is used in the definition of attributes for Process, Activities, Events, Gateways, and Gates.
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ComplexGatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ComplexGatewayImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ComplexGatewayImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,9 +26,9 @@
import javax.persistence.Entity;
import org.jbpm.api.NotImplementedException;
-import org.jbpm.api.model.ComplexGateway;
import org.jbpm.api.model.Expression;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.ComplexGateway;
/**
* A Complex Gateway handles situations that are not easily handled through the other types of Gateways. Complex
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EndEventImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EndEventImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EndEventImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -32,15 +32,15 @@
import org.jbpm.api.model.EndEvent;
import org.jbpm.api.model.Node;
import org.jbpm.api.model.SequenceFlow;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.runtime.ExecutionContext;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.SignalHandler;
import org.jbpm.api.runtime.Token;
import org.jbpm.api.runtime.TokenExecutor;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.service.preview.SignalService;
import org.jbpm.ri.model.builder.SingleInFlowSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EventImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EventImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/EventImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -34,17 +34,17 @@
import org.jbpm.api.InvalidProcessException;
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.Event;
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.SignalHandler;
import org.jbpm.api.runtime.Token;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.service.preview.SignalService;
import org.jbpm.ri.runtime.MessageSender;
/**
@@ -214,7 +214,7 @@
}
@Override
- protected void create(Process proc)
+ protected void create(ProcessInstance proc)
{
super.create(proc);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GateImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GateImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GateImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -35,9 +35,9 @@
import javax.persistence.OneToOne;
import org.hibernate.annotations.IndexColumn;
-import org.jbpm.api.model.Assignment;
import org.jbpm.api.model.Gate;
import org.jbpm.api.model.SequenceFlow;
+import org.jbpm.api.model.preview.Assignment;
/**
* There MAY be zero or more Gates (except where noted below). Zero Gates are allowed if the Gateway is last object in a
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GatewayImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GatewayImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -38,14 +38,14 @@
import org.jbpm.api.model.Gateway;
import org.jbpm.api.model.Node;
import org.jbpm.api.model.SequenceFlow;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.SequenceFlow.ConditionType;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.SignalHandler;
import org.jbpm.api.runtime.Token;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.service.preview.SignalService;
import org.jbpm.ri.model.builder.MultipleInFlowSupport;
import org.jbpm.ri.model.builder.MultipleOutFlowSupport;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GroupImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GroupImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/GroupImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -34,9 +34,9 @@
import javax.persistence.Id;
import javax.persistence.OneToOne;
-import org.jbpm.api.model.Group;
-import org.jbpm.api.model.Property;
import org.jbpm.api.model.internal.PropertySupport;
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.Property;
/**
* A Flow Object is one of the set of following graphical objects: Event, Activity, and
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -31,12 +31,12 @@
import javax.persistence.Entity;
import org.jbpm.api.model.Expression;
-import org.jbpm.api.model.InclusiveGateway;
import org.jbpm.api.model.Node;
import org.jbpm.api.model.SequenceFlow;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.SequenceFlow.ConditionType;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.InclusiveGateway;
import org.jbpm.api.runtime.ExecutionContext;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.Token;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InputSetImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InputSetImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/InputSetImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -32,9 +32,9 @@
import javax.persistence.Id;
import javax.persistence.OneToOne;
-import org.jbpm.api.model.InputSet;
-import org.jbpm.api.model.Property;
import org.jbpm.api.model.internal.PropertySupport;
+import org.jbpm.api.model.preview.InputSet;
+import org.jbpm.api.model.preview.Property;
/**
* An InputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/MessageImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/MessageImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/MessageImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -33,10 +33,10 @@
import javax.persistence.Id;
import javax.persistence.OneToOne;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Participant;
-import org.jbpm.api.model.Property;
import org.jbpm.api.model.internal.PropertySupport;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Participant;
+import org.jbpm.api.model.preview.Property;
/**
* A Message, which is used in the definition of attributes for a @{link StartEvent},
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/NodeImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -43,17 +43,17 @@
import org.hibernate.annotations.IndexColumn;
import org.jbpm.api.InvalidProcessException;
import org.jbpm.api.NameNotUniqueException;
-import org.jbpm.api.model.Assignment;
import org.jbpm.api.model.EndEvent;
-import org.jbpm.api.model.Group;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Property;
import org.jbpm.api.model.SequenceFlow;
import org.jbpm.api.model.StartEvent;
import org.jbpm.api.model.internal.ProcessStructure;
import org.jbpm.api.model.internal.PropertySupport;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.Property;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.NodeHandler;
@@ -129,7 +129,7 @@
private ProcessDefinition procDef;
@ManyToOne(targetEntity = ProcessImpl.class)
- private Process proc;
+ private ProcessInstance proc;
@ManyToOne(targetEntity = GroupImpl.class)
private Group groupRef;
@@ -152,7 +152,7 @@
}
@Override
- public Process getProcess()
+ public ProcessInstance getProcess()
{
return proc;
}
@@ -396,7 +396,7 @@
}
@Override
- protected void create(Process proc)
+ protected void create(ProcessInstance proc)
{
super.create(proc);
this.proc = proc;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/OutputSetImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/OutputSetImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/OutputSetImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -32,9 +32,9 @@
import javax.persistence.Id;
import javax.persistence.OneToOne;
-import org.jbpm.api.model.OutputSet;
-import org.jbpm.api.model.Property;
import org.jbpm.api.model.internal.PropertySupport;
+import org.jbpm.api.model.preview.OutputSet;
+import org.jbpm.api.model.preview.Property;
/**
* An OutputSet, which is used in the definition of common attributes for Activities and for attributes of a Process
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParallelGatewayImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -32,9 +32,9 @@
import javax.persistence.Transient;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.ParallelGateway;
import org.jbpm.api.model.SequenceFlow;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.ParallelGateway;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.Token;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParticipantImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParticipantImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ParticipantImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -29,8 +29,8 @@
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import org.jbpm.api.model.Participant;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
+import org.jbpm.api.model.preview.Participant;
/**
* A Participant, which is used in the definition of attributes for a @{link Pool}, @{link Message}, and @{link
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessDefinitionImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessDefinitionImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessDefinitionImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -42,15 +42,15 @@
import org.hibernate.Session;
import org.jbpm.api.Constants;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Assignment;
-import org.jbpm.api.model.Group;
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Property;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Property;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -87,7 +87,7 @@
}
@Override
- public Process newInstance()
+ public ProcessInstance newInstance()
{
// Create a copy of the process structure from raw data
ProcessStructureImpl procStructCopy;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -39,17 +39,17 @@
import org.hibernate.Session;
import org.jbpm.api.Constants;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Assignment;
-import org.jbpm.api.model.Group;
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Property;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Property;
import org.jbpm.api.runtime.Attachments;
import org.jbpm.api.service.ExecutionService;
-import org.jbpm.api.service.ProcessService;
+import org.jbpm.api.service.ProcessInstanceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -60,7 +60,7 @@
* @since 08-Jul-2008
*/
@Entity(name = "BPMProcess")
-public class ProcessImpl extends AbstractElementImpl implements Process
+public class ProcessImpl extends AbstractElementImpl implements ProcessInstance
{
private static final long serialVersionUID = 1L;
@@ -247,7 +247,7 @@
catch (RuntimeException rte)
{
// A process that cannot be started id unregistered automatically
- ProcessService procService = getProcessEngine().getService(ProcessService.class);
+ ProcessInstanceService procService = getProcessEngine().getService(ProcessInstanceService.class);
procService.unregisterProcess(getKey());
throw rte;
}
@@ -284,28 +284,28 @@
}
@Override
- protected void create(Process proc)
+ protected void create(ProcessInstance proc)
{
super.create(proc);
procStruct.create(proc);
}
@Override
- public void register(Process proc)
+ public void register(ProcessInstance proc)
{
super.register(proc);
procStruct.register(proc);
}
@Override
- public void unregister(Process proc)
+ public void unregister(ProcessInstance proc)
{
super.unregister(proc);
procStruct.unregister(proc);
}
@Override
- protected void destroy(Process proc)
+ protected void destroy(ProcessInstance proc)
{
super.destroy(proc);
procStruct.destroy(proc);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessStructureImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessStructureImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ProcessStructureImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -42,18 +42,18 @@
import org.jbpm.api.Constants;
import org.jbpm.api.InvalidProcessException;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Assignment;
import org.jbpm.api.model.EndEvent;
-import org.jbpm.api.model.Group;
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Property;
import org.jbpm.api.model.StartEvent;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
import org.jbpm.api.model.internal.ProcessStructure;
import org.jbpm.api.model.internal.PropertySupport;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Property;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -359,7 +359,7 @@
}
@Override
- protected void create(Process proc)
+ protected void create(ProcessInstance proc)
{
super.create(proc);
for (Node node : getNodes())
@@ -370,7 +370,7 @@
}
@Override
- protected void register(Process proc)
+ protected void register(ProcessInstance proc)
{
super.register(proc);
for (Node node : getNodes())
@@ -381,7 +381,7 @@
}
@Override
- protected void unregister(Process proc)
+ protected void unregister(ProcessInstance proc)
{
super.unregister(proc);
for (Node node : getNodes())
@@ -392,7 +392,7 @@
}
@Override
- protected void destroy(Process proc)
+ protected void destroy(ProcessInstance proc)
{
super.destroy(proc);
for (Node node : getNodes())
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertyImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertyImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertyImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -28,7 +28,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import org.jbpm.api.model.Property;
+import org.jbpm.api.model.preview.Property;
/**
* A Property, which is used in the definition of attributes for a Process and common activity attributes
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertySupportImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertySupportImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/PropertySupportImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -37,8 +37,8 @@
import javax.persistence.MapKey;
import javax.persistence.OneToMany;
-import org.jbpm.api.model.Property;
import org.jbpm.api.model.internal.PropertySupport;
+import org.jbpm.api.model.preview.Property;
/**
* Basic property support
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ReceiveTaskImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ReceiveTaskImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/ReceiveTaskImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -31,12 +31,12 @@
import org.jbpm.api.InvalidProcessException;
import org.jbpm.api.NotImplementedException;
-import org.jbpm.api.client.MessageListener;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.client.preview.MessageListener;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.ReceiveTask;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.ReceiveTask;
import org.jbpm.api.runtime.ExecutionContext;
import org.jbpm.api.runtime.Token;
import org.jbpm.api.runtime.TokenExecutor;
@@ -165,7 +165,7 @@
}
@Override
- protected void create(Process proc)
+ protected void create(ProcessInstance proc)
{
super.create(proc);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SendTaskImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SendTaskImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SendTaskImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -27,12 +27,12 @@
import javax.persistence.Transient;
import org.jbpm.api.InvalidProcessException;
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.SendTask;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.SendTask;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.Token;
import org.jbpm.ri.runtime.MessageSender;
@@ -119,7 +119,7 @@
}
@Override
- protected void create(Process proc)
+ protected void create(ProcessInstance proc)
{
super.create(proc);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SignalImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SignalImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/SignalImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -31,8 +31,8 @@
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
+import org.jbpm.api.model.preview.Signal;
/**
* A Signal thrown by the ProcessEngine
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/StartEventImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/StartEventImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/StartEventImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -30,20 +30,20 @@
import org.jbpm.api.Constants;
import org.jbpm.api.InvalidProcessException;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.client.SignalListener;
+import org.jbpm.api.client.preview.SignalListener;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.model.SequenceFlow;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.StartEvent;
-import org.jbpm.api.model.Signal.SignalType;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.api.runtime.SignalHandler;
import org.jbpm.api.runtime.Token;
import org.jbpm.api.service.ExecutionService;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.service.preview.SignalService;
import org.jbpm.ri.model.builder.SingleOutFlowSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -187,7 +187,7 @@
// There MAY be multiple Start Events for a given Process level. Each Start Event is an independent event.
// That is, a Process Instance SHALL be generated when the Start Event is triggered.
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
StartEvent startEvent = proc.getNode(StartEvent.class, startEventName);
ExecutionService execService = engine.getService(ExecutionService.class);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/TaskImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -41,20 +41,20 @@
import org.jbpm.api.NotImplementedException;
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.Expression;
-import org.jbpm.api.model.InputSet;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.OutputSet;
-import org.jbpm.api.model.Property;
import org.jbpm.api.model.SequenceFlow;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Task;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.InputSet;
+import org.jbpm.api.model.preview.OutputSet;
+import org.jbpm.api.model.preview.Property;
+import org.jbpm.api.model.preview.Signal;
import org.jbpm.api.runtime.ExecutionContext;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.SignalHandler;
import org.jbpm.api.runtime.Token;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.service.preview.SignalService;
import org.jbpm.ri.model.builder.SingleInFlowSupport;
import org.jbpm.ri.model.builder.SingleOutFlowSupport;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/UserTaskImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/UserTaskImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/UserTaskImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -33,13 +33,13 @@
import javax.persistence.Transient;
import org.jbpm.api.InvalidProcessException;
-import org.jbpm.api.client.MessageListener;
-import org.jbpm.api.client.UserTaskCallback;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.client.preview.MessageListener;
+import org.jbpm.api.client.preview.UserTaskCallback;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.UserTask;
import org.jbpm.api.model.internal.ProcessStructure;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.UserTask;
import org.jbpm.api.runtime.ExecutionContext;
import org.jbpm.api.runtime.Token;
import org.jbpm.api.runtime.TokenExecutor;
@@ -202,7 +202,7 @@
}
@Override
- protected void create(Process proc)
+ protected void create(ProcessInstance proc)
{
super.create(proc);
@@ -212,7 +212,7 @@
}
@Override
- protected void register(Process proc)
+ protected void register(ProcessInstance proc)
{
super.register(proc);
@@ -227,7 +227,7 @@
}
@Override
- protected void unregister(Process proc)
+ protected void unregister(ProcessInstance proc)
{
super.unregister(proc);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/EventBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/EventBuilderImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/EventBuilderImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -24,8 +24,8 @@
//$Id$
import org.jbpm.api.model.Event;
-import org.jbpm.api.model.Signal.SignalType;
-import org.jbpm.api.model.builder.EventBuilder;
+import org.jbpm.api.model.builder.preview.EventBuilder;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.ri.model.EventImpl;
import org.jbpm.ri.model.MessageImpl;
import org.jbpm.ri.model.SignalImpl;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GatewayBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GatewayBuilderImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GatewayBuilderImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,7 +26,7 @@
import org.jbpm.api.model.Gateway;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.SequenceFlow.ConditionType;
-import org.jbpm.api.model.builder.GatewayBuilder;
+import org.jbpm.api.model.builder.preview.GatewayBuilder;
import org.jbpm.ri.model.ExpressionImpl;
import org.jbpm.ri.model.GatewayImpl;
import org.jbpm.ri.model.SequenceFlowImpl;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GroupBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GroupBuilderImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/GroupBuilderImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -23,9 +23,9 @@
//$Id$
-import org.jbpm.api.model.Group;
-import org.jbpm.api.model.Group.GroupType;
-import org.jbpm.api.model.builder.GroupBuilder;
+import org.jbpm.api.model.builder.preview.GroupBuilder;
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.Group.GroupType;
import org.jbpm.ri.model.GroupImpl;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/MessageBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/MessageBuilderImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/MessageBuilderImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,9 +25,9 @@
import javax.management.ObjectName;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Property;
-import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Property;
import org.jbpm.ri.model.MessageImpl;
import org.jbpm.ri.model.ParticipantImpl;
import org.jbpm.ri.model.PropertyImpl;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/ProcessBuilderImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,20 +25,20 @@
import org.jbpm.api.NotImplementedException;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.Gateway.GatewayType;
-import org.jbpm.api.model.Group.GroupType;
import org.jbpm.api.model.Task.TaskType;
-import org.jbpm.api.model.builder.EventBuilder;
-import org.jbpm.api.model.builder.GatewayBuilder;
-import org.jbpm.api.model.builder.GroupBuilder;
-import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.model.builder.preview.EventBuilder;
+import org.jbpm.api.model.builder.preview.GatewayBuilder;
+import org.jbpm.api.model.builder.preview.GroupBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
+import org.jbpm.api.model.preview.Group.GroupType;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.SignalHandler;
@@ -63,7 +63,7 @@
import org.jbpm.ri.model.UserTaskImpl;
/**
- * The ProcessBuilder can be used to dynamically build a {@link Process}.
+ * The ProcessBuilder can be used to dynamically build a {@link ProcessInstance}.
*
* @author thomas.diesler at jboss.com
* @since 08-Jul-2008
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/SignalBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/SignalBuilderImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/SignalBuilderImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,9 +25,9 @@
import javax.management.ObjectName;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Signal.SignalType;
-import org.jbpm.api.model.builder.SignalBuilder;
+import org.jbpm.api.model.builder.preview.SignalBuilder;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.ri.model.SignalImpl;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/TaskBuilderImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/TaskBuilderImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/model/builder/TaskBuilderImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -23,10 +23,10 @@
//$Id$
-import org.jbpm.api.model.Property;
import org.jbpm.api.model.Task;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.model.preview.Property;
import org.jbpm.ri.model.ExpressionImpl;
import org.jbpm.ri.model.InputSetImpl;
import org.jbpm.ri.model.MessageImpl;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/AssignmentInterceptor.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/AssignmentInterceptor.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/AssignmentInterceptor.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -23,10 +23,10 @@
//$Id$
-import org.jbpm.api.model.Assignment;
import org.jbpm.api.model.Expression;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Assignment.AssignTime;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
import org.jbpm.api.runtime.ExecutionContext;
import org.jbpm.api.runtime.Token;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingExecutionContext.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingExecutionContext.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingExecutionContext.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -29,13 +29,13 @@
import java.util.Map;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Property;
+import org.jbpm.api.model.preview.Property;
import org.jbpm.api.runtime.ExecutionContext;
/**
- * An ExecutionContext that delegates to the current {@link Node} or {@link Process} for property rerieval.
+ * An ExecutionContext that delegates to the current {@link Node} or {@link ProcessInstance} for property rerieval.
*
* @author Thomas.Diesler at jboss.com
* @since 15-Aug-2008
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingToken.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingToken.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/DelegatingToken.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,7 +25,7 @@
import org.hibernate.Session;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.SequenceFlow;
import org.jbpm.api.runtime.ExecutionContext;
import org.jbpm.api.runtime.Token;
@@ -82,7 +82,7 @@
}
@Override
- public Process getProcess()
+ public ProcessInstance getProcess()
{
return delegateToken.getProcess();
}
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/MessageSender.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/MessageSender.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/MessageSender.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,14 +26,14 @@
import javax.management.ObjectName;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Message;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Participant;
-import org.jbpm.api.model.Property;
-import org.jbpm.api.model.builder.MessageBuilder;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Participant;
+import org.jbpm.api.model.preview.Property;
import org.jbpm.api.runtime.ExecutionContext;
import org.jbpm.api.runtime.Token;
-import org.jbpm.api.service.MessageService;
+import org.jbpm.api.service.preview.MessageService;
import org.jbpm.ri.model.MessageImpl;
import org.jbpm.ri.model.ParticipantImpl;
import org.jbpm.ri.model.builder.MessageBuilderImpl;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/PersistenceSessionInterceptor.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/PersistenceSessionInterceptor.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/PersistenceSessionInterceptor.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -27,7 +27,7 @@
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.Node;
import org.jbpm.api.runtime.Token.TokenStatus;
-import org.jbpm.api.service.PersistenceService;
+import org.jbpm.api.service.preview.PersistenceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RunnableToken.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RunnableToken.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RunnableToken.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -22,13 +22,13 @@
package org.jbpm.ri.runtime;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.SequenceFlow;
-import org.jbpm.api.model.Process.ProcessStatus;
+import org.jbpm.api.model.ProcessInstance.ProcessStatus;
import org.jbpm.api.runtime.Token;
import org.jbpm.api.runtime.TokenExecutor;
import org.jbpm.api.runtime.Token.TokenStatus;
-import org.jbpm.api.service.ProcessService;
+import org.jbpm.api.service.ProcessInstanceService;
import org.jbpm.ri.model.ProcessImpl;
import org.jbpm.ri.service.ProcessServiceImpl;
import org.slf4j.Logger;
@@ -69,7 +69,7 @@
public void run()
{
- Process proc = rtProc.getProcess();
+ ProcessInstance proc = rtProc.getProcess();
try
{
SequenceFlow flow = token.getSequenceFlow();
@@ -90,7 +90,7 @@
RuntimeContext rtContext = new RuntimeContext(tokenExecutor, tokCopy);
// Add the interceptors that are defined on the ProcessService
- ProcessServiceImpl procService = (ProcessServiceImpl)node.getProcessEngine().getService(ProcessService.class);
+ ProcessServiceImpl procService = (ProcessServiceImpl)node.getProcessEngine().getService(ProcessInstanceService.class);
for (NodeInterceptor itor : procService.getNodeInterceptors())
rtContext.addInterceptor(itor);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RuntimeProcess.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RuntimeProcess.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RuntimeProcess.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -23,12 +23,12 @@
//$Id$
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.runtime.TokenExecutor;
/**
- * A RuntimeProcess add runtime behaviour to the {@link Process} <p/> To protect the engine from maligious user code it
- * does not extend {@link Process} directly.
+ * A RuntimeProcess add runtime behaviour to the {@link ProcessInstance} <p/> To protect the engine from maligious user code it
+ * does not extend {@link ProcessInstance} directly.
*
* @author thomas.diesler at jboss.com
* @since 08-Jul-2008
@@ -36,12 +36,12 @@
public interface RuntimeProcess
{
/**
- * Get the associated {@link Process}
+ * Get the associated {@link ProcessInstance}
*/
- Process getProcess();
+ ProcessInstance getProcess();
/**
- * Get the {@link TokenExecutor} for this {@link Process}
+ * Get the {@link TokenExecutor} for this {@link ProcessInstance}
*/
TokenExecutor getTokenExecutor();
}
\ No newline at end of file
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RuntimeProcessImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RuntimeProcessImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/RuntimeProcessImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -23,27 +23,27 @@
//$Id$
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.runtime.TokenExecutor;
/**
- * A RuntimeProcess add runtime behaviour to the {@link Process}
+ * A RuntimeProcess add runtime behaviour to the {@link ProcessInstance}
*
* @author thomas.diesler at jboss.com
* @since 08-Jul-2008
*/
public class RuntimeProcessImpl implements RuntimeProcess
{
- private Process proc;
+ private ProcessInstance proc;
private TokenExecutor tokenExecutor;
- public RuntimeProcessImpl(Process proc)
+ public RuntimeProcessImpl(ProcessInstance proc)
{
this.proc = proc;
this.tokenExecutor = new TokenExecutorImpl(this);
}
- public Process getProcess()
+ public ProcessInstance getProcess()
{
return proc;
}
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenExecutorImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenExecutorImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenExecutorImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -32,7 +32,7 @@
import java.util.concurrent.Executors;
import org.jbpm.api.model.SequenceFlow;
-import org.jbpm.api.model.Process.ProcessStatus;
+import org.jbpm.api.model.ProcessInstance.ProcessStatus;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.Token;
import org.jbpm.api.runtime.TokenExecutor;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TokenImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,7 +25,7 @@
import org.hibernate.Session;
import org.jboss.util.id.UID;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.SequenceFlow;
import org.jbpm.api.runtime.Attachments;
import org.jbpm.api.runtime.BasicExecutionContext;
@@ -51,13 +51,13 @@
private SequenceFlow flow;
private ExecutionContext context;
private TokenStatus status;
- private Process process;
+ private ProcessInstance process;
private Session session;
/**
* Construct a Token with given {@link Attachments}
*/
- public TokenImpl(Process process, Attachments att)
+ public TokenImpl(ProcessInstance process, Attachments att)
{
this.context = new BasicExecutionContext(att);
this.id = new UID().toString();
@@ -84,7 +84,7 @@
}
@Override
- public Process getProcess()
+ public ProcessInstance getProcess()
{
return process;
}
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TransactionInterceptor.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TransactionInterceptor.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/runtime/TransactionInterceptor.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -29,12 +29,12 @@
import org.jbpm.api.NotImplementedException;
import org.jbpm.api.Constants.TxType;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Group;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Property;
-import org.jbpm.api.model.Group.GroupType;
+import org.jbpm.api.model.preview.Group;
+import org.jbpm.api.model.preview.Property;
+import org.jbpm.api.model.preview.Group.GroupType;
import org.jbpm.api.runtime.Token;
-import org.jbpm.api.service.PersistenceService;
+import org.jbpm.api.service.preview.PersistenceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ExecutionServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ExecutionServiceImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ExecutionServiceImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -33,21 +33,21 @@
import org.jbpm.api.InvalidProcessException;
import org.jbpm.api.ProcessTimeoutException;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Assignment;
import org.jbpm.api.model.Expression;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.StartEvent;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
-import org.jbpm.api.model.Process.ProcessStatus;
-import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.ProcessInstance.ProcessStatus;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.api.runtime.Attachments;
import org.jbpm.api.runtime.ExecutionContext;
import org.jbpm.api.runtime.Token;
import org.jbpm.api.runtime.TokenExecutor;
import org.jbpm.api.service.ExecutionService;
-import org.jbpm.api.service.ProcessService;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.service.ProcessInstanceService;
+import org.jbpm.api.service.preview.SignalService;
import org.jbpm.ri.model.ProcessImpl;
import org.jbpm.ri.model.SequenceFlowImpl;
import org.jbpm.ri.model.SignalImpl;
@@ -81,7 +81,7 @@
}
@Override
- public void startProcess(Process proc, Attachments att)
+ public void startProcess(ProcessInstance proc, Attachments att)
{
// Get the None Start Event if there is one and start the initial flow
StartEvent start = getNoneStartEvent(proc);
@@ -98,12 +98,12 @@
}
@Override
- public void startProcess(Process proc, StartEvent start, Attachments att)
+ public void startProcess(ProcessInstance proc, StartEvent start, Attachments att)
{
startProcessInternal(proc, start, att);
}
- private synchronized void startProcessInternal(Process proc, StartEvent start, Attachments att)
+ private synchronized void startProcessInternal(ProcessInstance proc, StartEvent start, Attachments att)
{
// Prepare the process to start
startProcessPrepare(proc);
@@ -158,7 +158,7 @@
tokenExecutor.start(initialToken);
}
- private void startProcessPrepare(Process proc)
+ private void startProcessPrepare(ProcessInstance proc)
{
// Veriy the process state
ProcessStatus procStatus = proc.getProcessStatus();
@@ -167,13 +167,13 @@
// Register the process if needed
ProcessEngine engine = getProcessEngine();
- ProcessService procService = engine.getService(ProcessService.class);
+ ProcessInstanceService procService = engine.getService(ProcessInstanceService.class);
if (procService.getProcess(proc.getKey()) == null)
procService.registerProcess(proc);
}
// Evaluate the Start time assignments
- private void startTimeAssignments(Process proc, Token token)
+ private void startTimeAssignments(ProcessInstance proc, Token token)
{
DelegatingToken delegatingToken = new DelegatingToken((MutableToken)token);
ExecutionContext exContext = token.getExecutionContext();
@@ -190,12 +190,12 @@
}
}
- public ProcessStatus waitForEnd(Process proc)
+ public ProcessStatus waitForEnd(ProcessInstance proc)
{
return waitForEndInternal(proc, 0);
}
- public ProcessStatus waitForEnd(Process proc, long timeout)
+ public ProcessStatus waitForEnd(ProcessInstance proc, long timeout)
{
return waitForEndInternal(proc, timeout);
}
@@ -205,7 +205,7 @@
* arrive at an End Event. The Process will be in a running state until all Tokens are consumed. If the process was
* aborted this method throws the causing RuntimeException if avaialable.
*/
- private ProcessStatus waitForEndInternal(Process proc, long timeout)
+ private ProcessStatus waitForEndInternal(ProcessInstance proc, long timeout)
{
ProcessImpl procImpl = (ProcessImpl)proc;
@@ -261,7 +261,7 @@
// this could happen when the Process never received a start signal
// and then we get here because of a ProcessTimeoutException
ProcessEngine engine = getProcessEngine();
- ProcessService procService = engine.getService(ProcessService.class);
+ ProcessInstanceService procService = engine.getService(ProcessInstanceService.class);
if (procService.getProcess(proc.getKey()) != null)
procService.unregisterProcess(proc.getKey());
}
@@ -270,13 +270,13 @@
return status;
}
- private boolean isProcessTerminated(Process proc)
+ private boolean isProcessTerminated(ProcessInstance proc)
{
ProcessStatus status = proc.getProcessStatus();
return status == ProcessStatus.Cancelled || status == ProcessStatus.Completed || status == ProcessStatus.Aborted;
}
- private StartEvent getNoneStartEvent(Process proc)
+ private StartEvent getNoneStartEvent(ProcessInstance proc)
{
StartEvent start = null;
for (StartEvent aux : proc.getNodes(StartEvent.class))
@@ -291,7 +291,7 @@
return start;
}
- private RuntimeProcess getRuntimeProcess(Process proc, boolean createNew)
+ private RuntimeProcess getRuntimeProcess(ProcessInstance proc, boolean createNew)
{
RuntimeProcess rtProcess;
synchronized (runtimeProcesses)
@@ -322,7 +322,7 @@
{
TokenExecutor tokenExecutor = rtProc.getTokenExecutor();
ProcessImpl procImpl = (ProcessImpl)rtProc.getProcess();
- Process proc = rtProc.getProcess();
+ ProcessInstance proc = rtProc.getProcess();
ProcessEngine engine = getProcessEngine();
SignalService sigService = engine.getService(SignalService.class);
@@ -367,7 +367,7 @@
synchronized (proc)
{
- ProcessService procService = engine.getService(ProcessService.class);
+ ProcessInstanceService procService = engine.getService(ProcessInstanceService.class);
procService.unregisterProcess(procID);
runtimeProcesses.remove(procID);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/HibernatePersistenceServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/HibernatePersistenceServiceImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/HibernatePersistenceServiceImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -38,10 +38,10 @@
import org.jbpm.api.ProcessNotFoundException;
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.service.PersistenceService;
import org.jbpm.api.service.Service;
+import org.jbpm.api.service.preview.PersistenceService;
import org.jbpm.ri.model.AbstractElementImpl;
import org.jbpm.ri.model.ProcessDefinitionImpl;
import org.jbpm.ri.model.ProcessImpl;
@@ -151,7 +151,7 @@
}
@Override
- public ObjectName saveProcess(Process proc)
+ public ObjectName saveProcess(ProcessInstance proc)
{
log.debug("START saveProcess: " + proc.getKey());
Session session = getSessionFactory().openSession();
@@ -170,15 +170,15 @@
}
@Override
- public Process loadProcess(ObjectName procID)
+ public ProcessInstance loadProcess(ObjectName procID)
{
log.debug("START loadProcess: " + procID);
- Process proc = null;
+ ProcessInstance proc = null;
Session session = getSessionFactory().openSession();
try
{
Integer id = Integer.valueOf(procID.getKeyProperty("id"));
- proc = (Process)session.load(ProcessImpl.class, id);
+ proc = (ProcessInstance)session.load(ProcessImpl.class, id);
AbstractElementImpl elImpl = (AbstractElementImpl)proc;
elImpl.initialize(session);
}
@@ -195,7 +195,7 @@
}
@Override
- public void deleteProcess(Process proc)
+ public void deleteProcess(ProcessInstance proc)
{
log.debug("START deleteProcess: " + proc);
Session session = getSessionFactory().openSession();
@@ -204,7 +204,7 @@
{
ObjectName procID = proc.getKey();
Integer id = Integer.valueOf(procID.getKeyProperty("id"));
- proc = (Process)session.load(ProcessImpl.class, id);
+ proc = (ProcessInstance)session.load(ProcessImpl.class, id);
session.delete(proc);
tx.commit();
}
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/InMemoryPersistenceServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/InMemoryPersistenceServiceImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/InMemoryPersistenceServiceImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -32,9 +32,9 @@
import org.jbpm.api.ProcessNotFoundException;
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.service.PersistenceService;
+import org.jbpm.api.service.preview.PersistenceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,7 +50,7 @@
final Logger log = LoggerFactory.getLogger(InMemoryPersistenceServiceImpl.class);
private Map<ObjectName, ProcessDefinition> procDefs = new HashMap<ObjectName, ProcessDefinition>();
- private Map<ObjectName, Process> procs = new HashMap<ObjectName, Process>();
+ private Map<ObjectName, ProcessInstance> procs = new HashMap<ObjectName, ProcessInstance>();
private Map<ObjectName, Node> nodes = new HashMap<ObjectName, Node>();
@Override
@@ -89,7 +89,7 @@
}
@Override
- public ObjectName saveProcess(Process proc)
+ public ObjectName saveProcess(ProcessInstance proc)
{
procs.put(proc.getKey(), proc);
@@ -100,9 +100,9 @@
}
@Override
- public Process loadProcess(ObjectName procID)
+ public ProcessInstance loadProcess(ObjectName procID)
{
- Process proc = procs.get(procID);
+ ProcessInstance proc = procs.get(procID);
if (proc == null)
throw new ProcessNotFoundException("Cannot find process: " + procID);
@@ -110,7 +110,7 @@
}
@Override
- public void deleteProcess(Process proc)
+ public void deleteProcess(ProcessInstance proc)
{
procs.remove(proc.getKey());
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/MessageBuilderServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/MessageBuilderServiceImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/MessageBuilderServiceImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -24,9 +24,9 @@
// $Id$
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.builder.MessageBuilder;
-import org.jbpm.api.service.MessageBuilderService;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.service.preview.MessageBuilderService;
import org.jbpm.ri.model.builder.MessageBuilderImpl;
/**
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/MessageServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/MessageServiceImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/MessageServiceImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -27,10 +27,10 @@
import javax.transaction.Synchronization;
import org.hibernate.Transaction;
-import org.jbpm.api.client.MessageListener;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.service.MessageService;
+import org.jbpm.api.client.preview.MessageListener;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.service.preview.MessageService;
import org.jbpm.ri.runtime.TransactionAssociation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ProcessBuilderServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ProcessBuilderServiceImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ProcessBuilderServiceImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -24,13 +24,13 @@
// $Id$
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.service.ProcessBuilderService;
import org.jbpm.ri.model.builder.ProcessBuilderImpl;
/**
- * The ProcessBuilder can be used to build a {@link Process} dynamically.
+ * The ProcessBuilder can be used to build a {@link ProcessInstance} dynamically.
*
* @author thomas.diesler at jboss.com
* @since 18-Jun-2008
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ProcessServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ProcessServiceImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/ProcessServiceImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -30,10 +30,10 @@
import javax.management.ObjectName;
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Process;
-import org.jbpm.api.model.Process.ProcessStatus;
-import org.jbpm.api.service.PersistenceService;
-import org.jbpm.api.service.ProcessService;
+import org.jbpm.api.model.ProcessInstance;
+import org.jbpm.api.model.ProcessInstance.ProcessStatus;
+import org.jbpm.api.service.ProcessInstanceService;
+import org.jbpm.api.service.preview.PersistenceService;
import org.jbpm.ri.model.ProcessImpl;
import org.jbpm.ri.runtime.NodeInterceptor;
import org.slf4j.Logger;
@@ -45,7 +45,7 @@
* @author thomas.diesler at jboss.com
* @since 18-Jun-2008
*/
-public class ProcessServiceImpl extends ProcessService implements MutableService
+public class ProcessServiceImpl extends ProcessInstanceService implements MutableService
{
// Provide logging
final static Logger log = LoggerFactory.getLogger(ProcessServiceImpl.class);
@@ -73,7 +73,7 @@
}
@Override
- public ObjectName registerProcess(Process proc)
+ public ObjectName registerProcess(ProcessInstance proc)
{
ObjectName procID = super.registerProcess(proc);
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/SignalBuilderServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/SignalBuilderServiceImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/SignalBuilderServiceImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -24,9 +24,9 @@
// $Id$
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.builder.SignalBuilder;
-import org.jbpm.api.service.SignalBuilderService;
+import org.jbpm.api.model.builder.preview.SignalBuilder;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.service.preview.SignalBuilderService;
import org.jbpm.ri.model.builder.SignalBuilderImpl;
/**
Modified: projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/SignalServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/SignalServiceImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/java/org/jbpm/ri/service/SignalServiceImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -24,7 +24,7 @@
// $Id$
import org.jbpm.api.client.ProcessEngine;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.service.preview.SignalService;
/**
* An implementation of the SignalService
Copied: projects/spec/trunk/modules/ri/src/main/resources/org.jbpm.api.client.Configuration (from rev 2888, projects/spec/trunk/modules/ri/src/main/resources/org.jbpm.api.config.Configuration)
===================================================================
--- projects/spec/trunk/modules/ri/src/main/resources/org.jbpm.api.client.Configuration (rev 0)
+++ projects/spec/trunk/modules/ri/src/main/resources/org.jbpm.api.client.Configuration 2008-11-12 10:08:22 UTC (rev 2889)
@@ -0,0 +1 @@
+org.jbpm.api.client.internal.MicrocontainerConfiguration
\ No newline at end of file
Deleted: projects/spec/trunk/modules/ri/src/main/resources/org.jbpm.api.config.Configuration
===================================================================
--- projects/spec/trunk/modules/ri/src/main/resources/org.jbpm.api.config.Configuration 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/main/resources/org.jbpm.api.config.Configuration 2008-11-12 10:08:22 UTC (rev 2889)
@@ -1 +0,0 @@
-org.jbpm.api.config.MicrocontainerConfiguration
\ No newline at end of file
Modified: projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ComplexGatewayPersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ComplexGatewayPersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ComplexGatewayPersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,8 +25,8 @@
import javax.management.ObjectName;
-import org.jbpm.api.model.ComplexGateway;
import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.preview.ComplexGateway;
import org.jbpm.ri.model.ComplexGatewayImpl;
/**
Modified: projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/EndEventPersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/EndEventPersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/EndEventPersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -26,10 +26,10 @@
import javax.management.ObjectName;
import org.jbpm.api.model.EndEvent;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Event.EventDetailType;
-import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.ri.model.EndEventImpl;
import org.jbpm.ri.model.MessageImpl;
import org.jbpm.ri.model.SignalImpl;
Modified: projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/InclusiveGatewayPersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/InclusiveGatewayPersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/InclusiveGatewayPersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,8 +25,8 @@
import javax.management.ObjectName;
-import org.jbpm.api.model.InclusiveGateway;
import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.preview.InclusiveGateway;
import org.jbpm.ri.model.InclusiveGatewayImpl;
/**
Modified: projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/NodePersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/NodePersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/NodePersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -27,7 +27,7 @@
import org.hibernate.Session;
import org.jbpm.api.model.Node;
-import org.jbpm.api.service.PersistenceService;
+import org.jbpm.api.service.preview.PersistenceService;
import org.jbpm.api.test.CTSTestCase;
import org.jbpm.ri.service.HibernatePersistenceServiceImpl;
Modified: projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ParallelGatewayPersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ParallelGatewayPersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ParallelGatewayPersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,8 +25,8 @@
import javax.management.ObjectName;
-import org.jbpm.api.model.ParallelGateway;
import org.jbpm.api.model.Gateway.GatewayType;
+import org.jbpm.api.model.preview.ParallelGateway;
import org.jbpm.ri.model.ParallelGatewayImpl;
/**
Modified: projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ProcessDefinitionPersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ProcessDefinitionPersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ProcessDefinitionPersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -31,7 +31,7 @@
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.model.StartEvent;
import org.jbpm.api.model.Task;
-import org.jbpm.api.service.PersistenceService;
+import org.jbpm.api.service.preview.PersistenceService;
import org.jbpm.api.test.CTSTestCase;
import org.jbpm.api.test.ProcessCatalog;
Modified: projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ProcessPersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ProcessPersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/ProcessPersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -28,12 +28,12 @@
import org.jbpm.api.ProcessNotFoundException;
import org.jbpm.api.client.ProcessEngine;
import org.jbpm.api.model.EndEvent;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.model.StartEvent;
import org.jbpm.api.model.Task;
-import org.jbpm.api.service.PersistenceService;
import org.jbpm.api.service.ProcessDefinitionService;
+import org.jbpm.api.service.preview.PersistenceService;
import org.jbpm.api.test.CTSTestCase;
import org.jbpm.api.test.ProcessCatalog;
@@ -59,12 +59,12 @@
procDefService.registerProcessDefinition(procDef);
// Create and save the Process
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
service.saveProcess(proc);
// Load the process
ObjectName procID = proc.getKey();
- Process loadProc = service.loadProcess(procID);
+ ProcessInstance loadProc = service.loadProcess(procID);
ProcessCatalog.validateDefaultProcess(loadProc.getProcessDefinition());
StartEvent start = loadProc.getNode(StartEvent.class, "Start");
Modified: projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/StartEventPersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/StartEventPersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/StartEventPersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,11 +25,11 @@
import javax.management.ObjectName;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.StartEvent;
import org.jbpm.api.model.Event.EventDetailType;
-import org.jbpm.api.model.Signal.SignalType;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.model.preview.Signal.SignalType;
import org.jbpm.ri.model.MessageImpl;
import org.jbpm.ri.model.SignalImpl;
import org.jbpm.ri.model.StartEventImpl;
Modified: projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/TaskPersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/TaskPersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/TaskPersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -28,16 +28,16 @@
import javax.management.ObjectName;
-import org.jbpm.api.model.Assignment;
import org.jbpm.api.model.Expression;
-import org.jbpm.api.model.InputSet;
import org.jbpm.api.model.Node;
-import org.jbpm.api.model.OutputSet;
import org.jbpm.api.model.SequenceFlow;
import org.jbpm.api.model.Task;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.SequenceFlow.ConditionType;
import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.model.preview.Assignment;
+import org.jbpm.api.model.preview.InputSet;
+import org.jbpm.api.model.preview.OutputSet;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
import org.jbpm.api.runtime.ExecutionHandler;
import org.jbpm.api.runtime.FlowHandler;
import org.jbpm.api.runtime.SignalHandler;
Modified: projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/UserTaskPersistenceTest.java
===================================================================
--- projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/UserTaskPersistenceTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/ri/src/test/java/org/jbpm/test/ri/service/persistence/UserTaskPersistenceTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,9 +25,9 @@
import javax.management.ObjectName;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.UserTask;
import org.jbpm.api.model.Task.TaskType;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.UserTask;
import org.jbpm.ri.model.MessageImpl;
import org.jbpm.ri.model.UserTaskImpl;
Modified: projects/spec/trunk/modules/samples/airticket/server/src/main/java/org/jboss/bpm/samples/airticket/AirticketProcessBuilder.java
===================================================================
--- projects/spec/trunk/modules/samples/airticket/server/src/main/java/org/jboss/bpm/samples/airticket/AirticketProcessBuilder.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/samples/airticket/server/src/main/java/org/jboss/bpm/samples/airticket/AirticketProcessBuilder.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -27,13 +27,13 @@
import org.jbpm.api.model.Expression;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.Gateway.GatewayType;
import org.jbpm.api.model.Task.TaskType;
-import org.jbpm.api.model.builder.GatewayBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.TaskBuilder;
+import org.jbpm.api.model.builder.preview.GatewayBuilder;
+import org.jbpm.api.model.preview.Assignment.AssignTime;
import org.jbpm.api.service.ProcessBuilderService;
/**
Modified: projects/spec/trunk/modules/samples/airticket/server/src/main/java/org/jboss/bpm/samples/airticket/server/AirticketServiceImpl.java
===================================================================
--- projects/spec/trunk/modules/samples/airticket/server/src/main/java/org/jboss/bpm/samples/airticket/server/AirticketServiceImpl.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/samples/airticket/server/src/main/java/org/jboss/bpm/samples/airticket/server/AirticketServiceImpl.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -15,18 +15,18 @@
import org.jboss.bpm.samples.airticket.client.OfferMessage;
import org.jboss.bpm.samples.airticket.client.OrderMessage;
import org.jboss.bpm.samples.airticket.client.RequestMessage;
-import org.jbpm.api.client.MessageListener;
-import org.jbpm.api.client.SignalListener;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.client.preview.MessageListener;
+import org.jbpm.api.client.preview.SignalListener;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.builder.MessageBuilder;
-import org.jbpm.api.model.builder.ObjectNameFactory;
-import org.jbpm.api.service.MessageBuilderService;
-import org.jbpm.api.service.MessageService;
-import org.jbpm.api.service.ProcessService;
-import org.jbpm.api.service.SignalService;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.Signal;
+import org.jbpm.api.service.ProcessInstanceService;
+import org.jbpm.api.service.preview.MessageBuilderService;
+import org.jbpm.api.service.preview.MessageService;
+import org.jbpm.api.service.preview.SignalService;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
@@ -37,7 +37,7 @@
public void sendMessage(GwtMessage gwtMsg)
{
- ProcessService procService = ProcessService.locateProcessService();
+ ProcessInstanceService procService = ProcessInstanceService.locateProcessService();
MessageService mm = MessageService.locateMessageService();
SignalService sm = SignalService.locateSignalService();
@@ -65,7 +65,7 @@
System.out.println("Create new Process");
AirticketProcessBuilder procBuilder = new AirticketProcessBuilder(sampleID);
ProcessDefinition procDef = procBuilder.buildProcessDefinition();
- Process proc = procDef.newInstance();
+ ProcessInstance proc = procDef.newInstance();
procService.registerProcess(proc);
procID = proc.startProcess();
httpSession.setAttribute("procID", procID);
Modified: projects/spec/trunk/modules/samples/airticket/server/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java
===================================================================
--- projects/spec/trunk/modules/samples/airticket/server/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-11-12 07:11:59 UTC (rev 2888)
+++ projects/spec/trunk/modules/samples/airticket/server/src/test/java/org/jboss/bpm/samples/airticket/AirticketTest.java 2008-11-12 10:08:22 UTC (rev 2889)
@@ -25,17 +25,17 @@
import javax.management.ObjectName;
-import org.jbpm.api.client.MessageListener;
-import org.jbpm.api.client.UserTaskCallback;
-import org.jbpm.api.model.Message;
-import org.jbpm.api.model.Process;
+import org.jbpm.api.client.preview.MessageListener;
+import org.jbpm.api.client.preview.UserTaskCallback;
+import org.jbpm.api.model.ProcessInstance;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.UserTask;
-import org.jbpm.api.model.builder.MessageBuilder;
-import org.jbpm.api.model.builder.ObjectNameFactory;
+import org.jbpm.api.model.builder.preview.MessageBuilder;
+import org.jbpm.api.model.builder.preview.ObjectNameFactory;
+import org.jbpm.api.model.preview.Message;
+import org.jbpm.api.model.preview.UserTask;
import org.jbpm.api.runtime.Attachments;
-import org.jbpm.api.service.MessageBuilderService;
-import org.jbpm.api.service.MessageService;
+import org.jbpm.api.service.preview.MessageBuilderService;
+import org.jbpm.api.service.preview.MessageService;
import org.jbpm.api.test.CTSTestCase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -53,7 +53,7 @@
private MessageService messageManager = MessageService.locateMessageService();
private AirticketMessageListener msgListener;
- private Process proc;
+ private ProcessInstance proc;
public void testValidData() throws Exception
{
More information about the jbpm-commits
mailing list