예제 #1
0
 @Override
 public void execute(CommandLine command, Configuration configuration, PrintWriter out) {
   final TaskId taskId = new TaskId(command.getArgument());
   final TaskService taskService = new TaskService(configuration);
   final ActivityInstance task =
       taskService.findById(taskId.getWorkflowInstanceId(), taskId.getActivityInstanceId());
   if (task == null) {
     out.println("No task found for ID:" + taskId);
   } else {
     final JsonStreamMapper jsonMapper = configuration.get(JsonStreamMapper.class);
     jsonMapper.pretty();
     out.println(jsonMapper.write(task));
   }
 }
 @BeforeClass
 public static void initialize() {
   jsonStreamMapper = new JsonStreamMapper();
   jsonStreamMapper.pretty();
 }