本文整理汇总了Java中org.camunda.bpm.engine.FormService类的典型用法代码示例。如果您正苦于以下问题:Java FormService类的具体用法?Java FormService怎么用?Java FormService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormService类属于org.camunda.bpm.engine包,在下文中一共展示了FormService类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: mockServices
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
private void mockServices(ProcessEngine engine) {
RepositoryService repoService = mock(RepositoryService.class);
IdentityService identityService = mock(IdentityService.class);
TaskService taskService = mock(TaskService.class);
RuntimeService runtimeService = mock(RuntimeService.class);
FormService formService = mock(FormService.class);
HistoryService historyService = mock(HistoryService.class);
ManagementService managementService = mock(ManagementService.class);
CaseService caseService = mock(CaseService.class);
FilterService filterService = mock(FilterService.class);
ExternalTaskService externalTaskService = mock(ExternalTaskService.class);
when(engine.getRepositoryService()).thenReturn(repoService);
when(engine.getIdentityService()).thenReturn(identityService);
when(engine.getTaskService()).thenReturn(taskService);
when(engine.getRuntimeService()).thenReturn(runtimeService);
when(engine.getFormService()).thenReturn(formService);
when(engine.getHistoryService()).thenReturn(historyService);
when(engine.getManagementService()).thenReturn(managementService);
when(engine.getCaseService()).thenReturn(caseService);
when(engine.getFilterService()).thenReturn(filterService);
when(engine.getExternalTaskService()).thenReturn(externalTaskService);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:24,代码来源:MockedProcessEngineProvider.java
示例2: getRenderedForm
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
public Response getRenderedForm() {
FormService formService = engine.getFormService();
Object startForm = formService.getRenderedStartForm(processDefinitionId);
if (startForm != null) {
String content = startForm.toString();
InputStream stream = new ByteArrayInputStream(content.getBytes(EncodingUtil.DEFAULT_ENCODING));
return Response
.ok(stream)
.type(MediaType.APPLICATION_XHTML_XML)
.build();
}
throw new InvalidRequestException(Status.NOT_FOUND, "No matching rendered start form for process definition with the id " + processDefinitionId + " found.");
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:16,代码来源:ProcessDefinitionResourceImpl.java
示例3: getFormVariables
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
public Map<String, VariableValueDto> getFormVariables(String variableNames, boolean deserializeValues) {
final FormService formService = engine.getFormService();
List<String> formVariables = null;
if(variableNames != null) {
StringListConverter stringListConverter = new StringListConverter();
formVariables = stringListConverter.convertQueryParameterToType(variableNames);
}
VariableMap startFormVariables = formService.getStartFormVariables(processDefinitionId, formVariables, deserializeValues);
return VariableValueDto.fromVariableMap(startFormVariables);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:15,代码来源:ProcessDefinitionResourceImpl.java
示例4: getRenderedForm
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
public Response getRenderedForm() {
FormService formService = engine.getFormService();
Object renderedTaskForm = formService.getRenderedTaskForm(taskId);
if(renderedTaskForm != null) {
String content = renderedTaskForm.toString();
InputStream stream = new ByteArrayInputStream(content.getBytes(EncodingUtil.DEFAULT_ENCODING));
return Response
.ok(stream)
.type(MediaType.APPLICATION_XHTML_XML)
.build();
}
throw new InvalidRequestException(Status.NOT_FOUND, "No matching rendered form for task with the id " + taskId + " found.");
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:16,代码来源:TaskResourceImpl.java
示例5: getFormVariables
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
public Map<String, VariableValueDto> getFormVariables(String variableNames, boolean deserializeValues) {
final FormService formService = engine.getFormService();
List<String> formVariables = null;
if(variableNames != null) {
StringListConverter stringListConverter = new StringListConverter();
formVariables = stringListConverter.convertQueryParameterToType(variableNames);
}
VariableMap startFormVariables = formService.getTaskFormVariables(taskId, formVariables, deserializeValues);
return VariableValueDto.fromVariableMap(startFormVariables);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:15,代码来源:TaskResourceImpl.java
示例6: setFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
@Inject
public void setFormService(FormService formService) {
this.formService = formService;
}
开发者ID:LIBCAS,项目名称:ARCLib,代码行数:5,代码来源:TaskList.java
示例7: getFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
public FormService getFormService() {
return processEngine.getFormService();
}
开发者ID:camunda,项目名称:camunda-bpm-assert-scenario,代码行数:4,代码来源:AbstractProcessEngineServicesDelegate.java
示例8: getFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
@Override
public FormService getFormService() {
return innerRule.getFormService();
}
开发者ID:camunda,项目名称:camunda-bpm-needle,代码行数:5,代码来源:ProcessEngineNeedleRule.java
示例9: getFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
@Override
public FormService getFormService() {
return delegate.getFormService();
}
开发者ID:camunda,项目名称:camunda-bpm-needle,代码行数:5,代码来源:ProcessEngineExternalResource.java
示例10: getFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
@Override
public FormService getFormService() {
return outerRule.getFormService();
}
开发者ID:camunda,项目名称:camunda-bpm-needle,代码行数:5,代码来源:ProcessEngineTestWatcher.java
示例11: getFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
@Override
public FormService getFormService() {
return processEngine.getFormService();
}
开发者ID:camunda,项目名称:camunda-bpm-needle,代码行数:5,代码来源:CamundaInstancesSupplier.java
示例12: getFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
public FormService getFormService() {
return formService;
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:ProcessEngineConfigurationImpl.java
示例13: setFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
public ProcessEngineConfigurationImpl setFormService(FormService formService) {
this.formService = formService;
return this;
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:5,代码来源:ProcessEngineConfigurationImpl.java
示例14: getFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
@Override
public FormService getFormService() {
return formService;
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:5,代码来源:ProcessEngineImpl.java
示例15: setFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
public void setFormService(FormService formService) {
this.formService = formService;
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:ProcessEngineRule.java
示例16: setUpRuntimeData
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
@Before
public void setUpRuntimeData() {
taskServiceMock = mock(TaskService.class);
when(processEngine.getTaskService()).thenReturn(taskServiceMock);
mockTask = MockProvider.createMockTask();
mockQuery = mock(TaskQuery.class);
when(mockQuery.initializeFormKeys()).thenReturn(mockQuery);
when(mockQuery.taskId(anyString())).thenReturn(mockQuery);
when(mockQuery.singleResult()).thenReturn(mockTask);
when(taskServiceMock.createTaskQuery()).thenReturn(mockQuery);
List<IdentityLink> identityLinks = new ArrayList<IdentityLink>();
mockAssigneeIdentityLink = MockProvider.createMockUserAssigneeIdentityLink();
identityLinks.add(mockAssigneeIdentityLink);
mockOwnerIdentityLink = MockProvider.createMockUserOwnerIdentityLink();
identityLinks.add(mockOwnerIdentityLink);
mockCandidateGroupIdentityLink = MockProvider.createMockCandidateGroupIdentityLink();
identityLinks.add(mockCandidateGroupIdentityLink);
mockCandidateGroup2IdentityLink = MockProvider.createAnotherMockCandidateGroupIdentityLink();
identityLinks.add(mockCandidateGroup2IdentityLink);
when(taskServiceMock.getIdentityLinksForTask(EXAMPLE_TASK_ID)).thenReturn(identityLinks);
mockTaskComment = MockProvider.createMockTaskComment();
when(taskServiceMock.getTaskComment(EXAMPLE_TASK_ID, EXAMPLE_TASK_COMMENT_ID)).thenReturn(mockTaskComment);
mockTaskComments = MockProvider.createMockTaskComments();
when(taskServiceMock.getTaskComments(EXAMPLE_TASK_ID)).thenReturn(mockTaskComments);
when(taskServiceMock.createComment(EXAMPLE_TASK_ID, null, EXAMPLE_TASK_COMMENT_FULL_MESSAGE)).thenReturn(mockTaskComment);
mockTaskAttachment = MockProvider.createMockTaskAttachment();
when(taskServiceMock.getTaskAttachment(EXAMPLE_TASK_ID, EXAMPLE_TASK_ATTACHMENT_ID)).thenReturn(mockTaskAttachment);
mockTaskAttachments = MockProvider.createMockTaskAttachments();
when(taskServiceMock.getTaskAttachments(EXAMPLE_TASK_ID)).thenReturn(mockTaskAttachments);
when(taskServiceMock.createAttachment(anyString(), anyString(), anyString(), anyString(), anyString(), anyString())).thenReturn(mockTaskAttachment);
when(taskServiceMock.createAttachment(anyString(), anyString(), anyString(), anyString(), anyString(), any(InputStream.class))).thenReturn(mockTaskAttachment);
when(taskServiceMock.getTaskAttachmentContent(EXAMPLE_TASK_ID, EXAMPLE_TASK_ATTACHMENT_ID)).thenReturn(new ByteArrayInputStream(createMockByteData()));
formServiceMock = mock(FormService.class);
when(processEngine.getFormService()).thenReturn(formServiceMock);
TaskFormData mockFormData = MockProvider.createMockTaskFormData();
when(formServiceMock.getTaskFormData(anyString())).thenReturn(mockFormData);
VariableMap variablesMock = MockProvider.createMockFormVariables();
when(formServiceMock.getTaskFormVariables(eq(EXAMPLE_TASK_ID), Matchers.<Collection<String>>any(), anyBoolean())).thenReturn(variablesMock);
repositoryServiceMock = mock(RepositoryService.class);
when(processEngine.getRepositoryService()).thenReturn(repositoryServiceMock);
ProcessDefinition mockDefinition = MockProvider.createMockDefinition();
when(repositoryServiceMock.getProcessDefinition(MockProvider.EXAMPLE_PROCESS_DEFINITION_ID)).thenReturn(mockDefinition);
managementServiceMock = mock(ManagementService.class);
when(processEngine.getManagementService()).thenReturn(managementServiceMock);
when(managementServiceMock.getProcessApplicationForDeployment(MockProvider.EXAMPLE_DEPLOYMENT_ID)).thenReturn(MockProvider.EXAMPLE_PROCESS_APPLICATION_NAME);
when(managementServiceMock.getHistoryLevel()).thenReturn(ProcessEngineConfigurationImpl.HISTORYLEVEL_FULL);
HistoryService historyServiceMock = mock(HistoryService.class);
when(processEngine.getHistoryService()).thenReturn(historyServiceMock);
historicTaskInstanceQueryMock = mock(HistoricTaskInstanceQuery.class);
when(historyServiceMock.createHistoricTaskInstanceQuery()).thenReturn(historicTaskInstanceQueryMock);
when(historicTaskInstanceQueryMock.taskId(eq(EXAMPLE_TASK_ID))).thenReturn(historicTaskInstanceQueryMock);
HistoricTaskInstance historicTaskInstanceMock = createMockHistoricTaskInstance();
when(historicTaskInstanceQueryMock.singleResult()).thenReturn(historicTaskInstanceMock);
// replace the runtime container delegate & process application service with a mock
ProcessApplicationService processApplicationService = mock(ProcessApplicationService.class);
ProcessApplicationInfo appMock = MockProvider.createMockProcessApplicationInfo();
when(processApplicationService.getProcessApplicationInfo(MockProvider.EXAMPLE_PROCESS_APPLICATION_NAME)).thenReturn(appMock);
RuntimeContainerDelegate delegate = mock(RuntimeContainerDelegate.class);
when(delegate.getProcessApplicationService()).thenReturn(processApplicationService);
RuntimeContainerDelegate.INSTANCE.set(delegate);
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:74,代码来源:TaskRestServiceInteractionTest.java
示例17: getFormService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
@Bean(name = "formService")
@Override
public FormService getFormService() {
return processEngine.getFormService();
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:6,代码来源:SpringProcessEngineServicesConfiguration.java
示例18: formService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
@Produces @ProcessEngineName("") public FormService formService(InjectionPoint ip) { return processEngine(ip).getFormService(); }
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:2,代码来源:NamedProcessEngineServicesProducer.java
示例19: formService
import org.camunda.bpm.engine.FormService; //导入依赖的package包/类
@Produces @Named @ApplicationScoped public FormService formService() { return processEngine().getFormService(); }
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:2,代码来源:ProcessEngineServicesProducer.java
注:本文中的org.camunda.bpm.engine.FormService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论