本文整理汇总了Java中org.kie.services.client.api.command.RemoteRuntimeEngine类的典型用法代码示例。如果您正苦于以下问题:Java RemoteRuntimeEngine类的具体用法?Java RemoteRuntimeEngine怎么用?Java RemoteRuntimeEngine使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RemoteRuntimeEngine类属于org.kie.services.client.api.command包,在下文中一共展示了RemoteRuntimeEngine类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTasks
import org.kie.services.client.api.command.RemoteRuntimeEngine; //导入依赖的package包/类
private void getTasks() {
RemoteRuntimeEngine engine = remoteRestSessionFactory.newRuntimeEngine();
// The TaskService class allows we to access the server tasks
TaskService taskService = engine.getTaskService();
String USER = "erics";
List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner(USER, "en-US");
if (tasks.size() == 0) {
System.out.printf("No tasks for user \"%s\" as owner...\n", USER);
} else {
System.out.printf("Tasks where user \"%s\" is a an owner...\n", USER);
for (TaskSummary t : tasks) {
System.out.printf("ID: %d\n", t.getId());
System.out.printf("Name: %s\n", t.getName());
System.out.printf("Actual Owner: %s\n", t.getActualOwner());
System.out.printf("Created by: %s\n", t.getCreatedBy());
System.out.printf("Created on: %s\n", t.getCreatedOn());
System.out.printf("Status: %s\n", t.getStatus());
System.out.printf("Description: %s\n", t.getDescription());
// LoanApplication la = (LoanApplication)t.getClass();
System.out.println("---------------");
Task userTask = taskService.getTaskById(t.getId());
TaskData taskData = userTask.getTaskData();
Map<String, Object> m = taskService.getTaskContent(t.getId());
StringBuilder sb = new StringBuilder();
Iterator<Entry<String, Object>> iter = m.entrySet().iterator();
while (iter.hasNext()) {
Entry<String, Object> entry = iter.next();
sb.append(entry.getKey());
sb.append('=').append('"');
sb.append(entry.getValue());
sb.append('"');
if (iter.hasNext()) {
sb.append(',').append(' ');
}
}
System.out.println(sb);
}
}
}
示例2: isRemote
import org.kie.services.client.api.command.RemoteRuntimeEngine; //导入依赖的package包/类
/** If the wrapped KieSession is remote.
*
* @return if so */
public boolean isRemote() {
return _wrapped instanceof RemoteRuntimeEngine;
}
示例3: isRemote
import org.kie.services.client.api.command.RemoteRuntimeEngine; //导入依赖的package包/类
/**
* If the wrapped KieSession is remote.
* @return if so
*/
public boolean isRemote() {
return _wrapped instanceof RemoteRuntimeEngine;
}