congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TaskCommentList
Code IndexAdd Tabnine to your IDE (free)

How to use
TaskCommentList
in
org.kie.server.api.model.instance

Best Java code snippets using org.kie.server.api.model.instance.TaskCommentList (Showing top 2 results out of 315)

origin: org.kie.server/kie-server-client

@Override
public List<TaskComment> getTaskCommentsByTaskId(String containerId, Long taskId) {
  TaskCommentList commentList = null;
  if( config.isRest() ) {
    Map<String, Object> valuesMap = new HashMap<String, Object>();
    valuesMap.put(CONTAINER_ID, containerId);
    valuesMap.put(TASK_INSTANCE_ID, taskId);
    commentList = makeHttpGetRequestAndCreateCustomResponse(
        build(loadBalancer.getUrl(), TASK_URI + "/" + TASK_INSTANCE_COMMENTS_GET_URI, valuesMap), TaskCommentList.class);
  } else {
    CommandScript script = new CommandScript( Collections.singletonList( (KieServerCommand)
        new DescriptorCommand( "UserTaskService", "getCommentsByTaskId", marshaller.getFormat().getType(), new Object[]{containerId, taskId}) ) );
    ServiceResponse<String> response = (ServiceResponse<String>) executeJmsCommand( script, DescriptorCommand.class.getName(), "BPM", containerId ).getResponses().get(0);
    throwExceptionOnFailure(response);
    if (shouldReturnWithNullResponse(response)) {
      return null;
    }
    commentList = deserialize(response.getResult(), TaskCommentList.class);
  }
  if (commentList.getTasks() != null) {
    return Arrays.asList(commentList.getTasks());
  }
  return Collections.emptyList();
}
origin: org.kie.server/kie-server-services-jbpm

public String getCommentsByTaskId(String containerId, Number taskId, String marshallingType) {
  containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue()));
  List<Comment> comments = userTaskService.getCommentsByTaskId(containerId, taskId.longValue());
  TaskComment[] taskComments = new TaskComment[comments.size()];
  int counter = 0;
  for (Comment comment : comments) {
    TaskComment taskComment = TaskComment.builder()
        .id(comment.getId())
        .text(comment.getText())
        .addedBy(comment.getAddedBy().getId())
        .addedAt(comment.getAddedAt())
        .build();
    taskComments[counter] = taskComment;
    counter++;
  }
  TaskCommentList result = new TaskCommentList(taskComments);
  logger.debug("About to marshal task '{}' comments {}", taskId, result);
  String response = marshallerHelper.marshal(containerId, marshallingType, result);
  return response;
}
org.kie.server.api.model.instanceTaskCommentList

Most used methods

  • <init>
  • getTasks

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • findViewById (Activity)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Notification (javax.management)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JButton (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now