Petals-SE-Activiti 0.5.0-SNAPSHOT

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (4)

View Page History
@Test
@Deployment(resources = {"jbi/vacationRequest.bpmn20.xml"})
public void theProcessIsDeployableAndInstanciable() {
final ProcessDefinition processDefinition = this.activitiRule.getRepositoryService()
.createProcessDefinitionQuery().processDefinitionKey("vacationRequest").singleResult();
assertNotNull(processDefinition);

final Map<String, Object> variables = new HashMap<String, Object>();
variables.put("numberOfDays", 10);
variables.put("startDate", new Date());
variables.put("vacationMotivation", "Vacations");
final ProcessInstance processInstance = this.activitiRule.getRuntimeService().startProcessInstanceByKey("vacationRequest", variables);
assertNotNull(processInstance);
}
}
{code}

If your process definition includes Petals service invocations, you must use mock for these services. For this first version of the Petals SE Activiti, nothing is available to create these mocks and you will get the following stack trace in log about the service invocation:
{code}
22 mai 2015 17:15:31 org.activiti.engine.impl.webservice.WSOperation safeSend
ATTENTION: Error calling WS http://petals.ow2.org/samples/se-bpmn/notifyVacationService:notifyVacationService
java.lang.RuntimeException: Could not find conduit initiator for address: petals:///{http://petals.ow2.org/samples/se-bpmn/notifyVacationService}notifyVacation and transport: http://schemas.xmlsoap.org/soap/http
at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:225)
at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:234)
at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:103)
at org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:63)
at org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:896)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:341)
at org.activiti.engine.impl.webservice.CxfWebServiceClient.send(CxfWebServiceClient.java:38)
at org.activiti.engine.impl.webservice.WSOperation.safeSend(WSOperation.java:74)
at org.activiti.engine.impl.webservice.WSOperation.sendFor(WSOperation.java:62)
at org.activiti.engine.impl.bpmn.webservice.Operation.sendMessage(Operation.java:50)
at org.activiti.engine.impl.bpmn.behavior.WebServiceActivityBehavior.execute(WebServiceActivityBehavior.java:75)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60)
...
{code}
{code}