Tabnine Logo
ConvertUtils
Code IndexAdd Tabnine to your IDE (free)

How to use
ConvertUtils
in
org.kie.server.services.jbpm

Best Java code snippets using org.kie.server.services.jbpm.ConvertUtils (Showing top 20 results out of 315)

origin: org.kie.server/kie-server-services-jbpm

public ExecutionErrorInstanceList getExecutionErrors(String containerId, boolean includeAcknowledged, Integer page, Integer pageSize, String sort, boolean sortOrder) {
  logger.debug("About to get execution errors");
  List<ExecutionError> errors = processInstanceAdminService.getErrorsByDeploymentId(containerId, includeAcknowledged, buildQueryContext(page, pageSize, sort, sortOrder));
  logger.debug("Found errors {}", errors);
  ExecutionErrorInstanceList errorInstanceList = convertToErrorInstanceList(errors);
  return errorInstanceList;
}
origin: org.kie.server/kie-server-services-jbpm

public ProcessInstanceList getProcessInstancesByParent(long parentProcessInstanceId, List<Integer> status, Integer page, Integer pageSize, String sort, boolean sortOrder) {
  if (sort == null || sort.isEmpty()) {
    sort = "ProcessInstanceId";
  }
  if (status == null || status.isEmpty()) {
    status = new ArrayList<Integer>();
    status.add(ProcessInstance.STATE_ACTIVE);
  }
  Collection<ProcessInstanceDesc> instances = runtimeDataService.getProcessInstancesByParent(parentProcessInstanceId, status, buildQueryContext(page, pageSize, sort, sortOrder));
  logger.debug("Found {} process instances , statuses '{}'", instances.size(), status);
  ProcessInstanceList processInstanceList = convertToProcessInstanceList(instances);
  logger.debug("Returning result of process instance search: {}", processInstanceList);
  return processInstanceList;
}
origin: org.kie.server/kie-server-services-jbpm

public TaskSummaryList getTasksByStatusByProcessInstanceId(Number processInstanceId, List<String> status, Integer page, Integer pageSize, String sort, boolean sortOrder) {
  List<Status> taskStatuses = buildTaskStatuses(status);
  if (taskStatuses == null) {
    taskStatuses = new ArrayList<Status>();
    taskStatuses.add(Status.Ready);
    taskStatuses.add(Status.Reserved);
    taskStatuses.add(Status.InProgress);
  }
  logger.debug("About to search for tasks attached to process instance with id '{}'", processInstanceId);
  List<TaskSummary> tasks = runtimeDataService.getTasksByStatusByProcessInstanceId(processInstanceId.longValue(), taskStatuses, buildQueryFilter(page, pageSize, sort, sortOrder));
  logger.debug("Found {} tasks attached to process instance with id '{}'", tasks.size(), processInstanceId);
  TaskSummaryList result = convertToTaskSummaryList(tasks);
  return result;
}
origin: org.kie.server/kie-server-services-jbpm

public QueryDefinitionList getQueries(Integer page, Integer pageSize) throws QueryNotFoundException {
  List<org.jbpm.services.api.query.model.QueryDefinition> queries = queryService.getQueries(buildQueryContext(page, pageSize));
  return convertToQueryDefinitionList(queries);
}
origin: org.kie.server/kie-server-services-jbpm

public VariableInstanceList getVariableHistory(long processInstanceId,  String variableName, Integer page, Integer pageSize) {
  logger.debug("About to search for variable '{}; history within process instance '{}' with page {} and page size {}", variableName, processInstanceId, page, pageSize);
  Collection<VariableDesc> variableDescs = runtimeDataService.getVariableHistory(processInstanceId, variableName, buildQueryContext(page, pageSize));
  logger.debug("Found {} variable {} history entries within process instance '{}'", variableDescs.size(), variableName, processInstanceId);
  VariableInstanceList variableInstanceList = convertToVariablesList(variableDescs);
  logger.debug("Returning result of variable '{}; history search: {}", variableName, variableInstanceList);
  return variableInstanceList;
}
origin: org.kie.server/kie-server-services-jbpm

  actualResult = convertToProcessInstanceCustomVarsList((Collection<ProcessInstanceCustomDesc>) result);
} else if (ProcessInstanceWithVarsDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToProcessInstanceWithVarsList((Collection<ProcessInstanceWithVarsDesc>) result);
} else if (ProcessInstanceDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToProcessInstanceList((Collection<ProcessInstanceDesc>) result);
} else if (UserTaskInstanceWithVarsDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToTaskInstanceWithVarsList((Collection<UserTaskInstanceWithVarsDesc>) result);
} else if (UserTaskInstanceWithPotOwnerDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToTaskInstanceListPO((Collection<UserTaskInstanceWithPotOwnerDesc>) result);
} else if (UserTaskInstanceDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToTaskInstanceList((Collection<UserTaskInstanceDesc>) result);
} else if (TaskSummary.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToTaskSummaryList((Collection<TaskSummary>) result);
} else if (ExecutionError.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToErrorInstanceList((List<ExecutionError>) result);
} else if (List.class.isAssignableFrom(resultMapper.getType())) {
origin: org.kie.server/kie-server-services-jbpm-search

  actualResult = convertToProcessInstanceWithVarsList((Collection<ProcessInstanceWithVarsDesc>) result);
} else if (ProcessInstanceDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToProcessInstanceList((Collection<ProcessInstanceDesc>) result);
} else if (UserTaskInstanceWithVarsDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToTaskInstanceWithVarsList((Collection<UserTaskInstanceWithVarsDesc>) result);
} else if (UserTaskInstanceDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToTaskInstanceList((Collection<UserTaskInstanceDesc>) result);
} else if (TaskSummary.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToTaskSummaryList((Collection<TaskSummary>) result);
} else if (List.class.isAssignableFrom(resultMapper.getType())) {
origin: org.kie.server/kie-server-services-jbpm

public ProcessInstanceList getProcessInstancesByProcessId(String processId, List<Integer> status, String initiator, Integer page, Integer pageSize, String sort, boolean sortOrder) {
  if (sort == null || sort.isEmpty()) {
    sort = "ProcessInstanceId";
  }
  if (status == null || status.isEmpty()) {
    status = new ArrayList<Integer>();
    status.add(ProcessInstance.STATE_ACTIVE);
  }
  logger.debug("About to search for process instances with process id '{}' with page {} and page size {}", processId, page, pageSize);
  Collection<ProcessInstanceDesc> instances = runtimeDataService.getProcessInstancesByProcessId(status, processId, nullEmpty(initiator), buildQueryContext(page, pageSize, sort, sortOrder));
  logger.debug("Found {} process instance for process id '{}', statuses '{}'", instances.size(), processId, status);
  ProcessInstanceList processInstanceList = convertToProcessInstanceList(instances);
  logger.debug("Returning result of process instance search: {}", processInstanceList);
  return processInstanceList;
}
origin: org.kie.server/kie-server-services-jbpm

public TaskSummaryList getTasksByVariables(String userId, String variableName, String variableValue, List<String> status, Integer page, Integer pageSize, String sort, boolean sortOrder) {
  userId = getUser(userId);
  List<Status> taskStatuses = buildTaskStatuses(status);
  if (taskStatuses == null) {
    taskStatuses = new ArrayList<Status>();
    taskStatuses.add(Status.Ready);
    taskStatuses.add(Status.Reserved);
    taskStatuses.add(Status.InProgress);
  }
  List<TaskSummary> instances = null;
  if (variableValue != null && !variableValue.isEmpty()) {
    logger.debug("About to search for tasks that has variable '{}' with value '{}' with page {} and page size {}", variableName, variableValue, page, pageSize);
    instances = runtimeDataService.getTasksByVariableAndValue(userId, variableName, variableValue, taskStatuses, buildQueryContext(page, pageSize, sort, sortOrder));
    logger.debug("Found {} tasks with variable {} and variable value {}", instances.size(), variableName, variableValue);
  } else {
    logger.debug("About to search for tasks that has variable '{}' with page {} and page size {}", variableName, page, pageSize);
    instances = runtimeDataService.getTasksByVariable(userId, variableName, taskStatuses, buildQueryContext(page, pageSize, sort, sortOrder));
    logger.debug("Found {} tasks with variable {} ", instances.size(), variableName);
  }
  TaskSummaryList taskSummaryList = convertToTaskSummaryList(instances);
  logger.debug("Returning result of task by variable search: {}", taskSummaryList);
  return taskSummaryList;
}
origin: org.kie.server/kie-server-services-jbpm

public TaskSummaryList getTasksAssignedAsPotentialOwner(List<String> status,  List<String> groupIds, String userId, Integer page, Integer pageSize, String sort, boolean sortOrder, String filter) {
  List<Status> taskStatuses = buildTaskStatuses(status);
  userId = getUser(userId);
  logger.debug("About to search for task assigned as potential owner for user '{}'", userId);
  List<TaskSummary> tasks;
  QueryFilter queryFilter = buildTaskByNameQueryFilter(page, pageSize, sort, sortOrder, filter);
  if (groupIds != null && !groupIds.isEmpty()) {
    if (taskStatuses == null) {
      tasks = runtimeDataService.getTasksAssignedAsPotentialOwner(userId, groupIds, queryFilter);
    } else {
      tasks = runtimeDataService.getTasksAssignedAsPotentialOwner(userId, groupIds, taskStatuses, queryFilter);
    }
  } else if (taskStatuses != null) {
    tasks = runtimeDataService.getTasksAssignedAsPotentialOwnerByStatus(userId, taskStatuses, queryFilter);
  } else {
    tasks = runtimeDataService.getTasksAssignedAsPotentialOwner(userId, queryFilter);
  }
  logger.debug("Found {} tasks for user '{}' assigned as potential owner", tasks.size(), userId);
  TaskSummaryList result = convertToTaskSummaryList(tasks);
  return result;
}
origin: org.kie.server/kie-server-services-jbpm

public ProcessDefinitionList getProcessesByFilter(String filter, Integer page, Integer pageSize, String sort, boolean sortOrder) {
  Collection<ProcessDefinition> definitions;
  if (sort == null || sort.isEmpty()) {
    sort = "ProcessName";
  }
  if (filter != null && !filter.isEmpty()) {
    logger.debug("About to search for process definitions with filter '{}' with page {} and page size {}", filter, page, pageSize);
    definitions = runtimeDataService.getProcessesByFilter(filter, buildQueryContext(page, pageSize, sort, sortOrder));
    logger.debug("Found {} process definitions with filter '{}'", definitions.size(), filter);
  } else {
    logger.debug("About to search for process definitions with page {} and page size {}", page, pageSize);
    definitions = runtimeDataService.getProcesses(buildQueryContext(page, pageSize, sort, sortOrder));
    logger.debug("Found {} process definitions", definitions.size(), filter);
  }
  ProcessDefinitionList processDefinitionList = convertToProcessList(definitions);
  logger.debug("Returning result of process definition search: {}", processDefinitionList);
  return processDefinitionList;
}
origin: org.kie.server/kie-server-services-jbpm

public Object query(String queryName, String mapper, String orderBy, Integer page, Integer pageSize) {
  QueryResultMapper<?> resultMapper = QueryMapperRegistry.get().mapperFor(mapper, null);
  QueryContext queryContext = buildQueryContext(page, pageSize);
  if (orderBy != null && !orderBy.isEmpty()) {
    String[] orderBySortOrderItems = orderBy.split(",");
    if (orderBySortOrderItems.length > 1) {
      logger.debug("-- query() > orderBy clause = {} ", orderBy);
      queryContext = new AdvancedQueryContext(queryContext, orderBy);
    } else {
      logger.debug("-- query() > sortBy = {}", orderBy);
      queryContext.setOrderBy(orderBy);
      queryContext.setAscending(true);
    }
  }
  logger.debug("About to perform query '{}' with sorting criteria '{}' and page {} and page size {}", queryName, orderBy, page, pageSize);
  Object result = queryService.query(queryName, resultMapper, queryContext);
  logger.debug("Result returned from the query {} mapped with {}", result, resultMapper);
  return transform(result, resultMapper);
}
origin: org.kie.server/kie-server-services-jbpm

public NodeInstanceList getProcessInstanceHistory(long processInstanceId, Boolean active, Boolean completed, Integer page, Integer pageSize) {
  logger.debug("About to search for node instances with page {} and page size {}", page, pageSize);
  Collection<NodeInstanceDesc> result = null;
  if ((Boolean.TRUE.equals(active) && Boolean.TRUE.equals(completed)) || (active == null && completed == null)) {
    logger.debug("Searching for active and completed node instances for process instance with id {}", processInstanceId);
    result = runtimeDataService.getProcessInstanceFullHistory(processInstanceId, buildQueryContext(page, pageSize));
  } else if (Boolean.TRUE.equals(active)) {
    logger.debug("Searching for active node instances for process instance with id {}", processInstanceId);
    result = runtimeDataService.getProcessInstanceHistoryActive(processInstanceId, buildQueryContext(page, pageSize));
  } else if (Boolean.TRUE.equals(completed)) {
    logger.debug("Searching for completed node instances for process instance with id {}", processInstanceId);
    result = runtimeDataService.getProcessInstanceHistoryCompleted(processInstanceId, buildQueryContext(page, pageSize));
  }
  NodeInstanceList nodeInstanceList = convertToNodeInstanceList(result);
  logger.debug("Returning result of node instances search: {}", nodeInstanceList);
  return nodeInstanceList;
}
origin: org.kie.server/kie-server-services-jbpm

List<TaskEvent> tasks = runtimeDataService.getTaskEvents(taskId, buildQueryFilter(page, pageSize, sort, sortOrder));
origin: org.kie.server/kie-server-services-jbpm-search

  actualResult = convertToProcessInstanceWithVarsList((Collection<ProcessInstanceWithVarsDesc>) result);
} else if (ProcessInstanceDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToProcessInstanceList((Collection<ProcessInstanceDesc>) result);
} else if (UserTaskInstanceWithVarsDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToTaskInstanceWithVarsList((Collection<UserTaskInstanceWithVarsDesc>) result);
} else if (UserTaskInstanceDesc.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToTaskInstanceList((Collection<UserTaskInstanceDesc>) result);
} else if (TaskSummary.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToTaskSummaryList((Collection<TaskSummary>) result);
} else if (ExecutionError.class.isAssignableFrom(resultMapper.getType())) {
  actualResult = convertToErrorInstanceList((List<ExecutionError>) result);
} else if (List.class.isAssignableFrom(resultMapper.getType())) {
origin: org.kie.server/kie-server-services-jbpm

public ProcessInstanceList getProcessInstances(List<Integer> status, String initiator, String processName, Integer page, Integer pageSize, String sort, boolean sortOrder) {
  if (sort == null || sort.isEmpty()) {
    sort = "ProcessInstanceId";
  }
  if (status == null || status.isEmpty()) {
    status = new ArrayList<Integer>();
    status.add(ProcessInstance.STATE_ACTIVE);
  }
  Collection<ProcessInstanceDesc> instances = null;
  if (processName != null && !processName.isEmpty()) {
    logger.debug("About to search for process instances with process name '{}' with page {} and page size {}", processName, page, pageSize);
    instances = runtimeDataService.getProcessInstancesByProcessName(status, processName, nullEmpty(initiator), buildQueryContext(page, pageSize, sort, sortOrder));
    logger.debug("Found {} process instances for process name '{}', statuses '{}'", instances.size(), processName, status);
  } else {
    logger.debug("About to search for process instances with page {} and page size {}", page, pageSize);
    instances = runtimeDataService.getProcessInstances(status, nullEmpty(initiator), buildQueryContext(page, pageSize, sort, sortOrder));
    logger.debug("Found {} process instances , statuses '{}'", instances.size(), status);
  }
  ProcessInstanceList processInstanceList = convertToProcessInstanceList(instances);
  logger.debug("Returning result of process instance search: {}", processInstanceList);
  return processInstanceList;
}
origin: org.kie.server/kie-server-services-jbpm

public ProcessDefinitionList getProcessesByDeploymentId(String containerId, Integer page, Integer pageSize, String sort, boolean sortOrder) {
  try {
    containerId = context.getContainerId(containerId, ContainerLocatorProvider.get().getLocator());
    logger.debug("About to search for process definitions within container '{}' with page {} and page size {}", containerId, page, pageSize);
    if (sort == null || sort.isEmpty()) {
      sort = "ProcessName";
    }
    Collection<ProcessDefinition> definitions = runtimeDataService.getProcessesByDeploymentId(containerId, buildQueryContext(page, pageSize, sort, sortOrder));
    logger.debug("Found {} process definitions within container '{}'", definitions.size(), containerId);

    ProcessDefinitionList processDefinitionList = convertToProcessList(definitions);
    logger.debug("Returning result of process definition search: {}", processDefinitionList);

    return processDefinitionList;
  } catch (IllegalArgumentException e) {
    // container was not found by locator
    return new ProcessDefinitionList();
  }
}
origin: org.kie.server/kie-server-services-jbpm

@SuppressWarnings("unchecked")
public Object queryFilteredWithBuilder(String containerId, String queryName, String mapper, String builder, Integer page, Integer pageSize, String payload, String marshallingType) {
  Map<String, String> columnMapping = null;
  QueryContext queryContext = buildQueryContext(page, pageSize);
  Map<String, Object> queryParameters = new HashMap<String, Object>();
  String orderBy = null;
origin: org.kie.server/kie-server-services-jbpm

List<AuditTask> tasks = runtimeDataService.getAllAuditTask(userId, buildQueryFilter(page, pageSize, sort, sortOrder));
origin: org.kie.server/kie-server-services-jbpm

public ExecutionErrorInstanceList getExecutionErrorsByTaskId(String containerId, Number taskId, boolean includeAcknowledged, Integer page, Integer pageSize, String sort, boolean sortOrder) {
  logger.debug("About to get execution errors for task id {}", taskId);
  List<ExecutionError> errors = userTaskAdminService.getErrorsByTaskId(taskId.longValue(), includeAcknowledged, buildQueryContext(page, pageSize, sort, sortOrder));
  logger.debug("Found errors {}", errors);
  ExecutionErrorInstanceList errorInstanceList = convertToErrorInstanceList(errors);
  return errorInstanceList;
}
org.kie.server.services.jbpmConvertUtils

Most used methods

  • buildQueryContext
  • convertToErrorInstanceList
  • convertToProcessInstanceList
  • convertToProcessInstanceWithVarsList
  • convertToTaskInstanceList
  • convertToTaskInstanceWithVarsList
  • convertToTaskSummaryList
  • buildQueryFilter
  • buildTaskByNameQueryFilter
  • buildTaskStatuses
  • convertQueryDefinition
  • convertToErrorInstance
  • convertQueryDefinition,
  • convertToErrorInstance,
  • convertToNodeInstance,
  • convertToNodeInstanceList,
  • convertToProcess,
  • convertToProcessInstance,
  • convertToProcessInstanceCustomVars,
  • convertToProcessInstanceCustomVarsList,
  • convertToProcessList,
  • convertToQueryDefinitionList

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • setScale (BigDecimal)
  • findViewById (Activity)
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ImageIO (javax.imageio)
  • JList (javax.swing)
  • JPanel (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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