当前位置: 首页>>代码示例>>Java>>正文


Java TaskService.saveTask方法代码示例

本文整理汇总了Java中org.activiti.engine.TaskService.saveTask方法的典型用法代码示例。如果您正苦于以下问题:Java TaskService.saveTask方法的具体用法?Java TaskService.saveTask怎么用?Java TaskService.saveTask使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.activiti.engine.TaskService的用法示例。


在下文中一共展示了TaskService.saveTask方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setTaskProperties

import org.activiti.engine.TaskService; //导入方法依赖的package包/类
/**
 * Sets the properties on the task, using Activiti API.
 */
public void setTaskProperties(Task task, Map<QName, Serializable> properties)
{
    if(properties==null || properties.isEmpty())
        return;
    
    TypeDefinition type = typeManager.getFullTaskDefinition(task);
    Map<String, Object> variablesToSet = handlerRegistry.handleVariablesToSet(properties, type, task, Task.class);

    TaskService taskService = activitiUtil.getTaskService();
    
    // Will be set when an assignee is present in passed properties. 
    taskService.saveTask(task);            

    // Set the collected variables on the task
    taskService.setVariablesLocal(task.getId(), variablesToSet);

    setTaskOwner(task, properties);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:ActivitiPropertyConverter.java

示例2: main

import org.activiti.engine.TaskService; //导入方法依赖的package包/类
public static void main(String[] args) {
    AnnotationConfigApplicationContext ctx =
            new AnnotationConfigApplicationContext();
    ctx.register(SpringAnnotationConfiguration.class);
    ctx.refresh();

    assertNotNull(ctx.getBean(ProcessEngine.class));
    assertNotNull(ctx.getBean(RuntimeService.class));
    TaskService bean = ctx.getBean(TaskService.class);
    assertNotNull(bean);
    assertNotNull(ctx.getBean(HistoryService.class));
    assertNotNull(ctx.getBean(RepositoryService.class));
    assertNotNull(ctx.getBean(ManagementService.class));
    assertNotNull(ctx.getBean(FormService.class));
    Task task = bean.newTask();
    task.setName("哈哈");
    bean.saveTask(task);
}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:19,代码来源:InitProcessEngineBySpringAnnotation.java

示例3: saveEntity

import org.activiti.engine.TaskService; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
protected Task saveEntity(final Task savingTask) {
    final TaskService taskService = lookup(TaskService.class);
    final Task task = taskService.createTaskQuery().taskId(savingTask.getId()).singleResult();

    task.setName(savingTask.getName());
    task.setDescription(savingTask.getDescription());
    task.setDueDate(savingTask.getDueDate());
    task.setOwner(savingTask.getOwner());
    task.setAssignee(savingTask.getAssignee());

    taskService.saveTask(task);
    NotificationUtil.showSuccess("Задача сохранена");
    return task;
}
 
开发者ID:ExtaSoft,项目名称:extacrm,代码行数:17,代码来源:TaskEditForm.java

示例4: addTask

import org.activiti.engine.TaskService; //导入方法依赖的package包/类
protected Task addTask(String name, int priority) {
	TaskService taskService = processEngine.getTaskService();
	Task task = taskService.newTask();
	task.setName(name);
	task.setPriority(priority);
	task.setAssignee("john");
	task.setCategory("testCategory");
	task.setDueDate(new Date());
	task.setOwner("jane");
	task.setDescription("testDescription");
	task.setTenantId("testTenant");
	taskService.saveTask(task);
	return task;

}
 
开发者ID:crnk-project,项目名称:crnk-framework,代码行数:16,代码来源:ActivitiTestBase.java


注:本文中的org.activiti.engine.TaskService.saveTask方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。