Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") protected org.camunda.bpm.engine.rest.hal.task.HalTaskList convertToHalTaskList(List<org.camunda.bpm.engine.task.Task> tasks, long count)
        protected internal virtual HalTaskList convertToHalTaskList(IList <Task> tasks, long count)
        {
            HalTaskList halTasks = HalTaskList.generate(tasks, count, ProcessEngine);
            IDictionary <string, IList <VariableInstance> > variableInstances = getVariableInstancesForTasks(halTasks);

            if (variableInstances != null)
            {
                foreach (HalTask halTask in (IList <HalTask>)halTasks.getEmbedded("task"))
                {
                    embedVariableValuesInHalTask(halTask, variableInstances);
                }
            }
            return(halTasks);
        }
Beispiel #2
0
        public virtual HalTaskList getHalTasks(UriInfo uriInfo, int?firstResult, int?maxResults)
        {
            TaskQueryDto queryDto = new TaskQueryDto(ObjectMapper, uriInfo.QueryParameters);

            ProcessEngine engine = ProcessEngine;
            TaskQuery     query  = queryDto.toQuery(engine);

            // get list of tasks
            IList <Task> matchingTasks = executeTaskQuery(firstResult, maxResults, query);

            // get total count
            long count = query.count();

            return(HalTaskList.generate(matchingTasks, count, engine));
        }
Beispiel #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") protected Map<String, List<org.camunda.bpm.engine.runtime.VariableInstance>> getVariableInstancesForTasks(org.camunda.bpm.engine.rest.hal.task.HalTaskList halTaskList)
        protected internal virtual IDictionary <string, IList <VariableInstance> > getVariableInstancesForTasks(HalTaskList halTaskList)
        {
            IList <HalTask> halTasks = (IList <HalTask>)halTaskList.getEmbedded("task");

            return(getVariableInstancesForTasks(halTasks.ToArray()));
        }